
function change_nav(img_id,img_name)
{
	document.images[img_id].src = 'img/nav/' + img_name;
}


function FrontPage_Form1_Validator(theForm)
{
  

  if (FrontPage_Form1.email.value.length < 4)
  {
    alert("Bitte geben Sie Ihre E-Mail Adresse ein.");
    FrontPage_Form1.email.focus();
    return (false);
  }


 if (!EMail(FrontPage_Form1.email.value))
  {
    alert("Bitte überprüfen Sie Ihre E-Mail Adresse.");
    FrontPage_Form1.email.focus();
    return (false);
  }

	function EMail(s)
	{
	 var a = false;
	 var res = false;
	 if(typeof(RegExp) == 'function')
	 {
	  var b = new RegExp('abc');
	  if(b.test('abc') == true){a = true;}
	  }
	
	 if(a == true)
	 {
	  reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)'+
	                   '(\\@)([a-zA-Z0-9\\-\\.]+)'+
	                   '(\\.)([a-zA-Z]{2,4})$');
	  res = (reg.test(s));
	 }
	 else
	 {
	  res = (s.search('@') >= 1 &&
	         s.lastIndexOf('.') > s.search('@') &&
	         s.lastIndexOf('.') >= s.length-5)
	 }
	 return(res);
	} 

  if (FrontPage_Form1.nachricht.value.length < 4)
  {
    alert("Bitte geben Sie Ihre Nachricht an.");
    FrontPage_Form1.nachricht.focus();
    return (false);
  }

  
  return (true);
}
