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,lang){

	if(lang=="suche"){
		thePath = eval("'/images/' + which + '_hi_de.gif'");

	}else{
		thePath = eval("'../../images/' + which + '_hi_' + lang + '.gif'");
	}
	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,lang){

	if(lang=="suche"){
		thePath = eval("'/images/' + which + '_lo_de.gif'");
	}else{
		thePath = eval("'../../images/' + which + '_lo_' + lang + '.gif'");
	}


	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 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 (Name.value == '') {
			Name.focus();
			say('Bitte geben Sie Ihre Namen an.');
			return false;
		}

		if (Vorname.value == '') {
			Vorname.focus();
			say('Bitte geben Sie Ihren Vornamen an.');
			return false;
		}

		if (Firma.value == '') {
			Firma.focus();
			say('Bitte geben Sie Ihre Firma an.');
			return false;
		}

		if (Land.value == '') {
			Land.focus();
			say('Bitte geben Sie Ihr Land an.');
			return false;
		}
		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 (Name.value == '') {
			Name.focus();
			say_en('Please enter your name.');
			return false;
		}

		if (Vorname.value == '') {
			Vorname.focus();
			say_en('Please enter your first name.');
			return false;
		}

		if (Firma.value == '') {
			Firma.focus();
			say_en('Please enter the name of your company.');
			return false;
		}

		if (Land.value == '') {
			Land.focus();
			say_en('Please enter your country.');
			return false;
		}
		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 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=550,scrollbars=no,resizeable=yes,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";

}






