function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
//		   alert("Invalid Email ID")
		   alert("כתובת אימייל לא חוקית")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
//		   alert("Invalid Email ID")
		   alert("כתובת אימייל לא חוקית")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
//		   alert("Invalid Email ID")
		   alert("כתובת אימייל לא חוקית")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
//		   alert("Invalid Email ID")
		   alert("כתובת אימייל לא חוקית")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
//		   alert("Invalid Email ID")
		   alert("כתובת אימייל לא חוקית")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
//		   alert("Invalid Email ID")
		   alert("כתובת אימייל לא חוקית")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
//		   alert("Invalid Email ID")
		   alert("כתובת אימייל לא חוקית")
		    return false
		 }

 		 return true					
	}

function checkForm(){

	var nameID=document.order_form.name
	var mobileID=document.order_form.mobile
//	var emailID=document.order_form.email
//	var quantityID=document.order_form.num_of_packages
	
	
	if ((nameID.value==null)||(nameID.value=="")){
//		alert("Please enter your name")
		alert("אנא הכניסו שם")
		nameID.focus()
		return false
	}
	if ((mobileID.value==null)||(mobileID.value=="")){
//		alert("Please enter your mobile")
		alert("אנא הכניסו מספר טלפון נייד")
		mobileID.focus()
		return false
	}
//	if ((emailID.value==null)||(emailID.value=="")){
//		alert("Please enter your email")
//		alert("אנא הכניסו כתובת אימייל")
//		emailID.focus()
//		return false
//	}
	if (echeck(emailID.value)==false){
//		alert("dic_enter_valid_email")
		alert("אנא הכניסו כתובת אימייל חוקית")
		emailID.focus()
		return false
	}
	return true
 }

function CheckNumber(object_value) {

	var start_format = " 123456789";
	var number_format = " 0123456789";
	var check_char;
	var trailing_blank = false;
	var digits = false;
	
	for (var i = 1; i < object_value.length; i++)	{
		check_char = number_format.indexOf(object_value.charAt(i))
		if (check_char < 0) {
			return false;
		} else if (check_char == 1)	{
				decimal = true;
		} else if (check_char == 0) {
			if (digits)	
			trailing_blank = true;
		}	else if (trailing_blank) { 
			return false;
		} else {
			digits = true;
		}
	}	
	
	return true;
}