function BrowserCheck() {
	var os= navigator.platform
	if (os.indexOf("Mac")!=-1) {
		this.os = "mac"
	} else {
		this.os = "pc"
	}
	var b = navigator.appName;
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.v = parseInt(navigator.appVersion);
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0);
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0);
}
is = new BrowserCheck();

function showNav(which){

	
	thePath = eval("'images/' + which + '_hi.jpg'");
	document.images[which].src = thePath;

	if ((is.os == "pc") && (is.ie4 || is.ie5)){
		theLayer = eval(which + '_Div.style');
		metaNavLayer = metaNavDiv.style;
	}else{
		theLayer = eval('document.getElementById("' + which + '_Div").style');
		metaNavLayer = document.getElementById("metaNavDiv");
	}

	theOne = GetElmParent(which);
	if (theOne == metaNavLayer){
		left = 585;
	}else{
		left = 0;
	}
	theLPos=document.images[which].offsetLeft + left;
	theLayer.left=theLPos + "px";
	theLayer.visibility = "visible";
}

function hideNav(which){

	thePath = eval("'images/' + which + '_lo.jpg'");
	document.images[which].src = thePath;
	
	if (is.ie4 || is.ie5){
		theLayer = eval(which + '_Div.style');
	}else{
		theLayer = eval('document.getElementById("' + which + '_Div").style');
	}
	theLayer.visibility = "hidden";
}




function GetElmParent(which) {
	if (document.images[which] && document.images[which].parentNode.parentNode){
		return document.images[which].parentNode.parentNode;
	} else if (document.images[which] && document.images[which].parentElement.parentElement){
		return document.images[which].parentElement.parentElement.name;
	} else {
		return null;
	}
}

function hiLite(which){
	theLNK = GetParent(which);
	theLNK.className = "mainNavSingleAct";
}
function loLite(which){
	theLNK = GetParent(which);
	theLNK.className = "mainNavSingle";
}

function GetParent(which) {
	if (which && which.parentNode.parentNode){
		return which.parentNode;
	} else if (which && which.parentElement.parentElement){
		return which.parentElement.parentElement.name;
	} else {
		return null;
	}
}

function say(s) {
	errstr = 'Sie haben das Formular noch nicht vollständig ausgefüllt.\n' + s;
	alert(errstr);
}
function say_en(s) {
	errstr = 'You did not fill in the form correctly.\n' + s;
	alert(errstr);
}
function say_fr(s) {
	errstr = 'Le formulaire est incorrect.\n' + s;
	alert(errstr);
}

function verify_newnl() {
	with (document.forms.newnl) {
		if (typeof(Email) != "undefined") {
			if (Email.value == '') {
				Email.focus();
				say('Bitte geben Sie Ihre E-Mail Adresse an.');
				return false;
			}
			if (Email.value.indexOf('@')<0) {
				Email.focus();
				say('Bitte geben Sie eine gültige E-Mail Adresse an.');
				return false;
			}
		}
  		return true;

	}
}
function verify_newnl_en() {
	with (document.forms.newnl) {
		if (typeof(Email) != "undefined") {
			if (Email.value == '') {
				Email.focus();
				say_en('Please enter your email-address.');
				return false;
			}
			if (Email.value.indexOf('@')<0) {
				Email.focus();
				say_en('Please enter a valid email-address.');
				return false;
			}
		}
  		return true;

	}
}
function verify_de() {
	with (document.forms.kontaktform) {
		if (typeof(Mail) != "undefined") {
			if (Mail.value == '') {
				Mail.focus();
				say('Bitte geben Sie Ihre E-Mail Adresse an.');
				return false;
			}
			if (Mail.value.indexOf('@')<0) {
				Mail.focus();
				say('Bitte geben Sie eine gültige E-Mail Adresse an.');
				return false;
			}
		}
  		return true;

	}
}
function verify_en() {
	with (document.forms.kontaktform) {
		if (typeof(Mail) != "undefined") {
			if (Mail.value == '') {
				Mail.focus();
				say_en('Please enter your email-address.');
				return false;
			}
			if (Mail.value.indexOf('@')<0) {
				Mail.focus();
				say_en('Please enter a valid email-address.');
				return false;
			}
		}
  		return true;

	}
}

function verify_fr() {
	with (document.forms.contactform) {
		if (typeof(Mail) != "undefined") {
			if (Mail.value == '') {
				Mail.focus();
				say_fr('Saisissez une adresse mail');
				return false;
			}
			if (Mail.value.indexOf('@')<0) {
				Mail.focus();
				say_fr('Votre adresse mail est invalide');
				return false;
			}
		}
  		return true;

	}
}

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function printer() {
	url = location.href;
	var Printer = window.open(url+ "&print=true","Printer","width=800,height=600,scrollbars=yes,resizeable=yes,menubar=yes,status=no,top=50,left=100");
	Printer.focus();
}

function legal(url) {
	window.open(url,"Legal","width=500,height=450,scrollbars=yes,resizeable=no,menubar=yes,status=yes,top=50,left=100");
}
function open_zoom(url) {
	window.open("/html/de/static/zoom.html#" + url,"","width=366,height=320,scrollbars=no,resizeable=no,menubar=no,status=yes,top=50,left=100");
}

function getDetail(url) {
	window.open(url,"","width=366,height=520,scrollbars=no,resizeable=no,menubar=no,status=yes,top=50,left=100");
}


//AJAX
function makeRequest(url) {
	if (window.XMLHttpRequest) {
		http_request = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	}

	if (!http_request) {
		alert('Giving up:( Cannot create an XMLHTTP instance');
		return false;
	}
//	http_request.onreadystatechange = parseXML;
	http_request.open('GET', url, true);
	http_request.send(null);
}

function track(trackid){
	makeRequest("../../jobadmin/track.php?trackid=" + trackid);
}



function showWorld(which){
	whichswitch="weltImg";
	thePath = eval("'../../images/welt_' + which + '.gif'");
	document.images[whichswitch].src = thePath;

}function hideWorld(which){
	whichswitch="weltImg";
	thePath = eval("'../../images/welt_"+act+".gif'");
	if(which!=act){ document.images[whichswitch].src = thePath; }

}
function showEurope(which){
	whichswitch="weltImg";
	thePath = eval("'../../images/europa_' + which + '.gif'");
	document.images[whichswitch].src = thePath;

}function hideEurope(which){
	whichswitch="weltImg";
	thePath = eval("'../../images/europa_"+act+".gif'");
	if(which!=act){ document.images[whichswitch].src = thePath;}

}





function showTXT(which){
	if ((is.os == "pc") && (is.ie4 || is.ie5)){
		theLayer = eval('txt_' + which + '.style');
	}else{
		theLayer = eval('document.getElementById("txt_' + which + '").style');
	}

	theOne = eval('document.getElementById("img_' + which + '")');
	theParent = eval('document.getElementById("flash")');
	theLPos=theOne.offsetLeft;
	theTPos=theParent.offsetTop + 79;
	theLayer.left=theLPos + "px";
	theLayer.top=theTPos + "px";
	theLayer.visibility = "visible";

}
function hideTXT(which){
	if (is.ie4 || is.ie5){
		theLayer = eval('txt_' + which + '.style');
	}else{
		theLayer = eval('document.getElementById("txt_' + which + '").style');
	}
	theLayer.visibility = "hidden";

}

function reg(url){
	window.open(url);
}

function  fnControleChamps(monForm)
{
	with (monForm)
	{
		for (i=0;i<elements.length;i++){
			sNom = elements[i].name;
			if (elements[i].value == "")
			{
				alert("Le champ " + sNom + " est obligatoire.");
				elements[i].focus();
				return false;
			}
		}
	}
	return true;
}

function menuderoulant(cadre,selection){
	eval(cadre+".location='"+selection.options[selection.selectedIndex].value+"'");
}

function RunFoo(swf, hauteur, largeur, couleur, nom, version) {
	document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+",0,0,0\" width=\""+hauteur+"\" height=\""+largeur+"\" id=\""+nom+"\" align=\"middle\">\n");
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n");
	document.write("<param name=\"movie\" value=\""+swf+"\" /><param name=\"quality\" value=\"high\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"bgcolor\" value=\""+couleur+"\" /><embed src=\""+swf+"\" quality=\"high\" bgcolor=\""+couleur+"\" width=\""+hauteur+"\" height=\""+largeur+"\" name=\""+nom+"\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n");
	document.write("</object>\n");
}

function PopupCenter(img) {
	titre="Image";
	w=open("",'image','width=50,height=50,toolbar=no,scrollbars=no,resizable=yes');
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+30,document.images[0].height+50); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 rightMargin=0 bottommargin=0 topMargin=0 marginwidth=0 marginheight=0><a href=\"javascript:self.close()\"><IMG src='"+img+"' border=0></a>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function pop_it(the_form) {
	my_form = eval(the_form)
	window.open("./wait.php", "popup", "height=20,width=400,menubar='no',toolbar='no',location='no',status='no',scrollbars='no'");
	my_form.target = "popup";
	my_form.submit();
}