function chkFormular()


  {
  

  
   if(document.formad.name.value == "")
    {
     alert("Bitte geben Sie Ihren Namen an!");
     document.formad.name.focus();
     return false;
    }
	
   if(document.formad.fromEmail.value == "")
    {
     alert("Bitte geben Sie Ihre Email-Adresse an!");
     document.formad.fromEmail.focus();
     return false;
    }

	
   if(document.formad.text.value == "")
    {
     alert("Bitte geben Sie einen Text ein!");
     document.formad.text.focus();
     return false;
    }


    var invalid = "/"; // Invalid character is a /

    if (document.formad.text.value.indexOf(invalid) > -1) {
    alert("Folgendes Zeichen ist im Feld Mitteilungen nicht erlaubt: / ");
    return false;
    }
	

	

	

  }
  
function emailvalidation(entered, alertbox)
{

with (entered)
{
apos=value.indexOf("@"); 
dotpos=value.lastIndexOf(".");
lastpos=value.length-1;
if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
{if (alertbox) {alert(alertbox);} return false;}
else {return true;}
}
} 

function CaricaFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}
  
  