function getPos(id){
	window.alert(document.getElementById(id).offsetLeft);
}
function showNavLevel1(id){
	for(a=0; a<20; a++){
		hide = "area_nav_level_1_"+a;
		if(obj = document.getElementById(hide))
			obj.style.visibility = "hidden";
	}
	area = "area_nav_level_1_"+id;
	li = "li_nav_level_1_"+id;
	if(obj = document.getElementById(area)){
		obj.style.visibility = "visible";
		obj.style.left = (document.getElementById(li).offsetLeft-1)+"px";
	}
}
function hideNavLevel1(id){
	area = "area_nav_level_1_"+id;
	document.getElementById(area).style.visibility = "hidden";
}
function navLevel2Location(nl_0, nl_1){
	nl_2 = document.getElementById("select_nav_level_2").value;
	window.location.href = "index.php?nl_0="+nl_0+"&nl_1="+nl_1+"&nl_2="+nl_2;
}
function checkForm(){
	result = true;
	inputName = document.getElementById("name");
	inputFirstname = document.getElementById("firstname");
	inputCompany = document.getElementById("company");
	inputStreet = document.getElementById("street");
	inputCity = document.getElementById("city");
	inputPhone = document.getElementById("phone");
	inputEmail = document.getElementById("email");
	input = new Array(inputName, inputFirstname, inputCompany, inputStreet, inputCity, inputPhone, inputEmail);
	for(a=0; a<input.length; a++){
		if(input[a] && input[a].value == ""){
			input[a].style.backgroundColor = "#f8f9fb";
			result = false;
		} else {
			input[a].style.backgroundColor = "#ffffff";
		}
	}
	return result;
}
function setExternalLinks(){
	var all = document.getElementsByTagName("a");
	for(var a=0; a<all.length; a++){
		var href = all[a].href;
		if(href.substr(0, 11) == "http://www." && href.substr(0, 26) != "http://www.binnenhafen.de/")
			all[a].target = "_blank";
	}
}
function adjustWindow(width, height){
	window.resizeTo(width, height);
}
function enlargeFile(file){
	window.open("file.php?file="+file, "File", "width=100, height=100");
}