function show_submenu(id,id_not) {
	for(i=0;i<5;i++){
		if(document.getElementById(i)!=null){
			document.getElementById(i).style.display="none";
			document.getElementById("td_"+i).colSpan="1";
			if(i!=id_not){
				document.getElementById("maintd_"+i).className="hauptnavioff";
				document.getElementById("im_"+i).setAttribute("src","images/pfeil_gelb.gif");
			}
		}
	}
	document.getElementById("td_"+id).colSpan=(6-id);
	document.getElementById(id).style.display="inline";	
	document.getElementById("maintd_"+id).className="hauptnavion";
	document.getElementById("im_"+id).setAttribute("src","images/pfeil_blau.gif");
}

function subnavion(id1,id2){
	document.getElementById("subtd_"+id1+"_"+id2).className="klappnavion";
}

function subnavioff(id1,id2){
	document.getElementById("subtd_"+id1+"_"+id2).className="klappnavioff";
}

function homenavion(id){
	document.getElementById("hometd_"+id).className="homenavion";
}

function homenavioff(id,id_not){
	if(id_not==-1){
		document.getElementById("hometd_"+id).className="homenavioff";
	}
}

function reset_menu(id_not) {
	for(i=0;i<5;i++){
		if(document.getElementById(i)!=null){
			document.getElementById(i).style.display="none";
			if(i!=id_not){
				document.getElementById("td_"+i).colSpan="1";
				document.getElementById("maintd_"+i).className="hauptnavioff";
				document.getElementById("im_"+i).setAttribute("src","images/pfeil_gelb.gif");
			}
		}
	}
}

function change_image(id,image){
	document.getElementById(id).setAttribute("src",image);
}

function goback(){
	window.history.back();
}

function open_faq_glossary(page){
	properties ="dependent=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=300,left="+(screen.availWidth/2-200)+",top="+(screen.availHeight/2-150);
	newWin = window.open(page,'Details',properties);
	newWin.focus();
}

function open_contact(from,to,bcc,subject){
	properties ="dependent=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=400,height=450,left="+(screen.availWidth/2-200)+",top="+(screen.availHeight/2-300);
	newWin = window.open('mail.asp?from='+from+'&to='+to+'&bcc='+bcc+'&subject='+subject,'Kontakt',properties);
	goback();
	newWin.focus();
}

function post_values(){
	document.form.submit();
}

function post_values2(){
	document.form2.submit();
}

function post_values3(){
	document.form3.submit();
}

function post_values4(){
	document.form4.submit();
}

function open_apply(page){
	newWin = window.open(page,'Extranet','width=490,height=480,top=20,left=150,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	newWin.focus();
}

function change_pw(){
	properties ="dependent=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width=400,height=400,left="+(screen.availWidth/2-200)+",top="+(screen.availHeight/2-200);
	newWin = window.open('change_password.asp','Passwort',properties);
	newWin.focus();
}

function admin_start(){
	properties ="dependent=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600,left="+(screen.availWidth/2-300)+",top="+(screen.availHeight/2-300);
	newWin = window.open('admin_main.asp','Admin',properties);
	newWin.focus();
}

function delete_check(){
        var x = window.confirm("Are you sure to delete this item?");
        return x;
}

function show_tableone(){
	document.getElementById("tableone").style.display="block"
	document.getElementById("tabletwo").style.display="none"
}

function show_tabletwo(){
	document.getElementById("tableone").style.display="none"
	document.getElementById("tabletwo").style.display="block"
}

function publication(){
	document.PUBLIZIEREN.submit();
}

function publish_check(){
        var x = window.confirm("Are you sure you want to publish all the Contents of your Country locally?\nPlease be patient this can take some time.");
        if(x==true){
        	document.location.href="publish.asp";
        }
}

function dimesionamento(){
	newWin = window.open('http://www.junkers.com/pt/pt/ek/dimensionamento/extranet.htm','Extranet','width=510,height=440,left='+(screen.availWidth/2-200)+',top='+(screen.availHeight/2-300)+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	newWin.focus();
}

function dimesionamento_es(){
	newWin = window.open('http://www.junkers.com/sp/sp/ek/dimensionamento/extranet.htm','Extranet','width=510,height=440,left='+(screen.availWidth/2-200)+',top='+(screen.availHeight/2-300)+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	newWin.focus();
}

function showFlash(src, width, height){
    var ok=false;
    var MS_ok=false;
    with (navigator){ 
        if(appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)){
			MS_ok=true;			    
            x = navigator.plugins["Shockwave Flash"];
            if(x){
			    y = x.description;
			    flashversion = y.charAt(y.indexOf('.')-1);
			    ok=(plugins && plugins["Shockwave Flash"] && flashversion > 4 );
		    }
		}else if (appVersion.indexOf('3.1')==-1){ //not Netscape or Win3.1
		    MS_ok=window.MS_flash;
        }
    }  
    if(MS_ok){
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' + width + '" height="' + height + '">');
        document.write('<param name="movie" value="' + src + '" />');
        document.write('<param name="quality" value="high" />');
        document.write('<param name="bgcolor" value="#FFFFFF" />');
        document.write('<embed src="' + src + '" quality="high" bgcolor="#000000" width="' + width + '" height="' + height + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
        document.write('</object>');
    }else{
        document.write('<div align="left" style="width:' + width + ';"><br><br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="linkregular" href="http://www.macromedia.com/go/getflashplayer">Get Flash Player</a></div>');
    }
}

function flashPopUp(theURL,winName,width,height,features){ 
    x=(screen.width-width)/2-5;//X zentrieren
    y=(screen.height-height)/2-25;//Y zentrieren
    winfeatures=("top="+y+",left="+x+",width="+width+",height="+height+","+features);
    window.open(theURL,winName,winfeatures);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
