defaultStatus = "evolver group";

var em_pop, em_pop2;
function em_popup(popurl,popopt){
	if(typeof(popurl) == "undefined") popopt = "width=400,height=450,scrollbars=1,";
	if(!popopt.match(/resizable=/)) popopt+= ",resizable=0";
	if(!popopt.match(/menubar=/)) popopt+= ",menubar=0";
	if(!popopt.match(/toolbar=/)) popopt+= ",toolbar=0";
	if(!popopt.match(/location=/)) popopt+= ",location=0";
	if(!popopt.match(/scrollbars?=/)) popopt+= ",scrollbars=0";
	if(popopt.match(/scrollbar=/)) popopt = popopt.replace(/scrollbar=/,"scrollbars=");

	var tmp_option = new Array();
	tmp_option = popopt.split(",");
	for(var i=0; i<tmp_option.length; i++){
		if(tmp_option[i] && !tmp_option[i].match(/location/)) eval(tmp_option[i]);
	}
	popopt = popopt.replace(/=1(,|$)/g,"=yes$1");
	popopt = popopt.replace(/=0(,|$)/g,"=no$1");
	if(document.layers){
		popopt = popopt.replace("width","innerWidth");
		popopt = popopt.replace("height","innerHeight");
	}
	if(popurl.indexOf("/(^|\/)_/") >= 0){
		popurl+= (popurl.indexOf("?") >= 0 ? "&" : "?")
						+"em_client=evo"
						+"&em_subclient=evo"
						+"&em_ssc=MSwwLDEsMCwxLDAsMSww";
	}
	popopt+= ",left="+Math.round((screen.availWidth-Number(width))/2);
	popopt+= ",top="+Math.round((screen.availHeight-Number(height))/2);
	if(window.name == "content"){
		if(!popurl.match("/print"))
			self.location.href = popurl+"&back=1";
		else{
			delete em_pop2;
			em_pop2 = open(popurl,'em_pop2',popopt);
			em_pop2.focus();
		}
	}else{
		if(top.name != "em_pop"
		&& typeof(em_pop) != "undefined"
		&& em_pop.closed == false
		&& navigator.platform.match(/Mac/) == null
		){
			em_pop.close();
			delete em_pop;
		}
		if(typeof(popurl) != "undefined"){
			delete em_pop;
			em_pop = open(popurl,'em_pop',popopt);
			em_pop.focus();
		}
	}
}

function em_check_suche(form){
	if(form.such){
		var test_such = form.such.value;
				test_such = test_such.replace(/(^| )(\+|-|AND|OR|NOT)( |$)/i,"");
				test_such = test_such.replace(/ /i,"");
		if(!test_such || form.such.value == "Suche"){
			alert("Geben Sie bitte einen Suchgbegriff ein!");
			form.such.focus(); return false;
		}
		if(test_such.length < 3){
			alert("Geben Sie bitte mindestens 3 Zeichen ein!");
			form.such.focus(); return false;
		}
	}
}

function em_field_focus(field,aktiv){
	if(!document.layers && field){
		field.style.border	= aktiv ? "1px solid #808080" : "1px solid #BFBFBF";
		field.style.color		= aktiv ? "#202020" : "#808080";
	}
}

function em_myonline_check(form){
	if(form.my_user){
		if(!form.my_user.value){
			alert("Geben Sie bitte Ihren Benutzernamen ein!");
			form.my_user.focus();
			return false;
		}
		if(!form.my_pass.value){
			alert("Geben Sie bitte Ihr Passwort ein!");
			form.my_pass.focus();
			return false;
		}
		if(form.my_pass.value.length < 3){
			alert("Geben Sie bitte mindestens 6 Zeichen ein!");
			form.my_pass.focus();
			return false;
		}
	}
	return true;
}

if(top.name != "main" && top.name != "pop"){
	top.name = "main";
}

function ftvlaunch(video,quality,pid) {
	var LeftPosition = (screen.width) ? (screen.width-665)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-430)/2 : 0;
	var popwin = open('http://www.zoomin.tv/videoplayer/index.cfm?id='+video+'&mode=normal&quality='+quality+'&pid='+pid,'MTV6_window','toolbar=no,width=665,height=430,top='+TopPosition+',left='+LeftPosition+',directories=no,status=no,statusbar=0,scrollbars=no,resizable=no,menubar=no');
	if(popwin) popwin.focus();
}



