function getHeaderImage(set, lang) {
	var theImages = new Array();
	var theDescs_de = new Array();
	var theDescs_en = new Array();
	var theDescs_fr = new Array(); 
	if(set == 'unt'){		//Unternehmen
		theImages[0] = 'gfx/header/Unt_K_1.jpg';
		theDescs_de[0] = ' ';
		theDescs_en[0] = ' ';
		theDescs_fr[0] = ' ';
		theImages[1] = 'gfx/header/Unt_K_2.jpg';
		theDescs_de[1] = ' ';
		theDescs_en[1] = ' ';
		theDescs_fr[1] = ' ';
		theImages[2] = 'gfx/header/Unt_K_3.jpg';
		theDescs_de[2] = ' ';
		theDescs_en[2] = ' ';
		theDescs_fr[2] = ' ';		
		theImages[3] = 'gfx/header/Unt_K_4.jpg';
		theDescs_de[3] = ' ';
		theDescs_en[3] = ' ';
		theDescs_fr[3] = ' ';
		theImages[4] = 'gfx/header/Unt_K_His.jpg';
		theDescs_de[4] = ' ';
		theDescs_en[4] = ' ';
		theDescs_fr[4] = ' ';
	}else if (set == 'dach_rhepanol'){ //Dachbahnen Rhepanol				
		theImages[0] = 'gfx/header/DB_K_11.jpg';
		theDescs_de[0] = 'Jenoptik, Jena<br/>18.000 qm Rhepanol fk';
		theDescs_en[0] = 'Jenoptik, Jena, Germany<br/>18,000 sqm Rhepanol fk';
		theDescs_fr[0] = 'Jenoptik, Jena<br/>18.000 m&sup2; Rhepanol fk';
		theImages[1] = 'gfx/header/DB_K_12.jpg';
		theDescs_de[1] = 'Radrennrennbahn, Kaarst-B&uuml;ttgen<br/>7.000 qm Rhepanol fk';
		theDescs_en[1] = 'Velodrome, Kaarst-B&uuml;ttgen, Germany<br/>7,000 sqm Rhepanol fk';
		theDescs_fr[1] = 'V&eacute;lodrome, Kaarst-B&uuml;ttgen<br />7.000 m&sup2; Rhepanol fk';
		theImages[2] = 'gfx/header/DB_K_13.jpg';
		theDescs_de[2] = 'allrounder winter world, Neuss<br/>15.000 qm Rhepanol fk';
		theDescs_en[2] = 'Allrounder winter world, Neuss, Germany<br/>15,000 sqm Rhepanol fk';
		theDescs_fr[2] = 'Allrounder winter world, Neuss<br/>15.000 m&sup2; Rhepanol fk';
		theImages[3] = 'gfx/header/DB_K_14.jpg';
		theDescs_de[3] = 'Museum Ritter, Waldenbuch<br/>1.000 qm Rhepanol fk';
		theDescs_en[3] = 'Museum Ritter, Waldenbuch, Germany<br/>1,000 sqm Rhepanol fk ';
		theDescs_fr[3] = 'Mus&eacute;e Ritter, Waldenbruch<br />1000 m&sup2; Rhepanol fk';
		theImages[4] = 'gfx/header/DB_K_15.jpg';
		theDescs_de[4] = 'salzburgarena, Salzburg, &Ouml;sterreich<br/>12.000 qm Rhepanol fk';
		theDescs_en[4] = 'salzburgarena, Salzburg, Austria<br/>12,000 sqm Rhepanol fk';
		theDescs_fr[4] = 'salzburgarena, Salzbourg<br />Autriche<br />12.000 m&sup2; Rhepanol fk';
		theImages[5] = 'gfx/header/DB_K_16.jpg';
		theDescs_de[5] = 'Moonraker, Poole, England<br/>400 qm Rhepanol fk mit Kupferanstrich';
		theDescs_en[5] = 'Moonraker, Poole, England<br/>400 sqm Rhepanol fk';
		theDescs_fr[5] = 'Moonraker, Poole, Angleterre<br />400 m&sup2; Rhepanol fk avec peinture cuivre';
	}else if (set == 'dach_rhepanol_hg'){ //Dachbahnen Rhepanol	hg
		theImages[0] = 'gfx/header/DB_K_10.jpg';
		theDescs_de[0] = ' ';
		theDescs_en[0] = ' ';
		theDescs_fr[0] = ' ';
	}else if (set == 'dach_rhenofol'){ //Dachbahnen Rhenofol
		theImages[0] = 'gfx/header/DB_K_05.jpg';
		theDescs_de[0] = 'Flughafen M&uuml;nchen II, M&uuml;nchen<br/>22.000 qm Rhenofol CV ';
		theDescs_en[0] = 'Munich II Airport, Munich, Germany<br/>22,000 sqm Rhenofol CV';
		theDescs_fr[0] = 'A&eacute;roport Munich II, Munich<br/>22.000 m&sup2; Rhenofol CV';
		theImages[1] = 'gfx/header/DB_K_06.jpg';
		theDescs_de[1] = 'Hacker-Pschorr-Arena, Bad T&ouml;lz<br/>8.000 qm Rhenofol CV';
		theDescs_en[1] = 'Hacker-Pschorr-Arena, Bad T&ouml;lz, Germany<br/>8,000 sqm Rhenofol CV';
		theDescs_fr[1] = 'Hacker-Pschorr-Arena, Bad T&ouml;lz<br/>8.000 m&sup2; Rhenofol CV';
		theImages[2] = 'gfx/header/DB_K_07.jpg';
		theDescs_de[2] = 'Wohnanlage, Maasbommel, Holland<br/>4.000 qm Rhenofol CV';
		theDescs_en[2] = 'Housing complex, Maasbommel, Netherlands<br/>4,000 sqm Rhenofol CV';
		theDescs_fr[2] = 'Complexe r&eacute;sidentiel, Maasbommel (Pays-Bas)<br/>4.000 m&sup2; Rhenofol CV';
		theImages[3] = 'gfx/header/DB_K_08.jpg';
		theDescs_de[3] = 'New Metropolis, Amsterdam, Holland<br/>4.300 qm Rhenofol CV';
		theDescs_en[3] = 'New Metropolis, Amsterdam, Netherlands<br/>4,300 sqm Rhenofol CV';
		theDescs_fr[3] = 'New Metropolis, Amsterdam, Pays-Bas<br/>4.300 m&sup2; Rhenofol CV';
		theImages[4] = 'gfx/header/DB_K_09.jpg';
		theDescs_de[4] = 'Stade de France, Paris, Frankreich<br/>55.000 qm Rhenofol CV';
		theDescs_en[4] = 'Stade de France, Paris, France<br/>55,000 sqm Rhenofol CV';
		theDescs_fr[4] = 'Stade de France, Paris (France)<br/>55.000 m&sup2; Rhenofol CV';
		theImages[5] = 'gfx/header/DB_K_17.jpg';
		theDescs_de[5] = 'Lufthansa Aviation Center, Frankfurt<br/>7.000 qm Rhenofol CV';
		theDescs_en[5] = 'Lufthansa Aviation Center, Frankfurt, Germany<br/>7,000 sqm Rhenofol CV';
		theDescs_fr[5] = 'Lufthansa Aviation Center, Francfort<br />7.000 m&sup2; Rhenofol CV';
	}else if (set == 'dach_zub_service'){ //Dachbahnen Zubehör / Service
		theImages[0] = 'gfx/header/DB_K_01.jpg';
		theDescs_de[0] = ' ';
		theDescs_en[0] = ' ';
		theDescs_fr[0] = ' ';
		theImages[1] = 'gfx/header/DB_K_02.jpg';
		theDescs_de[1] = ' ';
		theDescs_en[1] = ' ';
		theDescs_fr[1] = ' ';
		theImages[2] = 'gfx/header/DB_K_03.jpg';
		theDescs_de[2] = ' ';
		theDescs_en[2] = ' ';
		theDescs_fr[2] = ' ';
		theImages[3] = 'gfx/header/DB_K_04.jpg';
		theDescs_de[3] = ' ';
		theDescs_en[3] = ' ';
		theDescs_fr[3] = ' ';
	}else if (set == 'licht'){ // Lichtsysteme
		theImages[0] = 'gfx/header/Licht_K_1.jpg';
		theDescs_de[0] = ' ';
		theDescs_en[0] = ' ';
		theDescs_fr[0] = ' ';
		theImages[1] = 'gfx/header/Licht_K_3.jpg';
		theDescs_de[1] = 'Parkdeck Handelskammer, D&uuml;sseldorf<br/>900 qm Rhenoplast';
		theDescs_en[1] = 'Parking deck of Chamber of Commerce Dusseldorf, Germany<br/>900 sqm Rhenoplast';
		theDescs_fr[1] = 'Parking de la Chambre de Commerce<br />D&uuml;sseldorf<br />900 m&sup2; Rhenoplast';
		theImages[2] = 'gfx/header/Licht_K_4.jpg';
		theDescs_de[2] = ' ';
		theDescs_en[2] = ' ';
		theDescs_fr[2] = ' ';
		theImages[3] = 'gfx/header/Licht_K_6.jpg';
		theDescs_de[3] = ' ';
		theDescs_en[3] = ' ';
		theDescs_fr[3] = ' ';
		theImages[4] = 'gfx/header/Licht_K_7.jpg';
		theDescs_de[4] = ' ';
		theDescs_en[4] = ' ';
		theDescs_fr[4] = ' ';
	}else if (set == 'saeure'){ // Saeureschutz
		theImages[0] = 'gfx/header/Saeu_K_1.jpg';
		theDescs_de[0] = ' ';
		theDescs_en[0] = ' ';
		theDescs_fr[0] = ' ';
		theImages[1] = 'gfx/header/Saeu_K_2.jpg';
		theDescs_de[1] = ' ';
		theDescs_en[1] = ' ';
		theDescs_fr[1] = ' ';		
	}else if (set == 'info'){ //Infocenter
		theImages[0] = 'gfx/header/Info_K_1.jpg';
		theDescs_de[0] = ' ';
		theDescs_en[0] = ' ';
		theDescs_fr[0] = ' ';
	}else if (set == 'kontakt'){ //Kontakt
		theImages[0] = 'gfx/header/Kontakt_K_2.jpg';
		theDescs_de[0] = ' ';
		theDescs_en[0] = ' ';
		theDescs_fr[0] = ' ';
	}else if(set == 'gewinnspiel'){
		theImages[0] = 'gfx/header/Gewinnspiel.jpg';
		theDescs_de[0] = ' ';
		theDescs_en[0] = ' ';
		theDescs_fr[0] = ' ';
	}else{
		theImages[0] = 'gfx/header/Allg_K_1.jpg';
		theDescs_de[0] = 'Parkdeck Handelskammer, D&uuml;sseldorf<br/>900 qm Rhenoplast';
		theDescs_en[0] = 'Parking deck of Chamber of Commerce Dusseldorf, Germany<br/>900 sqm Rhenoplast';
		theDescs_fr[0] = 'Parking de la Chambre de Commerce<br />D&uuml;sseldorf<br />900 m&sup2; Rhenoplast';
		theImages[1] = 'gfx/header/Allg_K_2.jpg';
		theDescs_de[1] = ' ';
		theDescs_en[1] = ' ';
		theDescs_fr[1] = ' ';
		theImages[2] = 'gfx/header/Allg_K_3.jpg';
		theDescs_de[2] = 'New Metropolis, Amsterdam, Holland<br/>4.300 qm Rhenofol CV';
		theDescs_en[2] = 'New Metropolis, Amsterdam, Netherlands<br/>4,300 sqm Rhenofol CV';
		theDescs_fr[2] = 'New Metropolis, Amsterdam, Pays-Bas<br/>4.300 m&sup2; Rhenofol CV';
		theImages[3] = 'gfx/header/Allg_K_4.jpg';
		theDescs_de[3] = 'Museum Ritter, Waldenbuch<br/>1.000 qm Rhepanol fk';
		theDescs_en[3] = 'Museum Ritter, Waldenbuch, Germany<br/>1,000 sqm Rhepanol fk';
		theDescs_fr[3] = 'Mus&eacute;e Ritter, Waldenbruch<br />1.000 m&sup2; Rhepanol fk';
		theImages[4] = 'gfx/header/Allg_K_5.jpg';
		theDescs_de[4] = 'salzburgarena, Salzburg, &Ouml;sterreich<br/>12.000 qm Rhepanol fk';
		theDescs_en[4] = 'salzburgarena, Salzburg, Austria<br/>12,000 sqm Rhepanol fk';
		theDescs_fr[4] = 'salzburgarena, Salzbourg<br />Autriche<br />12.000 m&sup2; Rhepanol fk';
		theImages[5] = 'gfx/header/DB_K_17.jpg';
		theDescs_de[5] = 'Lufthansa Aviation Center, Frankfurt<br/>7.000 qm Rhenofol CV';
		theDescs_en[5] = 'Lufthansa Aviation Center, Frankfurt, Germany<br/>7,000 sqm Rhenofol CV';
		theDescs_fr[5] = 'Lufthansa Aviation Center, Francfort<br />7.000 m&sup2; Rhenofol CV';						
	}
	
	var j = 0;
	var p = theImages.length;
	var preBuffer = new Array();

	for (i = 0; i < p; i++){
	   preBuffer[i] = new Image();
	   preBuffer[i].src = theImages[i];
	}

	var whichImage = Math.round(Math.random()*(p-1));
	document.getElementById('headergfx').src = theImages[whichImage];
	var text;
	if(lang == 'de') {
		text = theDescs_de[whichImage];
	}else if(lang == 'fr') {
		text = theDescs_fr[whichImage];	
	}else{
		text = theDescs_en[whichImage];
	}
	document.getElementById('headergfxdesc').innerHTML = text;
	if(text != ' '){
		document.getElementById('headergfxdescarrow').src= 'gfx/arrow_white.gif';
	}
}

function getRandomImage(elem,set) {
	var imgs = new Array();
	if(set == 'db'){
		imgs[0] = '/gfx/teaser_db1.jpg';
		imgs[1] = '/gfx/teaser_db2.jpg';
		imgs[2] = '/gfx/teaser_db3.jpg';
		imgs[3] = '/gfx/teaser_db4.jpg';
		imgs[4] = '/gfx/teaser_db5.jpg';
	}else if(set == 'ls'){
		imgs[0] = '/gfx/teaser_ls1.jpg';
		imgs[1] = '/gfx/teaser_ls2.jpg';
		imgs[2] = '/gfx/teaser_ls3.jpg';
		imgs[3] = '/gfx/teaser_ls4.jpg';
		imgs[4] = '/gfx/teaser_ls5.jpg';
	}else if(set == 'ss'){
		imgs[0] = '/gfx/teaser_ss1.jpg';
		imgs[1] = '/gfx/teaser_ss2.jpg';
		imgs[2] = '/gfx/teaser_ss3.jpg';
		imgs[3] = '/gfx/teaser_ss4.jpg';
	}
	
	var p = imgs.length;
	var random = Math.round(Math.random()*(p-1));
	elem.src = imgs[random];
	elem.setAttribute('onload','');
}

function UCC(xxx) { 
	for (i = 0; i < document.myForm.length; i++) { 
	document.myForm.elements[i].checked = xxx 
	
	} 
}
	  
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' ist erforderlich.\n'; }
  } if (errors) alert('Folgende Fehler sind aufgetreten:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function reset_value(the_element) {	
		the_element.value = '';
	}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function oeffnen(lang)
	{
	Fenster=window.open("sitemap.jsp?lang=" +lang,"Sitemap","scrollbars=yes,resizable=yes,width=1050,height=550");
	Fenster.moveTo(0,0)
}
function showHideNavi(folder, parent, root){
		var objs;
		if (document.all) {
			objs = document.all.tags("DIV");
		}else if (document.getElementsByTagName) {
			objs = document.getElementsByTagName("DIV");
		}else if (document.layers) {
			objs = document.layers["DIV"];
		}else {
			alert('Sorry, Your browser does not support our Main Navigation system');
		}

		for (var i=0; i < objs.length; i++) {
			if(objs[i].id.indexOf('subNavi_') > -1){
				if (objs[i].id == 'subNavi_'+folder || objs[i].id == 'subNavi_'+parent || objs[i].id == 'subNavi_'+root) {
					objs[i].style.display = "";
					objs[i].style.visibility = "";
				}else{
					objs[i].style.display = "none";
					objs[i].style.visibility = "hidden";
				}
			}			
		}
	}

function toggleVisibility(tbodyId) {
	if(document.getElementById(tbodyId).style.display == ''){
		document.getElementById(tbodyId).style.display = 'none';
		document.getElementById(tbodyId).style.visibility = 'hidden';
		document.getElementById('img_' + tbodyId).src= 'gfx/plus.gif';
	}else{
		document.getElementById(tbodyId).style.display = '';
		document.getElementById(tbodyId).style.visibility = '';
		document.getElementById('img_' + tbodyId).src= 'gfx/minus.gif';
	}
}	