// Parallaxis 2005 

function fZoom(imageName,scroll,bildunterschrift) { 
 if (fZoom.arguments.length>2) {
  if (scroll == 'yes') {
    newWindow = window.open("","newWindow","width="+599+",height="+400+",scrollbars=yes");
  } 
  else {
    newWindow = window.open("","newWindow","width="+599+",height="+400+",scrollbars=no,resizable=yes");
  }
 } 

 else{
  if (scroll == 'no'){
   newWindow = window.open("","newWindow","width="+599+",height="+400+",scrollbars=no resizable=no");
  }
  else {
   newWindow = window.open("","newWindow","width="+599+",height="+400+",scrollbars=yes,resizable=no");
  }
 }

 newWindow.document.open();
 newWindow.document.writeln('<html><head><title>Theiner</title>');
 newWindow.document.writeln('<link rel=stylesheet type="text/css" href="parallaxis.css"></head>');
 newWindow.document.writeln('<body topmargin="0" id="popup" marginheight="0" leftmargin="0" marginleft="0"  bgcolor="#F9F5DA" onload="window.resizeTo(document.bild.width,document.bild.height+30);" onBlur="self.close()">');
 newWindow.document.writeln('<p align="center"><a href="javascript:self.close()"><img src="'+imageName+'" name="bild" align="absmiddle" border=0></a>'); 

 if (fZoom.arguments.length>2) {
 newWindow.document.writeln('<b>'+ bildunterschrift+'</b>')
 }

 newWindow.document.write('</p></body></html>');
 newWindow.document.close();
 newWindow.focus(); 

 if(navigator.appName == "Microsoft Internet Explorer") {
  var bildhoehe = newWindow.document.bild.height;
  var bildbreite = newWindow.document.bild.width;
  {
  if (bildhoehe>600) { newWindow.resizeTo(bildbreite+27,600);}
  else {
   if (fZoom.arguments.length>2) { 
    newWindow.resizeTo(bildbreite,bildhoehe+50); }
   else { 
    newWindow.resizeTo(bildbreite,bildhoehe+29) }
   }
  }
 }
}



function chkName()
		{
		if(document.Anfrage.Nachname.value == "")
		  {
		    alert("Bitte geben Sie Ihren Namen und Vornamen ein!");
		    document.Anfrage.Nachname.focus();
		    return false;
		  }
		else
		  return true;
		}

	function chkAdresse()
		{
		if((document.Anfrage.Strasse.value == "") 
			|| (document.Anfrage.PLZ.value == "")
			|| (document.Anfrage.Ort.value == "")
			|| (document.Anfrage.Land.value == ""))
		  {
		  alert("Bitte geben Sie Ihre komplette Adresse ein!");
		  document.Anfrage.Strasse.focus();
		  return false;
		  }
		else
		  return true;
		}
		
		
		
		
		
		
		
		function chkForm()
		{
		  var valid
		  valid = true;
		  if(!chkName())  	//Namen generell ueberpruefen
		    {
		    valid = false;
		    return valid;
		    exit;
		    }
					//Abfrage ob Email, Fax oder Postversand
		  for (i=0;i<=2;i++)
		    {
		      if (document.Anfrage.antwort[i].checked==1)
			var Eingabe = document.Anfrage.antwort[i].value;
		    }
		  switch(Eingabe)
		    {
		      case "per Email":
			if(!chkEmail())		//Email-Anfrage
			  {
			  valid = false;
			  return valid;
			  }
			break;
		      case "per Fax":
			if(!chkFax())		//Fax-Anfrage
			  {
			  valid = false;
			  return valid;
			  }
			break;
		      case "per Post":
			if(!chkAdresse())	//Post-Anfrage
			  {
			  valid = false;
			  return valid;
			  }
			break;
		    }
		  return valid;
		}


	function chkName()
		{
		if(document.Anfrage.Nachname.value == "")
		  {
		    alert("Bitte geben Sie Ihren Namen und Vornamen ein!");
		    document.Anfrage.Nachname.focus();
		    return false;
		  }
		else
		  return true;
		}

	function chkAdresse()
		{
		if((document.Anfrage.Strasse.value == "") 
			|| (document.Anfrage.PLZ.value == "")
			|| (document.Anfrage.Ort.value == "")
			|| (document.Anfrage.Land.value == ""))
		  {
		  alert("Bitte geben Sie Ihre komplette Adresse ein!");
		  document.Anfrage.Strasse.focus();
		  return false;
		  }
		else
		  return true;
		}

	function chkEmail()
		{
		var adress = document.Anfrage.Email.value;
		if ((adress =="")
			|| (adress.indexOf ('@') == -1)
			|| (adress.indexOf ('.') == -1))
		 {
		  alert("Bitte geben Sie Ihre Email-Adresse ein!");
		  document.Anfrage.Email.focus();
		  return false;
		  exit;
		 }
		else
		  return true;
		}

	function chkFax()
		{
		if(document.Anfrage.Telefax.value == "")
		 {
		  alert("Bitte geben Sie Ihre Fax-Nummer ein!");
		  document.Anfrage.Telefax.focus();
		  return false;
		  exit;
		 }
		else
		  return true;
		}
		
		
		function map24_removeDefaultValues(){
			if (document.link2map24.sstreet.value == 'Straße') 	document.link2map24.sstreet.value 	= '';
			if (document.link2map24.szip.value 	  == 'PLZ') 		document.link2map24.szip.value 		= '';
			if (document.link2map24.scity.value   == 'Ort') 		document.link2map24.scity.value 	= '';
		
			}	
			
			
	function fOpenKarte(url)
	{
	neuesFenster=open(url,"Theiner","width=541,height=480,scrollbars=1,status=0,resizable=0,toolbar=0");
	offX=screen.availWidth;
	offY=screen.availHeight;
	//neuesFenster.moveTo(((offX/2)-(720/2)-6),((offY/2)-(420/2)-20));
	neuesFenster.moveTo(((offX/2)-(370/2)),((offY/2)-(270/2)));
	neuesFenster.focus();		
}		
