function MM_preloadImages()
{
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function changeScrollbarColor(C)
{
  if (document.all)
  {
    document.body.style.scrollbarBaseColor = C
  }   
}
function ValidatorTrim(s)
{
	var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
	return (m == null) ? "" : m[1];
}
function MM_openBrWindow(theURL,winName,features)
{
  window.open(theURL,winName,features);
  return false;
}
function doAdmADReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.hmeFrm.admin_username.value = ""
	document.hmeFrm.admin_password.value = ""
}
function checkAdmVal()
{
	if(ValidatorTrim(document.hmeFrm.admin_username.value)=='')
	{
		alert('Please enter Admin Username');
		document.getElementById('admin_username').focus();
		return false;		
	} 
	var newUsnm=document.hmeFrm.admin_password.value;
	if(ValidatorTrim(document.hmeFrm.admin_password.value)=='')
	{
		alert('Please enter Admin Password');
		document.getElementById('admin_password').focus();
		return false;		
	}
	if(newUsnm!="")
	{
		if(newUsnm.indexOf(" ")!=-1)
		{
	    	alert("Please dont use space for Admin Password.");
		 	document.hmeFrm.admin_password.value="";
		 	document.hmeFrm.admin_password.focus();
		 	return false;
		}
		if(newUsnm.length<5||newUsnm.length>8)
		{
		   alert("Admin Password length must lie between 5 - 8 Characters Only");
		   document.hmeFrm.admin_password.value="";
		   document.hmeFrm.admin_password.focus();
		   return false;
		}
	}
}
function checkAdmPwdVal()
{
	if(document.fmrChgeAdmPwd.cpassword.value=="")
	{
		alert("Please provide your old Password");
		document.fmrChgeAdmPwd.cpassword.focus();
		return false;
	}
	if(document.fmrChgeAdmPwd.cpassword.value!="")
	{
		if(document.fmrChgeAdmPwd.pwd.value!=document.fmrChgeAdmPwd.cpassword.value)
		{
			alert("Please provide your valid old password");
			document.fmrChgeAdmPwd.cpassword.focus();
			return false;
		}
	}
	var newpass=document.fmrChgeAdmPwd.password.value;
	if(document.fmrChgeAdmPwd.password.value=="")
	{
		alert("Please enter new password");
		document.fmrChgeAdmPwd.password.focus();
		return false;
	}
	if(newpass!="")
	{
		if(newpass.indexOf(" ")!=-1)
		{
			alert("Please dont use space for password");
			document.fmrChgeAdmPwd.password.value="";
			document.fmrChgeAdmPwd.password.focus();
			return false;
		}
		if(newpass.length<1||newpass.length>16)
		{
			alert("Password length must lie between 1 - 16 Characters");
			document.fmrChgeAdmPwd.password.value="";
			document.fmrChgeAdmPwd.password.focus();
			return false;
		}
	}
	if(document.fmrChgeAdmPwd.password.value!=document.fmrChgeAdmPwd.password_confirm.value)
	{
			alert("Both New and Confirm Password must be same");
			document.fmrChgeAdmPwd.password_confirm.focus();
			return false;
	}
	return true;
}

function doAdmPwdReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.fmrChgeAdmPwd.cpassword.value = ""
	document.fmrChgeAdmPwd.password.value = ""
	document.fmrChgeAdmPwd.password_confirm.value = ""
}
function alert_home()
{
	if(ValidatorTrim(document.add_policy_form.title.value)=='')
	{
		alert('Please enter title for home page.');
		document.getElementById('title').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.editor1.value)=='')
	{
		alert('Please enter content for home page.');
		document.getElementById('editor1').focus();
		return false;		
	}
	return true;
}
function privacy_policyReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.add_policy_form.title.value = ""
	document.add_policy_form.editor1.value = ""
}
function feedbackVal()
{
if(document.feedback.username.value == "")
{
alert("Please enter the Fullname.");
document.getElementById('username').focus();
return false;
}
if(document.feedback.email.value == "")
{
alert("Please enter the email ID.");
document.getElementById('email').focus();
return false;
}
if(document.feedback.email.value.indexOf('@')==-1){

alert("Please enter your correct email id");
document.getElementById('email').focus();
return false;
}
if(document.feedback.email.value.indexOf('.')==-1){

alert("Please enter your correct email id");
document.getElementById('email').focus();
return false;
}
if(document.feedback.phone_no.value == "")
{
alert("Please enter the Phone Number.");
document.getElementById('phone_no').focus();
return false;
}
if(document.feedback.mobile_no.value == "")
{
alert("Please enter the Mobile Number.");
document.getElementById('mobile_no').focus();
return false;
}
if(document.feedback.feed_Desc.value == "")
{
alert("Please enter the Feedback.");
document.getElementById('feed_Desc').focus();
return false;
}
return true;
}
function feedbackReset()
{
var R = "Are you sure you want to clear the Form?"
self.focus();
document.feedback.username.value = ""
document.feedback.email.value = ""
document.feedback.phone_no.value = ""
document.feedback.mobile_no.value = ""
document.feedback.feed_Desc.value = ""
}
function CouponsReset()
{
var R = "Are you sure you want to clear the Form?"
self.focus();
document.add_policy_form.title.value = ""
document.add_policy_form.type.value = ""
document.add_policy_form.price.value = ""
document.add_policy_form.day_time.value = ""
document.add_policy_form.comment_1.value = ""
document.add_policy_form.comment_2.value = ""
document.add_policy_form.discount_tip.value = ""
document.add_policy_form.descr.value = ""
}
function alert_coupons()
{
	if(document.add_policy_form.title.value == "")
	{
		alert("Please enter the title.");
		document.getElementById('title').focus();
		return false;
	}
	if(document.add_policy_form.type.value == "")
	{
		alert("Please enter the type.");
		document.getElementById('type').focus();
		return false;
	}
	if(document.add_policy_form.price.value == "")
	{
		alert("Please enter the price.");
		document.getElementById('price').focus();
		return false;
	}
	if(document.add_policy_form.day_time.value == "")
	{
		alert("Please enter the day time.");
		document.getElementById('day_time').focus();
		return false;
	}
	if(document.add_policy_form.comment_1.value == "")
	{
		alert("Please enter the comment to show over brown color.");
		document.getElementById('comment_1').focus();
		return false;
	}
	if(document.add_policy_form.comment_2.value == "")
	{
		alert("Please enter the comment.");
		document.getElementById('comment_2').focus();
		return false;
	}
	if(document.add_policy_form.discount_tip.value == "")
	{
		alert("Please enter the discount tip.");
		document.getElementById('discount_tip').focus();
		return false;
	}
	if(document.add_policy_form.descr.value == "")
	{
		alert("Please enter the description.");
		document.getElementById('descr').focus();
		return false;
	}
	return true;
}
function editpricingCoupons()
{
	if(document.edit_privacy_policycPN.title.value == "")
	{
		alert("Please enter the title.");
		document.getElementById('title').focus();
		return false;
	}
	if(document.edit_privacy_policycPN.type.value == "")
	{
		alert("Please enter the type.");
		document.getElementById('type').focus();
		return false;
	}
	if(document.edit_privacy_policycPN.price.value == "")
	{
		alert("Please enter the price.");
		document.getElementById('price').focus();
		return false;
	}
	if(document.edit_privacy_policycPN.day_time.value == "")
	{
		alert("Please enter the day time.");
		document.getElementById('day_time').focus();
		return false;
	}
	if(document.edit_privacy_policycPN.comment_1.value == "")
	{
		alert("Please enter the comment to show over brown color.");
		document.getElementById('comment_1').focus();
		return false;
	}
	if(document.edit_privacy_policycPN.comment_2.value == "")
	{
		alert("Please enter the comment.");
		document.getElementById('comment_2').focus();
		return false;
	}
	if(document.edit_privacy_policycPN.discount_tip.value == "")
	{
		alert("Please enter the discount tip.");
		document.getElementById('discount_tip').focus();
		return false;
	}
	if(document.edit_privacy_policycPN.descr.value == "")
	{
		alert("Please enter the description.");
		document.getElementById('descr').focus();
		return false;
	}
	return true;
}
function menuValReset()
{
var R = "Are you sure you want to clear the Form?"
self.focus();
document.add_policy_form.category.value = "sel_cat"
document.add_policy_form.title.value = ""
document.add_policy_form.descr.value = ""
document.add_policy_form.price.value = ""
}
function alert_menuMenu()
{
	if(document.getElementById("category").value=="sel_cat")
	{
		alert("Please select menu category");
		document.add_policy_form.category.focus();
		return false
	}
	if(ValidatorTrim(document.add_policy_form.title.value)=='')
	{
		alert('Please enter title');
		document.getElementById('title').focus();
		return false;		
	} 
	if(ValidatorTrim(document.add_policy_form.descr.value)=='')
	{
		alert('Please enter description');
		document.getElementById('descr').focus();
		return false;		
	} 
	if(ValidatorTrim(document.add_policy_form.price.value)=='')
	{
		alert('Please enter price');
		document.getElementById('price').focus();
		return false;		
	} 
	if(ValidatorTrim(document.add_policy_form.userfile.value)=='')
	{
		alert('Please upload menu image.');
		document.getElementById('userfile').focus();
		return false;		
	}
	return true;
}
function editMenuVal()
{
	if(document.getElementById("category").value=="sel_cat")
	{
		alert("Please select menu category");
		document.edit_MenuFrm.category.focus();
		return false
	}
	if(ValidatorTrim(document.edit_MenuFrm.title.value)=='')
	{
		alert('Please enter title');
		document.getElementById('title').focus();
		return false;		
	} 
	if(ValidatorTrim(document.edit_MenuFrm.descr.value)=='')
	{
		alert('Please enter description');
		document.getElementById('descr').focus();
		return false;		
	} 
	if(ValidatorTrim(document.edit_MenuFrm.price.value)=='')
	{
		alert('Please enter price');
		document.getElementById('price').focus();
		return false;		
	} 
	return true;
}
function cCouponsResett()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.add_policy_form.title.value = ""
	document.add_policy_form.coupons_sub_hdg.value = ""
	document.add_policy_form.price_more.value = ""
	document.add_policy_form.descr.value = ""
}
function alert_ccouponss()
{
	if(ValidatorTrim(document.add_policy_form.title.value)=='')
	{
		alert('Please enter title');
		document.getElementById('title').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.coupons_sub_hdg.value)=='')
	{
		alert('Please enter Coupon Tag/Qutoe');
		document.getElementById('coupons_sub_hdg').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.price_more.value)=='')
	{
		alert('Please enter Coupon Scheme');
		document.getElementById('price_more').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.descr.value)=='')
	{
		alert('Please enter description');
		document.getElementById('descr').focus();
		return false;		
	}
	return true;
}
function editpricingcCouponss()
{
	if(ValidatorTrim(document.edit_privacy_policycPN.title.value)=='')
	{
		alert('Please enter title');
		document.getElementById('title').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_privacy_policycPN.coupons_sub_hdg.value)=='')
	{
		alert('Please enter Coupon Tag/Qutoe');
		document.getElementById('coupons_sub_hdg').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_privacy_policycPN.price_more.value)=='')
	{
		alert('Please enter Coupon Scheme');
		document.getElementById('price_more').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_privacy_policycPN.descr.value)=='')
	{
		alert('Please enter description');
		document.getElementById('descr').focus();
		return false;		
	}
	return true;
}
function menuVCatalReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.add_policy_form.category.value = ""
	document.add_policy_form.category_descr.value = ""
}
function alert_atmenuMenu()
{
	if(ValidatorTrim(document.add_policy_form.category.value)=='')
	{
		alert('Please enter menu name');
		document.getElementById('category').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.category_descr.value)=='')
	{
		alert('Please enter description');
		document.getElementById('category_descr').focus();
		return false;		
	}
	return true;
}
function editCatMenuVal()
{
	if(ValidatorTrim(document.edit_MenuFrm.category.value)=='')
	{
		alert('Please enter menu name');
		document.getElementById('category').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_MenuFrm.category_descr.value)=='')
	{
		alert('Please enter description');
		document.getElementById('category_descr').focus();
		return false;		
	}
	return true;
}
function cat_sub_menus_Reset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.add_policy_form.category.value = "sel_page"
	document.add_policy_form.sub_cat.value = ""
	document.add_policy_form.sub_cat_descr.value = ""
}
function alert_cat_sub_menus()
{
	if(document.getElementById("category").value=="sel_page")
	{
		alert("Please select menu name");
		document.add_policy_form.category.focus();
		return false
	}
	if(ValidatorTrim(document.add_policy_form.sub_cat.value)=='')
	{
		alert('Please enter sub-menu name');
		document.getElementById('category').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.sub_cat_descr.value)=='')
	{
		alert('Please enter sub-menu description');
		document.getElementById('sub_cat_descr').focus();
		return false;		
	}
	return true;
}
function edit_cat_sub_menus()
{
	if(document.getElementById("id").value=="")
	{
		alert("Please select menu name");
		document.edit_MenuFrm.id.focus();
		return false
	}
	if(ValidatorTrim(document.edit_MenuFrm.sub_cat.value)=='')
	{
		alert('Please enter sub-menu name');
		document.getElementById('category').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_MenuFrm.sub_cat_descr.value)=='')
	{
		alert('Please enter sub-menu description');
		document.getElementById('category_descr').focus();
		return false;		
	}
	return true;
}
function CateringValReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.add_policy_form.category.value = "sel_page"
	document.add_policy_form.sub_cat.value = "sel_product"
	document.add_policy_form.small_serves.value = ""
	document.add_policy_form.med_serves.value = ""
	document.add_policy_form.large_serves.value = ""
}
function alertCateringVal()
{
	if(document.getElementById("category").value=="sel_page")
	{
		alert("Please select category menu name");
		document.add_policy_form.category.focus();
		return false
	}
	if(document.getElementById("sub_cat").value=="sel_product")
	{
		alert("Please select category sub-menu name");
		document.add_policy_form.sub_cat.focus();
		return false
	}
	if(ValidatorTrim(document.add_policy_form.small_serves.value)=='')
	{
		alert('Please enter small serves');
		document.getElementById('small_serves').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.med_serves.value)=='')
	{
		alert('Please enter medium serves');
		document.getElementById('med_serves').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.large_serves.value)=='')
	{
		alert('Please enter large serves');
		document.getElementById('large_serves').focus();
		return false;		
	}
	return true;
}
function editCateringVal()
{
	if(ValidatorTrim(document.edit_MenuFrm.small_serves.value)=='')
	{
		alert('Please enter small serves');
		document.getElementById('small_serves').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_MenuFrm.med_serves.value)=='')
	{
		alert('Please enter medium serves');
		document.getElementById('med_serves').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_MenuFrm.large_serves.value)=='')
	{
		alert('Please enter large serves');
		document.getElementById('large_serves').focus();
		return false;		
	}
	return true;
}
function table_rese_Reset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.add_policy_form.table_no.value = ""
	document.add_policy_form.members.value = ""
	document.add_policy_form.date2.value = ""
	document.add_policy_form.time.value = ""
	//document.add_policy_form.minutes.value = ""
}
function alert_table_reseVal()
{
	if(ValidatorTrim(document.add_policy_form.table_no.value)=='')
	{
		alert('Please enter table no');
		document.getElementById('table_no').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.members.value)=='')
	{
		alert('Please enter how many members can sit');
		document.getElementById('members').focus();
		return false;		
	}
	/*if(ValidatorTrim(document.add_policy_form.date11.value)=='')
	{
		alert('Please select date');
		document.getElementById('date11').focus();
		return false;		
	}*/
	if(ValidatorTrim(document.add_policy_form.date2.value)=='')
	{
			alert('Please select date');
			document.getElementById('date2').focus();
			return false;		
	}
	if(document.getElementById("time").value=="Select_Time")
	{
		alert("Please select Time");
		document.add_policy_form.time.focus();
		return false
	}
	return true;
}
function edittable_rese()
{
	if(ValidatorTrim(document.edit_MenuFrm.table_no.value)=='')
	{
		alert('Please enter table no');
		document.getElementById('table_no').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_MenuFrm.members.value)=='')
	{
		alert('Please enter how many members can sit');
		document.getElementById('members').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_MenuFrm.date2.value)=='')
	{
		alert('Please select date');
		document.getElementById('date2').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_MenuFrm.time.value)=='')
	{
		alert('Please select time');
		document.getElementById('time').focus();
		return false;		
	}
	/*if(ValidatorTrim(document.edit_MenuFrm.hours.value)=='')
	{
		alert('Please enter hours or time when table will be available');
		document.getElementById('hours').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_MenuFrm.minutes.value)=='')
	{
		alert('Please enter minutes or time when table will be available');
		document.getElementById('minutes').focus();
		return false;		
	}*/
	return true;
}
function tableUseReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.check_availabilityFrm.members.value = ""
	document.check_availabilityFrm.date2.value = ""
	document.check_availabilityFrm.time.value = ""
}
function checkAvialVal()
{
	
	if(ValidatorTrim(document.check_availabilityFrm.members.value)=='')
	{
					alert('Please enter members');
					document.getElementById('members').focus();
					return false;		
	}
	var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
	var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	if(document.check_availabilityFrm.members.value!="")
	{
		for (var i = 0; i < document.check_availabilityFrm.members.value.length; i++)
		{ 
			if(ifeed_fullnameChars.indexOf(document.check_availabilityFrm.members.value.charAt(i)) != -1) 
			{				
				alert('Entered members contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper members');
				document.check_availabilityFrm.members.value="";
				document.check_availabilityFrm.members.focus();
				return false;
			}
			if(digfeed_fullnamedesit.indexOf(document.check_availabilityFrm.members.value.charAt(i)) != -1) 
			{				
				alert('Entered members contains alphabates etc.\nThese are not allowed.\nPlease remove them and try again and enter only numbers ..');
				document.check_availabilityFrm.members.value="";
				document.check_availabilityFrm.members.focus();
				return false;
			}
		}
	}
	if(ValidatorTrim(document.check_availabilityFrm.date2.value)=='')
	{
			alert('Please select date');
			document.getElementById('date2').focus();
			return false;		
	}
	if(document.getElementById("time").value=="Select_Time")
	{
		alert("Please select Time");
		document.check_availabilityFrm.time.focus();
		return false
	}
	/*if(ValidatorTrim(document.check_availabilityFrm.date11.value)=='')
	{
					alert('Please enter date');
					document.getElementById('date11').focus();
					return false;		
	}
	var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
	var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	if(document.check_availabilityFrm.date11.value!="")
	{
		for (var i = 0; i < document.check_availabilityFrm.date11.value.length; i++)
		{ 
			if(ifeed_fullnameChars.indexOf(document.check_availabilityFrm.dadate11te.value.charAt(i)) != -1) 
			{				
				alert('Entered date contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper date');
				document.check_availabilityFrm.date11.value="";
				document.check_availabilityFrm.date11.focus();
				return false;
			}
			if(digfeed_fullnamedesit.indexOf(document.check_availabilityFrm.date11.value.charAt(i)) != -1) 
			{				
				alert('Entered date contains alphabates etc.\nThese are not allowed.\nPlease remove them and try again and enter only numbers ..');
				document.check_availabilityFrm.date11.value="";
				document.check_availabilityFrm.date11.focus();
				return false;
			}
		}
	}
	if(ValidatorTrim(document.check_availabilityFrm.hours.value)=='')
	{
					alert('Please enter hours');
					document.getElementById('hours').focus();
					return false;		
	}
	var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
	var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	if(document.check_availabilityFrm.hours.value!="")
	{
		for (var i = 0; i < document.check_availabilityFrm.hours.value.length; i++)
		{ 
			if(ifeed_fullnameChars.indexOf(document.check_availabilityFrm.hours.value.charAt(i)) != -1) 
			{				
				alert('Entered hours contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper hours');
				document.check_availabilityFrm.hours.value="";
				document.check_availabilityFrm.hours.focus();
				return false;
			}
			if(digfeed_fullnamedesit.indexOf(document.check_availabilityFrm.hours.value.charAt(i)) != -1) 
			{				
				alert('Entered hours contains alphabates etc.\nThese are not allowed.\nPlease remove them and try again and enter only numbers ..');
				document.check_availabilityFrm.hours.value="";
				document.check_availabilityFrm.hours.focus();
				return false;
			}
		}
	}
	if(ValidatorTrim(document.check_availabilityFrm.minutes.value)=='')
	{
					alert('Please enter minutes');
					document.getElementById('minutes').focus();
					return false;		
	}
	var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
	var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	if(document.check_availabilityFrm.minutes.value!="")
	{
		for (var i = 0; i < document.check_availabilityFrm.minutes.value.length; i++)
		{ 
			if(ifeed_fullnameChars.indexOf(document.check_availabilityFrm.minutes.value.charAt(i)) != -1) 
			{				
				alert('Entered minutes contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper minutes');
				document.check_availabilityFrm.minutes.value="";
				document.check_availabilityFrm.minutes.focus();
				return false;
			}
			if(digfeed_fullnamedesit.indexOf(document.check_availabilityFrm.minutes.value.charAt(i)) != -1) 
			{				
				alert('Entered minutes contains alphabates etc.\nThese are not allowed.\nPlease remove them and try again and enter only numbers ..');
				document.check_availabilityFrm.minutes.value="";
				document.check_availabilityFrm.minutes.focus();
				return false;
			}
		}
	}*/
	return true;
}
function member_infoFrmVal()
{
if(document.member_infoFrm.username.value == "")
{
alert("Please enter the Fullname.");
document.getElementById('username').focus();
return false;
}
if(document.member_infoFrm.address.value == "")
{
alert("Please enter the address.");
document.getElementById('address').focus();
return false;
}
if(document.member_infoFrm.email.value == "")
{
alert("Please enter the email ID.");
document.getElementById('email').focus();
return false;
}
if(document.member_infoFrm.email.value.indexOf('@')==-1){

alert("Please enter your correct email id");
document.getElementById('email').focus();
return false;
}
if(document.member_infoFrm.email.value.indexOf('.')==-1){

alert("Please enter your correct email id");
document.getElementById('email').focus();
return false;
}
if(document.member_infoFrm.phone_no.value == "")
{
alert("Please enter the Phone Number.");
document.getElementById('phone_no').focus();
return false;
}
if(document.member_infoFrm.mobile_no.value == "")
{
alert("Please enter the Mobile Number.");
document.getElementById('mobile_no').focus();
return false;
}
if(document.member_infoFrm.occassion.value == "")
{
alert("Please enter the occassion description.");
document.getElementById('occassion').focus();
return false;
}
return true;
}
function member_infoFrmValReset()
{
var R = "Are you sure you want to clear the Form?"
self.focus();
document.member_infoFrm.username.value = ""
document.member_infoFrm.address.value = ""
document.member_infoFrm.email.value = ""
document.member_infoFrm.phone_no.value = ""
document.member_infoFrm.mobile_no.value = ""
document.member_infoFrm.occassion.value = ""
}
function OrderMenuValReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.add_policy_form.category.value = "sel_cat"
	document.add_policy_form.ItemName.value = ""
	document.add_policy_form.ItemPrice.value = ""
	document.add_policy_form.ItemShipping.value = ""
	document.add_policy_form.ItemQty.value = ""
	document.add_policy_form.small_descr.value = ""
}
function alertOrderMenuMenu()
{   
    if(document.getElementById("category").value=="sel_cat")
	{
		alert("Please select category.");
		document.add_policy_form.category.focus();
		return false
	}
	if(ValidatorTrim(document.add_policy_form.ItemName.value)=='')
	{
		alert('Please enter  menu title.');
		document.getElementById('ItemName').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.ItemPrice.value)=='')
	{
					alert('Please enter menu Price');
					document.getElementById('ItemPrice').focus();
					return false;		
	}
		var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
		var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
		if(document.add_policy_form.ItemPrice.value!="")
		{
			for (var i = 0; i < document.add_policy_form.ItemPrice.value.length; i++)
			{ 
				if(ifeed_fullnameChars.indexOf(document.add_policy_form.ItemPrice.value.charAt(i)) != -1) 
				{				
					alert('Entered menu Price contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper menu Price');
					document.add_policy_form.ItemPrice.value="";
					document.add_policy_form.ItemPrice.focus();
					return false;
				}
				if(digfeed_fullnamedesit.indexOf(document.add_policy_form.ItemPrice.value.charAt(i)) != -1) 
				{				
					alert('Entered menu Price contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers ..');
					document.add_policy_form.ItemPrice.value="";
					document.add_policy_form.ItemPrice.focus();
					return false;
				}
			}
	}	
	if(ValidatorTrim(document.add_policy_form.ItemShipping.value)=='')
	{
					alert('Please enter Shipping Price');
					document.getElementById('ItemShipping').focus();
					return false;		
	}
		var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
		var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
		if(document.add_policy_form.ItemShipping.value!="")
		{
			for (var i = 0; i < document.add_policy_form.ItemShipping.value.length; i++)
			{ 
				if(ifeed_fullnameChars.indexOf(document.add_policy_form.ItemShipping.value.charAt(i)) != -1) 
				{				
					alert('Entered Shipping Price contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Shipping Price');
					document.add_policy_form.ItemShipping.value="";
					document.add_policy_form.ItemShipping.focus();
					return false;
				}
				if(digfeed_fullnamedesit.indexOf(document.add_policy_form.ItemShipping.value.charAt(i)) != -1) 
				{				
					alert('Entered Shipping Price contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers ..');
					document.add_policy_form.ItemShipping.value="";
					document.add_policy_form.ItemShipping.focus();
					return false;
				}
			}
	}
	if(ValidatorTrim(document.add_policy_form.ItemQty.value)=='')
	{
					alert('Please enter Total quantity for menu');
					document.getElementById('ItemQty').focus();
					return false;		
	}
		var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
		var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
		if(document.add_policy_form.ItemQty.value!="")
		{
			for (var i = 0; i < document.add_policy_form.ItemQty.value.length; i++)
			{ 
				if(ifeed_fullnameChars.indexOf(document.add_policy_form.ItemQty.value.charAt(i)) != -1) 
				{				
					alert('Entered Total quantity for menu contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Total quantity for menu');

					document.add_policy_form.ItemQty.value="";
					document.add_policy_form.ItemQty.focus();
					return false;
				}
				if(digfeed_fullnamedesit.indexOf(document.add_policy_form.ItemQty.value.charAt(i)) != -1) 
				{				
					alert('Entered Total quantity for menu contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers ..');
					document.add_policy_form.ItemQty.value="";
					document.add_policy_form.ItemQty.focus();
					return false;
				}
			}
	}
	if(ValidatorTrim(document.add_policy_form.small_descr.value)=='')
	{
		alert('Please enter menus Description.');
		document.getElementById('small_descr').focus();
		return false;		
	}
	if(ValidatorTrim(document.add_policy_form.userfile.value)=='')
	{
		alert('Please browse for menu Image.');
		document.getElementById('userfile').focus();
		return false;		
	}
	return true;
}
function editOrderMenu()
{   
    if(ValidatorTrim(document.edit_MenuFrm.ItemName.value)=='')
	{
		alert('Please enter  menu title.');
		document.getElementById('ItemName').focus();
		return false;		
	}
	if(ValidatorTrim(document.edit_MenuFrm.ItemPrice.value)=='')
	{
					alert('Please enter menu Price');
					document.getElementById('ItemPrice').focus();
					return false;		
	}
		var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
		var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
		if(document.edit_MenuFrm.ItemPrice.value!="")
		{
			for (var i = 0; i < document.edit_MenuFrm.ItemPrice.value.length; i++)
			{ 
				if(ifeed_fullnameChars.indexOf(document.edit_MenuFrm.ItemPrice.value.charAt(i)) != -1) 
				{				
					alert('Entered menu Price contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper menu Price');
					document.edit_MenuFrm.ItemPrice.value="";
					document.edit_MenuFrm.ItemPrice.focus();
					return false;
				}
				if(digfeed_fullnamedesit.indexOf(document.edit_MenuFrm.ItemPrice.value.charAt(i)) != -1) 
				{				
					alert('Entered menu Price contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers ..');
					document.edit_MenuFrm.ItemPrice.value="";
					document.edit_MenuFrm.ItemPrice.focus();
					return false;
				}
			}
	}	
	if(ValidatorTrim(document.edit_MenuFrm.ItemShipping.value)=='')
	{
					alert('Please enter Shipping Price');
					document.getElementById('ItemShipping').focus();
					return false;		
	}
		var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
		var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
		if(document.edit_MenuFrm.ItemShipping.value!="")
		{
			for (var i = 0; i < document.edit_MenuFrm.ItemShipping.value.length; i++)
			{ 
				if(ifeed_fullnameChars.indexOf(document.edit_MenuFrm.ItemShipping.value.charAt(i)) != -1) 
				{				
					alert('Entered Shipping Price contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Shipping Price');
					document.edit_MenuFrm.ItemShipping.value="";
					document.edit_MenuFrm.ItemShipping.focus();
					return false;
				}
				if(digfeed_fullnamedesit.indexOf(document.edit_MenuFrm.ItemShipping.value.charAt(i)) != -1) 
				{				
					alert('Entered Shipping Price contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers ..');
					document.edit_MenuFrm.ItemShipping.value="";
					document.edit_MenuFrm.ItemShipping.focus();
					return false;
				}
			}
	}
	if(ValidatorTrim(document.edit_MenuFrm.ItemQty.value)=='')
	{
					alert('Please enter Total quantity for menu');
					document.getElementById('ItemQty').focus();
					return false;		
	}
		var ifeed_fullnameChars = "!@#$%^*+=\;{}\":<>?";
		var digfeed_fullnamedesit = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
		if(document.edit_MenuFrm.ItemQty.value!="")
		{
			for (var i = 0; i < document.edit_MenuFrm.ItemQty.value.length; i++)
			{ 
				if(ifeed_fullnameChars.indexOf(document.edit_MenuFrm.ItemQty.value.charAt(i)) != -1) 
				{				
					alert('Entered Total quantity for menu contains special characters like @,$,*,^,& etc.\nThese are not allowed.\nPlease remove them and enter proper Total quantity for menu');
					document.edit_MenuFrm.ItemQty.value="";
					document.edit_MenuFrm.ItemQty.focus();
					return false;
				}
				if(digfeed_fullnamedesit.indexOf(document.edit_MenuFrm.ItemQty.value.charAt(i)) != -1) 
				{				
					alert('Entered Total quantity for menu contains alphabates etc.\n These are not allowed.\nPlease remove them and try again and enter only numbers ..');
					document.edit_MenuFrm.ItemQty.value="";
					document.edit_MenuFrm.ItemQty.focus();
					return false;
				}
			}
	}
	if(ValidatorTrim(document.edit_MenuFrm.small_descr.value)=='')
	{
		alert('Please enter menus Description.');
		document.getElementById('small_descr').focus();
		return false;		
	}
	return true;
}
function SocialMediaReset()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.add_policy_form.type.value = "sel_type"
	document.add_policy_form.url.value = ""
}
function alertSocialMedia()
{
	if(document.getElementById("type").value=="sel_type")
	{
		alert("Please select social media type.");
		document.add_policy_form.type.focus();
		return false
	}
	if(ValidatorTrim(document.add_policy_form.url.value)=='')
	{
		var invalid = " ";
		var length = 3;
		var minLength = 6;
		var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
		if(ValidatorTrim(document.add_policy_form.url.value)=='')
		{
			alert("Please enter url address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
			document.add_policy_form.url.focus();
			return false;
		}
		
		tname = add_policy_form.url.value;				 
		
		if(tname.indexOf('.') == -1)
		{
			alert("Enter url address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
			add_policy_form.url.focus();
			return false;
		}
		if (document.add_policy_form.url.value.indexOf(invalid) > -1)
		{
			alert("Sorry, spaces are not allowed in url address.\n Please enter url address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
			document.add_policy_form.url.focus();
			return false;
		}
		if (document.add_policy_form.url.value.length < length)
		{
			alert('Your url address must be ' + length + ' characters long.\n Enter url address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
			document.add_policy_form.url.focus();
			return false;
		}
		if (empty(stripSpaces(document.add_policy_form.url.value)))
		{ 
			alert('url address cant be empty'); 
			document.add_policy_form.url.value=''; 
			document.add_policy_form.url.focus();
			return false;
		}
	}
	return true;
}
function editSocialMediaVal()
{
	if(document.getElementById("type").value=="")
	{
		alert("Please select social media type.");
		document.edit_MenuFrm.type.focus();
		return false
	}
	if(ValidatorTrim(document.edit_MenuFrm.url.value)=='')
	{
		var invalid = " ";
		var length = 3;
		var minLength = 6;
		var iChars = "!@#$%^&*()+=-[]\';,./{}|\":<>?";
		if(ValidatorTrim(document.edit_MenuFrm.url.value)=='')
		{
			alert("Please enter url address.\n e.g. google.com, xyz.com, xyz.net, xyz.info. etc...");
			document.edit_MenuFrm.url.focus();
			return false;
		}
		
		tname = add_policy_form.url.value;				 
		
		if(tname.indexOf('.') == -1)
		{
			alert("Enter url address with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
			edit_MenuFrm.url.focus();
			return false;
		}
		if (document.edit_MenuFrm.url.value.indexOf(invalid) > -1)
		{
			alert("Sorry, spaces are not allowed in url address.\n Please enter url address along with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...");
			document.edit_MenuFrm.url.focus();
			return false;
		}
		if (document.edit_MenuFrm.url.value.length < length)
		{
			alert('Your url address must be ' + length + ' characters long.\n Enter url address in proper format with extension.\n e.g. xyz.com, xyz.net, xyz.info. etc...');
			document.edit_MenuFrm.url.focus();
			return false;
		}
		if (empty(stripSpaces(document.edit_MenuFrm.url.value)))
		{ 
			alert('url address cant be empty'); 
			document.edit_MenuFrm.url.value=''; 
			document.edit_MenuFrm.url.focus();
			return false;
		}
	}
	return true;
}
function resetDis()
{
	var R = "Are you sure you want to clear the Form?"    
	self.focus();
	document.f1.ShipToFirstName.value = ""
	document.f1.ShipToLastName.value = ""
	document.f1.ClientEmail.value = ""
	document.f1.ShipToPhone.value = ""
}
function checkthisvalcus()
{
	if(ValidatorTrim(document.f1.ShipToFirstName.value)=='')
	{
		alert('Please enter firstname.');
		document.getElementById('ShipToFirstName').focus();
		return false;		
	}
	if(ValidatorTrim(document.f1.ShipToLastName.value)=='')
	{
		alert('Please enter lastname.');
		document.getElementById('ShipToLastName').focus();
		return false;		
	}
	
	if(document.f1.ClientEmail.value == "")
	{
			alert("Please enter Email-Id");
			document.f1.ClientEmail.focus();
			return false;
	}
	
	if(document.f1.ClientEmail.value!="")
	{			
		for(i=0;i<=document.f1.ClientEmail.value.length;i++)
		{			
			if(document.f1.ClientEmail.value.charAt(i)==" ")
			{
				alert("Please enter proper format for Email-Id\ne.g. xyz@xyz.com");
				document.f1.ClientEmail.focus();
				return false;
			}
		}
		var flag;
		flag=0;
		var temp;
		var valid = "0123456789"
		temp = "" + document.f1.ClientEmail.value.charAt(0);
		if (valid.indexOf(temp)!= "-1")
		{
			alert("Please enter proper format for Email-Id\ne.g. xyz@xyz.com");
			document.f1.ClientEmail.select();
			return false;
		}
		for(i=0;i<=document.f1.ClientEmail.value.length;i++)
		{			
			if(document.f1.ClientEmail.value.charAt(i)=="@")
			{
				flag=flag+1;
			}
		}
		if( flag >1)
		{
			alert("Please enter proper format for Email-Id\ne.g. xyz@xyz.com");
			document.f1.email.select();
			return false;
		}
		for(i=0;i<=document.f1.ClientEmail.value.length;i++)
		{	
			if(document.f1.ClientEmail.value.charAt(i)==".")
			{
				flag=flag+1;
					break;
			}
		}
		if(flag<2)
		{
			alert("Please enter proper format for Email-Id\ne.g. xyz@xyz.com");
			document.f1.ClientEmail.select();
			return false;
		}
	}	
	if(ValidatorTrim(document.f1.ShipToPhone.value)=='')
	{
		alert('Please enter phone no.');
		document.getElementById('ShipToPhone').focus();
		return false;		
	}
	if(ValidatorTrim(document.f1.ShipToPhone1.value)=='')
	{
		alert('Please enter Mobile Number.');
		document.getElementById('ShipToPhone1').focus();
		return false;		
	}
	return true;
}
