function weiterzu( url){
    window.location = url
}

hasChild = false;
function openWindow(file, w, h){
	wi = 600;
	he = 400;
	if(w!=""&&w!=null){
		wi = w;
	}
	if(h!=""&&h!=null){
		he = h;
	}
	winl = (screen.width - wi) / 2;
	wint = (screen.height - he) / 2;
	myWindow = window.open(file,'myWin','width='+wi+',height='+he+',top='+wint+',left='+winl+',resizable=no');
	myWindow.focus();
	hasChild = true;
}
function cleanUp(){
	if(hasChild){
		myWindow.close();
	}
}
function getLanguage(){
	var l = document.location+"";
	if(l.indexOf("/de/")!=-1){
		l = "de";
	}else{
		l = "en";
	}
	return l;
}

function showMovie(file, w, h){
	if(w!=""&&w!=null){
		w = (w*1)+40;
	}
	if(h!=""&&h!=null){
		h = (h*1)+100;
	}
	openWindow("../../script/detail_mov.php?f="+file+"&l="+getLanguage()+"&h="+h+"&w="+w, w, h);
}
function hearMp3(file, w, h){
	openWindow("../../script/detail_mp3.php?f="+file+"&l="+getLanguage(), w, h);
}
function showPicture(file, w, h, c, i){
	var _ci = 0;
	var _in = 0;
	if(c!=""&&c!=null){
		_ci = c;
	}
	if(i!=""&&i!=null){
		_in = i;
	}
	
	openWindow("../../script/detail_img.php?f="+file+"&l="+getLanguage()+"&ci="+_ci+"&in="+_in, w, h);
}
function checkForEmail(phrase, field){
	var s = field.value;
	if(s.indexOf(".")>0&&s.indexOf("@")>0){
		return true;
	}
	alert(phrase);
	field.focus();
	return false;
}

