<!--
 function check()
{
	
	var FName=document.tguvot.name.value;
	var Coteret=document.tguvot.coteret.value;
 	var Tguva=document.tguvot.tguva.value;
 	var Email=document.tguvot.mail.value;
	var shtplace=Email.indexOf('@');
	var dotplace=Email.indexOf('.');
	var invalidchars=":+?!][#$%'=;/<>&";  
	var i=0;
	var l;  
  
  	if(FName==0)
	{
		alert("לא רשמת שם פרטי");
	  	document.tguvot.name.focus();
		return false;
	}
	for (digit=0;digit<10;digit++)
    {
		if (FName.indexOf(digit) != -1)
		{
                          	
			alert("אסור שהשם יכיל מספרים");
			document.tguvot.name.value="";
			document.tguvot.name.focus();
			return false;
		}
	}
	
	// checks if there are notes :./?+
	for (var pos=0;pos<invalidchars.length;pos++)
	{
	var tav=invalidchars.charAt(pos);
	if (FName.indexOf(tav) != -1)
	{
		 alert("This field can't hold chars which aren't letters");
		 document.tguvot.name.value=""
		 document.tguvot.name.focus();
		 return false;
	}
	}
	 
 	 
  if (Email == "")
	{
	alert("לא רשמת כתובת דואר אלקטרוני");
	document.tguvot.mail.focus();
	return false;
	}

  if (shtplace==-1 || dotplace==-1)
	{
		alert("כתובת הדואר האלקטרוני לא תקינה");
		document.tguvot.mail.value="";
		document.tguvot.mail.focus();
		return false;	
    }

  if (shtplace==0 || dotplace==0)
	{
		alert("כתובת הדואר האלקטרוני לא תקינה");
		document.tguvot.mail.value="";
		document.tguvot.mail.focus();
		return false;	
    }
  if (shtplace==Email.length-1)
	{
		alert("כתובת הדואר האלקטרוני לא תקינה");
		document.tguvot.mail.value="";
		document.tguvot.mail.focus();
		return false;	
    }

  if (Email.lastIndexOf('@')!=shtplace)
	{
		alert("כתובת הדואר האלקטרוני לא תקינה");
		document.tguvot.mail.value="";
		document.tguvot.mail.focus();
		return false;	
    }

  if (Email.indexOf('.',shtplace+1)==-1 || Email.indexOf('.',shtplace)==shtplace+1 || Email.lastIndexOf('.')==Email.length-1)
	{
		alert("כתובת הדואר האלקטרוני לא תקינה");
		document.tguvot.mail.value="";
		document.tguvot.mail.focus();
		return false;	
        }
  for(l=0;l<Email.length;l++)
	{
	if (invalidchars.indexOf(Email.charAt(l) )!=-1)
	   {
	   alert("כתובת הדואר האלקטרוני לא תקינה");
	   document.tguvot.mail.value="";
	   document.tguvot.mail.focus();
	   return false;
	   }
	} 
	if(Coteret==0)
	{
		alert("כתוב כותרת לתגובה");
	  	document.tguvot.coteret.focus();
		return false;
	}  
	if(Tguva==0)
	{
		alert("תן איזה תגובה");
		document.tguvot.tguva.focus();
		return false;
	}
		return true;
	
	
}

