
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function do_print(){
	window.parent.mainFrame.focus();
	window.parent.mainFrame.print();
}

function do_contact(theURL){
	window.location.href="kontakt.php?"+theURL;
	
}

function do_sendafriend(theURL){
	window.location.href="empfehlen.php?"+theURL;
	
}

function do_agentid(myid){
	document.getElementById("key").value = myid;
	document.getElementById("key").focus();
	document.getElementById("key").className = "formplainGelb";
}

function ClearField(fieldname){
	if(document.getElementsByName(fieldname)[0].value=='Email'){
		document.getElementsByName(fieldname)[0].value = "";
	}
}


function DelMerker(merker_id,text){
	mytext = text;
	check = confirm('Wollen Sie '+mytext+' wirklich aus der Merkliste löschen?')
	if(check==true){
		document.getElementById("merker_id").value = merker_id;
		document.delform.submit();
	}
	
}


function DelSuchID(such_id,text){
	mytext = text;
	check = confirm('Wollen Sie '+mytext+' wirklich aus Ihrem Suchprofil löschen?')
	if(check==true){
		document.getElementById("suchprofil_id").value = such_id;
		document.delform.submit();
	}
	
}


function saveSuche(){
	document.getElementById("saveit").value = "true";
	if(document.getElementById("titel").value == ""){
		alert('Bitte Titel für das Suchprofil angeben');
	}else{
		document.suche.submit();	
	}
	
}

function CheckPassword(){
	pass1 = document.getElementById("pass1").value 
	pass2 = document.getElementById("pass2").value 
	
	if(pass1 == ""){
		alert("Bitte geben Sie ein Passwort ein");
	}
	else if(pass1 == pass2){
		document.profile.submit();
				
	}else{
		alert("Passwort Fehler, die Eingabe war nicht identisch!")
		//alert('Passwörter sind nicht identisch, bitte korrigieren');
	}
}

