/*
nv_01_lo = new Image();
nv_02_lo = new Image();
nv_03_lo = new Image();
nv_04_lo = new Image();
nv_05_lo = new Image();
nv_06_lo = new Image();
nv_07_lo = new Image();
nv_08_lo = new Image();
nv_01_hi = new Image();
nv_02_hi = new Image();
nv_03_hi = new Image();
nv_04_hi = new Image();
nv_05_hi = new Image();
nv_06_hi = new Image();
nv_07_hi = new Image();
nv_08_hi = new Image();
nv_01_lo.src = "../../images/nv_01_lo.gif";
nv_02_lo.src = "../../images/nv_02_lo.gif";
nv_03_lo.src = "../../images/nv_03_lo.gif";
nv_04_lo.src = "../../images/nv_04_lo.gif";
nv_05_lo.src = "../../images/nv_05_lo.gif";
nv_06_lo.src = "../../images/nv_06_lo.gif";
nv_07_lo.src = "../../images/nv_07_lo.gif";
nv_08_lo.src = "../../images/nv_08_lo.gif";
nv_01_hi.src = "../../images/nv_01_hi.gif";
nv_02_hi.src = "../../images/nv_02_hi.gif";
nv_03_hi.src = "../../images/nv_03_hi.gif";
nv_04_hi.src = "../../images/nv_04_hi.gif";
nv_05_hi.src = "../../images/nv_05_hi.gif";
nv_06_hi.src = "../../images/nv_06_hi.gif";
nv_07_hi.src = "../../images/nv_07_hi.gif";
nv_08_hi.src = "../../images/nv_08_hi.gif";
*/
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.gif'");

	}else{
		thePath = eval("'../../images/' + which + '_hi.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 = 479;
	}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.gif'");
	}else{
		thePath = eval("'../../images/' + which + '_lo.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 open_zoom(num,lang,img,head) {
	window.open("/html/" + lang + "/static/zoom.php?num=" + num + "&img=" + img + "&head=" + head,"Zoom","width=368,height=420,scrollbars=no,resizeable=no,menubar=no,status=yes,top=50,left=100");
}

function open_reg(lang, file) {
	window.open("/html/" + lang + "/static/register.php?file=" + file + "","Registration","width=368,height=420,scrollbars=no,resizeable=no,menubar=no,status=yes,top=50,left=100");
}
function verify_reg() {
	with (document.forms.reg) {
		if (typeof(name) != "undefined") {
			if (name.value == '') {
				name.focus();
				say_en('Bitte geben Sie Ihren Namen ein.');
				return false;
			}
		}
		if (typeof(email) != "undefined") {
			if (email.value == '') {
				email.focus();
				say_en('Bitte geben Sie Ihre E-Mail-Adresse an.');
				return false;
			}
			if (email.value.indexOf('@')<0) {
				email.focus();
				say_en('Bitte geben Sie eine gültige E-Mail-Adresse an.');
				return false;
			}
		}
  		return true;

	}
}
function verify_reg_en() {
	with (document.forms.reg) {
		if (typeof(name) != "undefined") {
			if (name.value == '') {
				name.focus();
				say_en('Please enter your name.');
				return false;
			}
		}
		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 open_imagefilm() {
	window.open("static/film.html","ImageFilm","width=480,height=460,scrollbars=no,menubar=no,status=yes,top=50,left=100");

}
