function validate()
{
	
var name = document.getElementById("in_first_name").value;
var lastname = document.getElementById("in_last_name").value;
var phone = document.getElementById("in_phone").value;
var kidomet = document.getElementById("in_kidomet").value;
var ezor = document.getElementById("in_ezor").value;
var email = document.getElementById("in_email").value;
var at=document.getElementById("in_email").value.indexOf("@");
var dot=document.getElementById("in_email").value.indexOf(".");	
	
if (name=="")
{
	alert("נא למלא שם פרטי");
	document.form2.in_first_name.focus();		
	return false;
}

if (lastname=="")
{
	alert("נא למלא שם משפחה");
	document.form2.in_last_name.focus();	
	return false;
}

if ((phone=="") || (kidomet==""))
{
	alert("נא למלא מספר טלפון כולל קידומת");
	document.form2.in_phone.focus();	
	return false;
}

if ((phone!="")&&(isNaN(phone)))
{
	alert("מספר הטלפון שגוי - נא להזין ספרות בלבד");
	document.form2.in_phone.focus();	
	return false;
}

if ((phone!="")&&(phone.length<7))
{
	alert("מספר טלפון צריך להכיל 7 ספרות לפחות");
	document.form2.in_phone.focus();	
	return false;
}
		
if (email=="")
{
	alert("נא למלא כתובת דואר אלקטרוני");
	document.form2.in_email.focus();	
	return false;
}		
		
if ((email!="")&&((at==-1)||(dot==-1))) 
{
	alert("כתובת הדואר האלקטרוני שגויה");
	document.form2.in_email.focus();	
	return false;
}	

if (ezor=="")
{
	alert("נא לבחור שלוחה");
	document.form2.in_ezor.focus();	
	return false;
}			
		 
return true;
}

