if(document.all && !document.getElementById) {
    document.getElementById = function(id) {
         return document.all[id];
    }
}

function toggle1() {

  document.getElementById("maxflow2").style.display = "none";
  document.getElementById("maxflow2a").style.display = "none";
selwert =  document.getElementById("maxflow1").value + " (slpm)";
  document.getElementById("maxflow").value = selwert;
}

function toggle2() {

  document.getElementById("maxflow1").style.display = "none";
  document.getElementById("maxflow1a").style.display = "none";
selwert =  document.getElementById("maxflow2").value + " (Nm3)";
  document.getElementById("maxflow").value = selwert;
}

function toggle1x() {

  document.getElementById("nomflow2").style.display = "none";
  document.getElementById("nomflow2a").style.display = "none";
selwert =  document.getElementById("nomflow1").value + " (slpm)";
  document.getElementById("nomflow").value = selwert;
}

function toggle2x() {

  document.getElementById("nomflow1").style.display = "none";
  document.getElementById("nomflow1a").style.display = "none";
selwert =  document.getElementById("nomflow2").value + " (Nm3)";
  document.getElementById("nomflow").value = selwert;
}

function wechseln(e) {
  if (e.style.display == "") {
     e.style.display = "none";
  } else {
     e.style.display = "";
  }
}

function check() {

  if(document.formquota.lastname.value=="")
{
    window.alert("Please enter your lastname!");
    document.formquota.lastname.focus();
    document.formquota.lastname.style.backgroundColor = "#336699";
    document.formquota.lastname.style.color = "#ffffff";
    return false;
    }

  if((document.formquota.email.value=="") ||
(document.formquota.email.value.indexOf('@') == -1) || 
(document.formquota.email.value.indexOf('.') == -1)) 

{
    window.alert("Please enter your email address!");
    document.formquota.email.focus();
    document.formquota.email.style.backgroundColor = "#336699";
    document.formquota.email.style.color = "#ffffff";
    return false;
    }

  if(document.formquota.company.value=="")
{
    window.alert("Please enter the name of your company!");
    document.formquota.company.focus();
    document.formquota.company.style.backgroundColor = "#336699";
    document.formquota.company.style.color = "#ffffff";
    return false;
    }
  if(document.formquota.phone.value=="")
{
    window.alert("Please enter your phone number!");
    document.formquota.phone.focus();
    document.formquota.phone.style.backgroundColor = "#336699";
    document.formquota.phone.style.color = "#ffffff";
    return false;
    }
	
var indexcountry=document.formquota.country.selectedIndex;
if (indexcountry==0) {
alert("\nPlease enter the name of your country!");
document.formquota.country.focus();
    document.formquota.country.style.backgroundColor = "#336699";
    document.formquota.country.style.color = "#ffffff";
    return false;
}
var indexgas=document.formquota.gas.selectedIndex;
if (indexgas==0) {
alert("\nYou must select a gas to be purified.");
document.formquota.gas.focus();
    document.formquota.gas.style.backgroundColor = "#336699";
    document.formquota.gas.style.color = "#ffffff";
    return false;
}
else {
    return true;
    }

}

function out() {
document.all.pouhg.style.display='none';
document.all.poua.style.display='none';
document.all.puha.style.display='none';
document.all.pf.style.display='none';
document.all.dv.style.display='none';
document.all.pt.style.display='none';
document.all.bpt.style.display='none';
document.all.ptg.style.display='none';
document.all.dpt.style.display='none';
document.all.pr.style.display='none';
document.all.spr.style.display='none';
document.all.ov.style.display='none';
}
function out2() {
document.all.pc.style.display='none';
document.all.sr.style.display='none';
}
function change_img(source,index) {
    document.images[index].src = source;
    }

// Moves the box object to be directly beneath an object.
function move_box(an, box)
{
    var cleft = 0;
    var ctop = 0;
    var obj = an;

    while (obj.offsetParent)
    {
        cleft += obj.offsetLeft;
        ctop += obj.offsetTop;
        obj = obj.offsetParent;
    }

    box.style.left = cleft + 'px';

    ctop += an.offsetHeight + 8;

    // Handle Internet Explorer body margins,
    // which affect normal document, but not
    // absolute-positioned stuff.
    if (document.body.currentStyle &&
        document.body.currentStyle['marginTop'])
    {
        ctop += parseInt(
            document.body.currentStyle['marginTop']);
    }

    box.style.top = ctop + 'px';
}

// Shows a box if it wasn't shown yet or is hidden
// or hides it if it is currently shown
function show_hide_box(an, width, height, borderStyle)
{
    var href = an.href;
    var boxdiv = document.getElementById(href);

    if (boxdiv != null)
    {
        if (boxdiv.style.display=='none')
        {
            // Show existing box, move it
            // if document changed layout
            move_box(an, boxdiv);
            boxdiv.style.display='block';

            bringToFront(boxdiv);

            // Workaround for Konqueror/Safari
            if (!boxdiv.contents.contentWindow)
                boxdiv.contents.src = href;
        }
        else
            // Hide currently shown box.
            boxdiv.style.display='none';
        return false;
    }

    // Create box object through DOM
    boxdiv = document.createElement('div');

    // Assign id equalling to the document it will show
    boxdiv.setAttribute('id', href);

    boxdiv.style.display = 'block';
    boxdiv.style.position = 'absolute';
    boxdiv.style.width = width + 'px';
    boxdiv.style.height = height + 'px';
    boxdiv.style.border = borderStyle;
    boxdiv.style.textAlign = 'right';
    boxdiv.style.padding = '4px';
    boxdiv.style.background = '#FFFFFF';
    document.body.appendChild(boxdiv);

    var offset = 0;

    // Remove the following code if 'Close' hyperlink
    // is not needed.
    var close_href = document.createElement('a');
    close_href.href = 'javascript:void(0);';
    close_href.onclick = function()
        { show_hide_box(an, width, height, borderStyle); }
    close_href.appendChild(document.createTextNode('Close'));
    boxdiv.appendChild(close_href);
    offset = close_href.offsetHeight;
    // End of 'Close' hyperlink code.

    var contents = document.createElement('iframe');
    //contents.scrolling = 'no';
    contents.overflowX = 'hidden';
    contents.overflowY = 'scroll';
    contents.frameBorder = '0';
    contents.style.width = width + 'px';
    contents.style.height = (height - offset) + 'px';

    boxdiv.contents = contents;
    boxdiv.appendChild(contents);

    move_box(an, boxdiv);

    if (contents.contentWindow)
        contents.contentWindow.document.location.replace(
            href);
    else
        contents.src = href;

    // The script has successfully shown the box,
    // prevent hyperlink navigation.
    return false;
}

function getAbsoluteDivs()
{
    var arr = new Array();
    var all_divs = document.body.getElementsByTagName("DIV");
    var j = 0;

    for (i = 0; i < all_divs.length; i++)
        if (all_divs.item(i).style.position=='absolute')
        {
            arr[j] = all_divs.item(i);
            j++;
        }

    return arr;
}

function bringToFront(obj)
{
    if (!document.getElementsByTagName)
        return;

    var divs = getAbsoluteDivs();
    var max_index = 0;
    var cur_index;

    // Compute the maximal z-index of
    // other absolute-positioned divs
    for (i = 0; i < divs.length; i++)
    {
        var item = divs[i];
        if (item == obj ||
            item.style.zIndex == '')
            continue;

        cur_index = parseInt(item.style.zIndex);
        if (max_index < cur_index)
        {
            max_index = cur_index;
        }
    }

    obj.style.zIndex = max_index + 1;
}

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(300,300);');
writeln('width=300-(document.body.clientWidth-document.images[0].width);');
writeln('height=300-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}
