function LimitAttach(oFormEle)
{extArray=new Array(".jpg",".gif",".png",".jpeg",".png",".tif");var file=oFormEle.value;allowSubmit=false;if(file==""){alert("Press Browse Button")
return false;}
if(!file)return;while(file.indexOf("\\")!=-1)
file=file.slice(file.indexOf("\\")+1);ext=file.slice(file.indexOf(".")).toLowerCase();for(var i=0;i<extArray.length;i++){if(extArray[i]==ext){allowSubmit=true;break;}}
if(allowSubmit)return true;else
alert("Please only upload files that end in types:  "
+(extArray.join("  "))+"\nPlease select a new "
+"file to upload and submit again.");return false;}<!--end LimitAttach()-->
function IsNumber(strString)
{var strValidChars="0123456789";var strChar;var blnResult=true;if(strString.length==0)return false;for(i=0;i<strString.length&&blnResult==true;i++)
{strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1)
{blnResult=false;}}
return blnResult;}
function IsQuantity(strString)
{var strValidChars="123456789/";var strChar;var blnResult=true;if(strString.length==0)return false;for(i=0;i<strString.length&&blnResult==true;i++)
{strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1)
{blnResult=false;}}
return blnResult;}
function checkemail(email)
{var str=email.value;var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;if(filter.test(str))
testresults=true;else
{alert("Please enter a valid email address!");testresults=false;}
return(testresults);}
function ValidateNumber()
{var kCode=parseInt(event.keyCode);if((kCode>=48&&kCode<=57))
{event.returnValue=true;return true;}
else
{alert("Numerics Only");}
event.returnValue=false;return false;}
function validateRegisterForm()
{if(document.register_form.firstname.value=="")
{alert("Please enter the Firstname");document.register_form.firstname.focus();return false;}
else
if(document.register_form.lastname.value=="")
{alert("Please enter the Lastname");document.register_form.lastname.focus();return false;}
else
if(document.register_form.address1.value=="")
{alert("Please enter the Street Address");document.register_form.address1.focus();return false;}
else
if(document.register_form.phoneno.value=="")
{alert("Please enter the Telephone Number");document.register_form.phoneno.focus();return false;}
else
if(document.register_form.state.value=="")
{alert("Please enter the State");document.register_form.state.focus();return false;}
else
if(document.register_form.zip.value=="")
{alert("Please enter the Zip Code");ValidateNumber()
document.register_form.zip.focus();return false;}
else
if(document.register_form.country.value=="")
{alert("Please select Country");document.register_form.county.focus();return false;}
return true;}
function validateLoginForm()
{if(document.login_form.email.value=="")
{alert("Please enter Email");document.login_form.email.focus();return false;}else
if(checkemail(document.login_form.email)==false){document.login_form.email.focus();return false;}else
if(document.login_form.lastname.value=="")
{alert("Please enter the Lastname");document.login_form.password.focus();return false;}
return true;}
function validateRegisteration()
{missinginfo="";if(document.register_form.email.value=="")
{alert("Please enter the E-mail");document.register_form.email.focus();return false;}if(checkemail(document.register_form.email)==false){document.register_form.email.focus();return false;}
else
if(document.register_form.password.value=="")
{alert("Please enter the Password");document.register_form.password.focus();return false;}
else
if(document.register_form.password.value.length<5)
{alert("Password should have minimum 5 characters");document.register_form.password.focus();return false;}
else
if(document.register_form.confirmpassword.value=="")
{alert("Please enter the Confirm Password");document.register_form.confirmpassword.focus();return false;}
else
if(document.register_form.password.value!=document.register_form.confirmpassword.value)
{alert("Password Should Match");document.register_form.confirmpassword.focus();return false;}
else
if(!document.register_form.agree.checked){missinginfo+="\n - You must agree to the terms";}
if(missinginfo!=""){missinginfo="__________________________________\n"+"Required information is missing: \n"+
missinginfo+"\n__________________________________"+"\nPlease complete and resubmit.";alert(missinginfo);return false;}
else{return true;}
return true;}
function open_window(link,w)
{var win="width="+w+",menubar=yes,location=no,resizable=no,scrollbars=yes";newWin=window.open(link,'newWin',win);}
function validateEmailForm()
{if(document.email_recipe.User_Name.value=="")
{alert("Please enter your Name");document.email_recipe.User_Name.focus();return false;}else
if(document.email_recipe.User_Email.value=="")
{alert("Please enter your email ");document.email_recipe.User_Email.focus();return false;}if(checkemail(document.email_recipe.User_Email)==false)
{document.email_recipe.User_Email.focus();return false;}else
if(document.email_recipe.Frnd_Name.value=="")
{alert("Please enter your friend Name");document.email_recipe.Frnd_Name.focus();return false;}else
if(document.email_recipe.Frnd_Email.value=="")
{alert("Please enter the email ");document.email_recipe.Frnd_Email.focus();return false;}if(checkemail(document.email_recipe.Frnd_Email)==false)
{document.email_recipe.Frnd_Email.focus();return false;}else
if(document.email_recipe.Email_Message.value=="")
{alert("Please enter message");document.email_recipe.Email_Message.focus();return false;}
return true;}
function validatePostRecipeForm()
{if(document.post_recipe.User_Email.value=="")
{alert("Please enter the E-mail");document.post_recipe.User_Email.focus();return false;}if(checkemail(document.post_recipe.User_Email)==false){document.post_recipe.User_Email.focus();return false;}else
if(document.post_recipe.Recipe_Name.value=="")
{alert("Please enter Recipe Name");document.post_recipe.Recipe_Name.focus();return false;}else
if(document.post_recipe.Recipe_Name.value.length>100)
{alert("Recipe Name Shouldnot greater than 100 characters");document.post_recipe.Recipe_Name.focus();return false;}else
if(document.post_recipe.Tag_Name.value!=""&&document.post_recipe.Tag_Name.value.length>200)
{alert("Tag Name Shouldnot greater than 200 characters");document.post_recipe.Tag_Name.focus();return false;}else
if(document.post_recipe.Recipe_Description.value!=""&&document.post_recipe.Recipe_Description.value.length>200)
{alert("Recipe Description  Shouldnot greater than 200 characters");document.post_recipe.Recipe_Description.focus();return false;}else
if(document.getElementById('ingredients').rows.length>1)
{var count=1;var i;for(i=1;i<=count;i++)
{var ingredient='Ingredient_Name'+i;var qty='Quantity'+i;var unit='Unit'+i;if(document.getElementById(ingredient).value=="")
{alert("Enter Ingredient"+i);document.getElementById(ingredient).focus();return false;}else
if(document.getElementById(qty).value=="")
{alert("Enter Quantity"+i);document.getElementById(qty).focus();return false;}else
if(document.getElementById(unit).value==0)
{alert("Enter Unit"+i);document.getElementById(unit).focus();return false;}}}
if(document.post_recipe.Recipe_Directions.value=="")
{alert("Please Enter Recipe Directions");return false;}else
if(document.post_recipe.Preparation_Time.value!=""&&IsNumber(document.post_recipe.Preparation_Time.value)==false)
{alert("Time Should be Numerics");document.post_recipe.Preparation_Time.focus();return false;}else
if(document.post_recipe.Cooking_Time.value!=""&&IsNumber(document.post_recipe.Cooking_Time.value)==false)
{alert("Time Should be Numerics");document.post_recipe.Cooking_Time.focus();return false;}else
if(document.post_recipe.Standing_Time.value!=""&&IsNumber(document.post_recipe.Standing_Time.value)==false)
{alert("Time Should be Numerics");document.post_recipe.Standing_Time.focus();return false;}else
if(document.post_recipe.Recipe_Type.value==0)
{alert("Please Select Recipe Type");document.post_recipe.Recipe_Type.focus();return false;}else
if(document.post_recipe.Main_Ingredient.value==0)
{alert("Please Select Main Ingredient");document.post_recipe.Main_Ingredient.focus();return false;}else
if(parseInt(document.post_recipe.Main_Ingredient.value)==-1&&document.post_recipe.Other_Ingredient.value=="")
{alert("Please Enter Other Ingredient");document.post_recipe.Other_Ingredient.focus();return false;}
if(document.post_recipe.cuisineid.value==0)
{alert("Please Select Cuisine");document.post_recipe.cuisineid.focus();return false;}else
if(document.post_recipe.Recipe_Tips.value!=""&&document.post_recipe.Recipe_Tips.value.length>200)
{alert("Recipe Tips Shouldnot greater than 200 characters");document.post_recipe.Recipe_Tips.focus();return false;}else
if(document.post_recipe.Serving_Ideas.value!=""&&document.post_recipe.Serving_Ideas.value.length>200)
{alert("Serving Ideas  Shouldnot greater than 200 characters");document.post_recipe.Serving_Ideas.focus();return false;}else
if(document.post_recipe.Recipe_Image.value!=""&&LimitAttach(document.post_recipe.Recipe_Image)==false){document.post_recipe.Recipe_Image.focus();return false;}
else if(document.post_recipe.recaptcha_response_field.value=='')
{alert("Please Enter Security Code");document.post_recipe.recaptcha_response_field.focus();return false;}
return true;}
function recordPostRecipeFormSubmit(callback){var form_submitted;if(!validatePostRecipeForm())return false;relTargetSelect();submitButtonRef=document.getElementById('submit_btn');submitButtonRef.innerHTML='Please Wait...';submitButtonRef.disabled=true;document.getElementById('post_recipe').submit();}
function getCuisineRecipes(cuisineid)
{document.getElementById('defaultrecipes').style.visibility='hidden';document.getElementById('defaultrecipes').style.display='none';document.getElementById('cuisinerecipes').style.visibility='visible';document.getElementById('cuisinerecipes').style.display='';var pars='cuisineid='+escape(cuisineid);var myAjax=new Ajax.Updater('cuisinerecipes','getcuisinerecipes.php',{method:'get',parameters:pars});}
function validatesuggestion()
{if(document.suggestion.name.value=="")
{alert("Please enter Name");document.suggestion.name.focus();return false;}else
if(document.suggestion.email.value=="")
{alert("Please enter Email");document.suggestion.email.focus();return false;}if(checkemail(document.suggestion.email)==false)
{document.suggestion.email.focus();return false;}else
if(document.suggestion.suggestion.value=="")
{alert("Please enter the Suggestion");document.suggestion.suggestion.focus();return false;}
return true;}
function validateTipForm()
{if(document.tip_form.Auther_Name.value=="")
{alert("Please Enter your name ");document.tip_form.Auther_Name.focus();return false;}
else if(document.tip_form.Author_Email.value=="")
{alert("Please Enter Email ");document.tip_form.Author_Email.focus();return false;}
if(checkemail(document.tip_form.Author_Email)==false)
{document.tip_form.Author_Email.focus();return false;}
else if(document.tip_form.Tip_Name.value=="")
{alert("Please Enter The Tip name ");document.tip_form.Tip_Name.focus();return false;}
else if(document.tip_form.Tip_Description.value=="")
{alert("Please Enter Tip description ");document.tip_form.Tip_Description.focus();return false;}
return true;}
function validatepostquery()
{if(document.postquery.name.value=="")
{alert("Please enter Name");document.postquery.name.focus();return false;}else
if(document.postquery.email.value=="")
{alert("Please enter Email");document.postquery.email.focus();return false;}if(checkemail(document.postquery.email)==false)
{document.postquery.email.focus();return false;}else
if(document.postquery.query.value=="")
{alert("Please enter the query message");document.postquery.query.focus();return false;}
return true;}
function validateQueryReply()
{if(document.Query_Reply.name.value=="")
{alert("Please enter Name");document.Query_Reply.name.focus();return false;}else
if(document.Query_Reply.email.value=="")
{alert("Please enter Email");document.Query_Reply.email.focus();return false;}if(checkemail(document.Query_Reply.email)==false)
{document.Query_Reply.email.focus();return false;}else
if(document.Query_Reply.replymessage.value=="")
{alert("Please enter the query message");document.Query_Reply.replymessage.focus();return false;}
return true;}
function validatePostPollForm()
{if(document.post_poll.Email_id.value=="")
{alert("Please enter Email");document.post_poll.Email_id.focus();return false;}else
if(checkemail(document.post_poll.Email_id)==false)
{document.post_poll.Email_id.focus();return false;}else
if(document.post_poll.Poll_Question.value=="")
{alert("Please enter Name");document.post_poll.Poll_Question.focus();return false;}else
if(document.post_poll.Poll_Question.value.length>250)
{alert("Question Shouldnot greater than 250 characters");document.post_poll.Poll_Question.focus();return false;}else
if(document.post_poll.Option1.value=="")
{alert("Please enter Option1");document.post_poll.Option1.focus();return false;}else
if(document.post_poll.Option2.value=="")
{alert("Please enter Option2");document.post_poll.Option2.focus();return false;}else
if(document.post_poll.Option3.value=="")
{alert("Please enter Option3");document.post_poll.Option3.focus();return false;}else
if(document.post_poll.Option4.value=="")
{alert("Please enter Name");document.post_poll.Option4.focus();return false;}
return true;}
function validatePostQuizForm()
{if(document.post_quiz.Email_id.value=="")
{alert("Please enter Email");document.post_quiz.Email_id.focus();return false;}else
if(checkemail(document.post_quiz.Email_id)==false)
{document.post_quiz.Email_id.focus();return false;}else
if(document.post_quiz.Quiz_Question.value=="")
{alert("Please Enter Qusetion Name");document.post_quiz.Quiz_Question.focus();return false;}
if(document.post_quiz.Quiz_Question.value.length>250)
{alert("Question Shouldnot greater than 250 characters");document.post_quiz.Quiz_Question.focus();return false;}
else
if(document.post_quiz.Quiz_Option1.value=="")
{alert("Please Enter the Option1");document.post_quiz.Quiz_Option1.focus();return false;}else
if(document.post_quiz.Quiz_Option2.value=="")
{alert("Please Enter the Option2");document.post_quiz.Quiz_Option2.focus();return false;}else
if(document.post_quiz.Quiz_Option3.value=="")
{alert("Please Enter the Option3");document.post_quiz.Quiz_Option3.focus();return false;}else
if(document.post_quiz.Quiz_Option4.value=="")
{alert("Please Enter the Option4");document.post_quiz.Quiz_Option4.focus();return false;}else
if(document.post_quiz.Quiz_Answer.length>1)
{for(var i=0;i<document.post_quiz.Quiz_Answer.length;i++)
{if(document.post_quiz.Quiz_Answer.Quiz_Answer[i].checked)
{var value=document.post_quiz.Quiz_Answer[i].value;if(value=="none")
{alert("Please Select Answer From Options");return false;}}}}
return true;}
function validateCartoonForm()
{if(document.post_cartoon.User_Email.value=="")
{alert("Please Enter Email");document.post_cartoon.User_Email.focus();return false;}if(checkemail(document.post_cartoon.User_Email)==false)
{document.post_cartoon.User_Email.focus();return false;}else
if(document.post_cartoon.Cartoon_Name.value=="")
{alert("Please Enter Cartoon Name");document.post_cartoon.Cartoon_Name.focus();return false;}
else
if(document.post_cartoon.Cartoon_Description.value=="")
{alert("Please Enter Cartoon Description");document.post_cartoon.Cartoon_Description.focus();return false;}
else
if(document.post_cartoon.cartoon_image.value=="")
{alert("Please select Cartoon Image");document.post_cartoon.cartoon_image.focus();return false;}else if(LimitAttach(document.post_cartoon.cartoon_image)==false){document.post_cartoon.cartoon_image.focus();return false;}
return true;}
function getIndexRecipes(indexid)
{document.getElementById('indexdefault').style.visibility='hidden';document.getElementById('indexdefault').style.display='none';document.getElementById('indexrecipes').style.visibility='visible';document.getElementById('indexrecipes').style.display='';var pars='indexid='+escape(indexid);var myAjax=new Ajax.Updater('indexrecipes','getindexrecipes.php',{method:'get',parameters:pars});submitLink=document.getElementById('indexrecipes');submitLink.innerHTML='Please Wait getting the Information...';}
function validatechefcomment()
{if(document.chefcomment.name.value=="")
{alert("Please enter Name");document.chefcomment.name.focus();return false;}else
if(document.chefcomment.email.value=="")
{alert("Please enter Email");document.chefcomment.email.focus();return false;}if(checkemail(document.chefcomment.email)==false)
{document.chefcomment.email.focus();return false;}else
if(document.chefcomment.comments.value=="")
{alert("Please enter the Comment");document.chefcomment.comments.focus();return false;}
return true;}
function validateForgotPasswordForm()
{if(document.forgot_form.email.value=="")
{alert("please Enter Email");document.forgot_form.email.focus();return false;}if(checkemail(document.forgot_form.email)==false)
{document.forgot_form.email.focus();return false;}
return true;}
function validatecontact()
{if(document.contact.email.value=="")
{alert("Please enter Email");document.contact.email.focus();return false;}if(checkemail(document.contact.email)==false)
{document.contact.email.focus();return false;}else
if(document.contact.title.value=="")
{alert("Please enter title");document.contact.title.focus();return false;}else
if(document.contact.descp.value=="")
{alert("Please enter the Description");document.contact.descp.focus();return false;}
return true;}
function validateChangePassword()
{if(document.changepassword.Current_Password.value=="")
{alert("Please Enter Current Password");document.changepassword.Current_Password.focus();return false;}else
if(document.changepassword.New_Password.value=="")
{alert("Please Enter New Password");document.changepassword.New_Password.focus();return false;}else
if(document.changepassword.Confirm_Password.value=="")
{alert("Please Enter Confirm Password");document.changepassword.Confirm_Password.focus();return false;}else
if(document.changepassword.New_Password.value!=document.changepassword.Confirm_Password.value)
{alert("Password Should Match");document.changepassword.Confirm_Password.focus();return false;}
return true;}
function validateUnsubscribe()
{if(document.unsubscribe.User_Email.value=="")
{alert("Please enter Email");document.unsubscribe.User_Email.focus();return false;}if(checkemail(document.unsubscribe.User_Email)==false)
{document.unsubscribe.User_Email.focus();return false;}
return true;}
function validateReviewForm()
{if(document.post_review.Author_Name.value=="")
{alert("Please enter Name");document.post_review.Author_Name.focus();return false;}else
if(document.post_review.Author_Email.value=="")
{alert("Please enter Email");document.post_review.Author_Email.focus();return false;}if(checkemail(document.post_review.Author_Email)==false)
{document.post_review.Author_Email.focus();return false;}else
if(document.post_review.Title.value=="")
{alert("Please enter the title");document.post_review.Title.focus();return false;}
else
if(document.post_review.Review.value=="")
{alert("Please enter the review");document.post_review.Review.focus();return false;}
else
if(document.post_review.Rating.value=="0")
{alert("Please select rating");document.post_review.Rating.focus();return false;}
else if(document.post_review.recaptcha_response_field.value=='')
{alert("Please Enter Security Code");document.post_review.recaptcha_response_field.focus();return false;}
return true;}
function validateGuesswinForm()
{if(document.Guesswin_Form.Recipe_Name.value=="")
{alert("Please enter Recipe Name");document.Guesswin_Form.Recipe_Name.focus();return false;}if(document.Guesswin_Form.Your_Name.value=="")
{alert("Please enter Your Name");document.Guesswin_Form.Your_Name.focus();return false;}else
if(document.Guesswin_Form.Email.value=="")
{alert("Please enter Email");document.Guesswin_Form.Email.focus();return false;}if(checkemail(document.Guesswin_Form.Email)==false)
{document.Guesswin_Form.Email.focus();return false;}
return true;}
function validatePostRecipeCombination()
{if(document.post_combination_form.Author_Name.value=="")
{alert("Please enter Your Name");document.post_combination_form.Author_Name.focus();return false;}else
if(document.post_combination_form.Author_Email.value=="")
{alert("Please enter Your Email");document.post_combination_form.Author_Email.focus();return false;}else
if(checkemail(document.post_combination_form.Author_Email)==false)
{document.post_combination_form.Author_Email.focus();return false;}else
if(document.post_combination_form.Cuisine_Guid.value=="0")
{alert("Please Select Cuisine");document.post_combination_form.Cuisine_Guid.focus();return false;}else
if(document.post_combination_form.Dish.value=="")
{alert("Please Enter Dish Name");document.post_combination_form.Dish.focus();return false;}else
if(document.post_combination_form.Accompaniment1.value=="")
{alert("Please Enter Accompaniment1");document.post_combination_form.Accompaniment1.focus();return false;}
return true;}
function MM_openBrWindow(theURL,winName,features)
{window.open(theURL,winName,features);}
function validateAddCartForm()
{if(document.add_cart_form.Product_Quantity.value==""||document.add_cart_form.Product_Quantity.value==0)
{alert("Please Enter Quantity");document.add_cart_form.Product_Quantity.focus();return false;}if(IsNumber(document.add_cart_form.Product_Quantity.value)==false)
{alert("Please Enter Numerics Only");document.add_cart_form.Product_Quantity.focus();return false;}
return true;}
function validateAddressForm()
{if(document.address_form.Firstname.value=="")
{alert("Please Enter Firstname");document.address_form.Firstname.focus();return false;}
else
if(document.address_form.Lastname.value=="")
{alert("Please Enter Lastname");document.address_form.Lastname.focus();return false;}
else
if(document.address_form.Address1.value=="")
{alert("Please Enter Address1");document.address_form.Address1.focus();return false;}
else
if(document.address_form.City.value=="")
{alert("Please Enter City");document.address_form.City.focus();return false;}
else
if(document.address_form.State.value=="")
{alert("Please Enter State");document.address_form.State.focus();return false;}
else
if(document.address_form.Country.value=="")
{alert("Please Enter Country");document.address_form.Country.focus();return false;}
else
if(document.address_form.Zip_Code.value=="")
{alert("Please Enter Zip Code");document.address_form.Zip_Code.focus();return false;}if(IsNumber(document.address_form.Zip_Code.value)==false)
{alert("Zip Code Should have numbers only");document.address_form.Zip_Code.focus();return false;}
else
if(document.address_form.Zip_Code.value.length>6)
{alert("Zip Code Exceeds");document.address_form.Zip_Code.focus();return false;}
else
if(document.address_form.Phone.value=="")
{alert("Please Enter Phone Number");document.address_form.Phone.focus();return false;}if(IsNumber(document.address_form.Phone.value)==false)
{alert("Phone Should have numbers only");document.address_form.Phone.focus();return false;}
else
if(document.address_form.Phone.value.length>13)
{alert("Phone Code Exceeds");document.address_form.Phone.focus();return false;}
else
if(document.address_form.Fax.value!=""&&IsNumber(document.address_form.Fax.value)==false)
{alert("Fax Should have numbers only");document.address_form.Fax.focus();return false;}
else
if(document.address_form.Fax.value.length>13)
{alert("Fax Code Exceeds");document.address_form.Fax.focus();return false;}
return true;}
function validaterecommendform()
{if(document.recommend.region.value=="")
{alert("Please Select Region");document.recommend.region.focus();return false;}else
if(document.getElementById('defaultcountry').style.visibility=='visible'&&document.getElementById('defaultcountry').style.display==''&&document.recommend.country.value=="")
{alert("Please Select Country");document.recommend.country.focus();return false;}else
if(document.getElementById('acountry').style.visibility=='visible'&&document.getElementById('acountry').style.display==''&&document.recommend.ocountry.value=="")
{alert("Please Select Country");document.recommend.ocountry.focus();return false;}else
if(document.recommend.state.value=="")
{alert("Please Enter State");document.recommend.state.focus();return false;}
else
if(document.getElementById('defaultcity').style.visibility=='visible'&&document.getElementById('defaultcity').style.display==''&&document.recommend.city.value=="")
{alert("Please Select City");document.recommend.city.focus();return false;}
else
if(document.getElementById('acity').style.visibility=='visible'&&document.getElementById('acity').style.display==''&&document.recommend.ocity.value=="")
{alert("Please Select City");document.recommend.ocity.focus();return false;}
else
if(document.getElementById('defaultcity').style.visibility=='visible'&&document.getElementById('defaultcity').style.display==''&&document.recommend.city.value=="others"&&document.recommend.textcity.value=="")
{alert("Please Enter City Name");document.recommend.textcity.focus();return false;}
else
if(document.getElementById('acity').style.visibility=='visible'&&document.getElementById('acity').style.display==''&&document.recommend.ocity.value=="others"&&document.recommend.textcity.value=="")
{alert("Please Enter City Name");document.recommend.textcity.focus();return false;}
else
if(document.getElementById('defaultrestaurant').style.visibility=='visible'&&document.getElementById('defaultrestaurant').style.display==''&&document.recommend.restaurant.value=="")
{alert("Please Select Restaurant");document.recommend.Restaurant.focus();return false;}
else
if(document.getElementById('arestaurant').style.visibility=='visible'&&document.getElementById('arestaurant').style.display==''&&document.recommend.orestaurant.value=="")
{alert("Please Select Restaurant");document.recommend.orestaurant.focus();return false;}
else
if(((document.getElementById('defaultrestaurant').style.visibility=='visible'&&document.getElementById('defaultrestaurant').style.display==''&&document.recommend.restaurant.value=="others")||(document.getElementById('arestaurant').style.visibility=='visible'&&document.getElementById('arestaurant').style.display==''&&document.recommend.orestaurant.value=="others"))&&document.recommend.textrestaurant.value=="")
{alert("Please Enter Restaurant Name");document.recommend.textrestaurant.focus();return false;}else
if(document.recommend.Cuisine_Guid.value=="0")
{alert("Please Select Cuisine");document.recommend.Cuisine_Guid.focus();return false;}else
if(document.recommend.dish.value=="")
{alert("Please Enter Dish Name");document.recommend.dish.focus();return false;}
else
if(document.recommend.description.value=="")
{alert("Please Eneter Speciality of The Restaurant");document.recommend.description.focus();return false;}
else
if(document.recommend.area.value=="")
{alert("Please Eneter Area");document.recommend.area.focus();return false;}
else
if(document.recommend.authorname.value=="")
{alert("Please Eneter Author Name");document.recommend.authorname.focus();return false;}
else
if(document.recommend.authoremail.value=="")
{alert("Please Eneter Author Email");document.recommend.authoremail.focus();return false;}else
if(checkemail(document.recommend.authoremail)==false)
{document.recommend.authoremail.focus();return false;}
return true;}
function validateCommentForm()
{if(document.dish_comment_form.comment_title.value=="")
{alert("Enter Comment Title");document.dish_comment_form.comment_title.focus();return false;}else
if(document.dish_comment_form.comment_desc.value=="")
{alert("Enter Comment Description");document.dish_comment_form.comment_desc.focus();return false;}else
if(document.dish_comment_desc.author_name.value=="")
{alert("Enter Your Name");document.dish_comment_form.author_name.focus();return false;}else
if(document.dish_comment_desc.author_email.value=="")
{alert("Enter Your Name");document.dish_comment_form.author_email.focus();return false;}}