function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function jumpMenu(targ,selObj,restore){
	startopen = window.open("","","");
	eval("startopen.location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function box_switch(aktiv, passiv){
		var obj = MM_findObj(aktiv);
		obj.style.display = 'block';

		var obj = MM_findObj(passiv);
		obj.style.display = 'none';
}

	function check_login(type) {
		var missing	='missing!';
		if (type==1){
			var missing	='fehlt!';
		}
		var status = 0

		if ((document.login.user.value.length=="0") || (document.login.user.value==missing)) {
		document.login.user.style.backgroundColor = "#dadad8";
		document.login.user.value = missing;
		status = 1;
		}

		if ((document.login.pass.value.length=="0") || (document.login.pass.value==missing)) {
		document.login.pass.style.backgroundColor = "#dadad8";
		document.login.pass.value = "missing";
		status = 1;
		}

	return !status;
	}

function check_mail(type) {
		var missing	='missing!';
		if (type==1){
			var missing	='fehlt!';
		}
		var status = 0

		if ((document.login.user.value.length=="0") || (document.login.user.value==missing)) {
		document.login.user.style.backgroundColor = "#dadad8";
		document.login.user.value = missing;
		status = 1;
		}

	return !status;
	}
	
	function check_login_mail() {
		var status = 0

		if ((document.pwd.email.value.length=="0") || (document.pwd.email.value=="#")) {
		document.pwd.email.style.backgroundColor = "#dadad8";
		status = 1;
		}


	return !status;
	}

	function setFirst_login(strField) {
		document.login[strField].select()
		document.login[strField].style.backgroundColor = "#FFFFFF";
		document.login[strField].style.borderColor = "#666666";

	}

	function setFirst_profil(strField) {
		document.profil[strField].select()
		document.profil[strField].style.backgroundColor = "#FFFFFF";
	}

	function setMenue_profil(strField) {
		document.profil[strField].style.backgroundColor = "#FFFFFF";
	}

	function check_user(type) {
		var missing	='missing!';
		if (type==1){
			var missing	='fehlt!';
		}
		var status = 0
		
		
		if ((document.profil.firstname.value.length=="0") || (document.profil.firstname.value==missing)) {
		document.profil.firstname.style.backgroundColor = "#dadad8";
		document.profil.firstname.value = missing;
		status = 1;
		}
		
		if ((document.profil.surname.value.length=="0") || (document.profil.surname.value==missing)) {
		document.profil.surname.style.backgroundColor = "#dadad8";
		document.profil.surname.value = missing;
		status = 1;
		}
		
		if (document.profil.country.value.length=="0") {
		document.profil.country.style.backgroundColor = "#dadad8";
		status = 1;
		}
		
		if ((document.profil.email.value.length=="0") || (document.profil.email.value==missing)) {
		document.profil.email.style.backgroundColor = "#dadad8";
		document.profil.email.value = missing;
		status = 1;
		}
		
		if ((document.profil.password.value.length=="0") || (document.profil.password.value==missing)) {
		document.profil.password.style.backgroundColor = "#dadad8";
		document.profil.password.value = missing;
		status = 1;
		}
		
		if ((document.profil.password_confirm.value.length=="0") || (document.profil.password_confirm.value==missing)) {
		document.profil.password_confirm.style.backgroundColor = "#dadad8";
		document.profil.password_confirm.value = missing;
		status = 1;
		}
		
		if (document.profil.password_confirm.value!=document.profil.password.value) {
		document.profil.password_confirm.style.backgroundColor = "#dadad8";
		document.profil.password_confirm.value = missing;
		document.profil.password.style.backgroundColor = "#dadad8";
		document.profil.password.value = missing;
		status = 1;
		}

		
		if ((document.profil.adress.value.length=="0") || (document.profil.adress.value==missing)) {
		document.profil.adress.style.backgroundColor = "#dadad8";
		document.profil.adress.value = missing;
		status = 1;
		}
		
		if ((document.profil.zip.value.length=="0") || (document.profil.zip.value==missing)) {
		document.profil.zip.style.backgroundColor = "#dadad8";
		document.profil.zip.value = missing;
		status = 1;
		}
		
		if ((document.profil.city.value.length=="0") || (document.profil.city.value==missing)) {
		document.profil.city.style.backgroundColor = "#dadad8";
		document.profil.city.value = missing;
		status = 1;
		}
		
		
		if ((document.profil.company.value.length=="0") || (document.profil.company.value==missing)) {
		document.profil.company.style.backgroundColor = "#dadad8";
		document.profil.company.value = missing;
		status = 1;
		}
		
		if ((document.profil.media_title.value.length=="0") || (document.profil.media_title.value==missing)) {
		document.profil.media_title.style.backgroundColor = "#dadad8";
		document.profil.media_title.value = missing;
		status = 1;
		}

		if ((document.profil.media_type.value.length=="0") || (document.profil.media_type.value==missing)) {
		document.profil.media_type.style.backgroundColor = "#dadad8";
		document.profil.media_type.value = missing;
		status = 1;
		}

	return !status;
	}

	function check_user_c(type) {
		var missing	='missing!';
		if (type==1){
			var missing	='fehlt!';
		}
		var status = 0
		
		
		if ((document.profil.firstname.value.length=="0") || (document.profil.firstname.value==missing)) {
		document.profil.firstname.style.backgroundColor = "#dadad8";
		document.profil.firstname.value = missing;
		status = 1;
		}
		
		if ((document.profil.surname.value.length=="0") || (document.profil.surname.value==missing)) {
		document.profil.surname.style.backgroundColor = "#dadad8";
		document.profil.surname.value = missing;
		status = 1;
		}
			
		if ((document.profil.email.value.length=="0") || (document.profil.email.value==missing)) {
		document.profil.email.style.backgroundColor = "#dadad8";
		document.profil.email.value = missing;
		status = 1;
		}
		
	return !status;
	}
	
	function setFirst_contact(strField) {
		document.contact[strField].select()
	}
