// JavaScript Document
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function AbGehts () {  
 document.form.submit(); 
 }

function CheckInput () {
  for (i = 0; i < document.forms[0].elements.length; ++i)
    if (document.forms[0].elements[i].value == "") {
      alert("Es wurden nicht alle Felder ausgefuellt!");
      document.forms[0].elements[i].focus();
      return false;
    }
  return true;
}

 function feldleer(feld)
 {
 	if (feld.value != "")
 	{
 		return true;
 	}
 	else
 	{
 		return false;
 	}
 }



 function ueberpruefen(formular)
 {
 		if (feldleer(formular.wert_land) == false)
 		{
 		alert ("Bitte Land eingeben! ")
 		formular.wert_land.focus();
 		return false;
 		}	
 
		if (feldleer(formular.wert_kanton) == false)
 		{
 		alert ("Bitte Kanton eingeben! ")
 		formular.wert_kanton.focus();
 		return false;
 		}	
 
 	if (feldleer(formular.d_wohnflache) == false)
 		{
 		alert ("Bitte Wohnfläche eingeben! ")
 		formular.d_wohnflache.focus();
 		return false;
 		}
 	if (feldleer(formular.d_grundflache) == false)
 		{
 		alert ("Bitte Grundstückfläche eingeben!")
 		formular.d_grundflache.focus();
 		return false;
 		}

 	if (feldleer(formular.d_preis) == false)
 		{
 		alert ("Bitte Preis eingeben!")
 		formular.d_preis.focus();
 		return false;
 		}

 	return true;
 }
 

 function openPopup(id) {              
   window.open( id, "Popupfenster", "width=800,height=900,left=200,top=100,status=yes, scrollbars=yes,resizable=yes");   
   

		  
		  } 

			




function sicher() {
var chk = window.confirm("!! Achtung !! Wirklich ganzer Datensatz löschen ?");
return(chk);
}



/* This script was written by Daniel Bauer: www.daniel-bauer.com */
/* you may use this script freely for any private, non-commercial use. */
/* This note must remain intact. */
/* For commercial use of this script or if you are looking for a professional web programmer */
/* please contact Daniel Bauer at http://www.daniel-bauer.com/en/contact/index.html */
/* If you find this script useful, please consider sending */
/* a small sum of money to Daniel Bauer, Spalenvorstadt 9, CH-4051 Basel (Switzerland) */
/* Use of this script is at your own risk: NO GUARANTEE, NO SUPPORT, NO WARRANTY */

function schicken(adr, dom) {
    arr_dom=dom.split(".");
    domstr=arr_dom[0];
    for (i=1; arr_dom[i]!=null; i++) {
        domstr=domstr+" [dot] "+arr_dom[i];
    }
    document.write("<a href=\"click to send\" onClick=\"ersetz(this, \'"+adr+"\', \'"+dom+"\')\">"+adr+" [at] "+domstr+"</a>")
}

                   



function ersetz(ref, adr, dom) {
    ref.href="mailto:"+adr+"@"+dom;
}


