// JavaScript Document
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Popup(error_message)
	{
alert(error_message);
			return false;	
	}
function CheckNumber(object_value)
    {
    //Returns true if value is a number or is NULL
    //otherwise returns false	

    if (object_value.length == 0)
        return false;

    //Returns true if value is a number defined as
    //   having an optional leading + or -.
    //   having at most 1 decimal point.
    //   otherwise containing only the characters 0-9.
	var start_format = " .+0123456789";
	var number_format = " .0123456789";
	var check_char;
	var decimal = false;
	var trailing_blank = false;
	var digits = false;

    //The first character can be + - .  blank or a digit.
	check_char = start_format.indexOf(object_value.charAt(0))
    //Was it a decimal?
	if (check_char == 1)
	    decimal = true;
	else if (check_char < 1)
		return false;
        
	//Remaining characters can be only . or a digit, but only one decimal.
	for (var i = 1; i < object_value.length; i++)
	{
		check_char = number_format.indexOf(object_value.charAt(i))
		if (check_char < 0 || check_char==0)
			return false;
		else if (check_char == 1)
		{
			if (decimal)		// Second decimal.
				return false;
			else
				decimal = true;
		}
		else if (check_char == 0)
		{
			if (decimal || digits)	
				trailing_blank = true;
        // ignore leading blanks

		}
	        else if (trailing_blank)
			return false;
		else
			digits = true;
	}	
    //All tests passed, so...
    return true
}
function  CheckNewsl(theForm) {
//	alert(theForm.normal1.value); return false;	 
	if (theForm.fname.value == "")	{	if  (!Popup("Your name is required!"))	{	return false; } } 
	if (theForm.email.value == "")	{	if  (!Popup("Email address is required!"))	{	return false; } } 
	if (theForm.email.value != "")	{
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
		if (filter.test(theForm.email.value)) {
		} else {
				if  (!Popup("Invalid email format!"))	{	return false; }
		}
	} 
	return true; 
 } 
 
function  CheckBook1(theForm) {
//	alert(theForm.normal1.value); return false;	 

	if (theForm.fname.value == "")	{	if  (!Popup("Your name is required!"))	{	return false; } } 
	if (theForm.email.value == "")	{	if  (!Popup("Email address is required!"))	{	return false; } } 
	if (theForm.email.value != "")	{
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
		if (filter.test(theForm.email.value)) {
		} else {
				if  (!Popup("Invalid email format!"))	{	return false; }
		}
	} 
	if (theForm.guest.value == "")	{	if  (!Popup("No. of guest is required!"))	{	return false; } } 
	if  (!(CheckNumber(theForm.guest.value) && (theForm.orderqty.value<1)))
		{
			if  (!Popup("Please fill total guest correctly with a numeric value and greater than 0 !"))
			{
				return false; 
			}
		}	
}	

	return true; 
 } 
//-->