// JavaScript Document function validateRegister_1(theform){ if(theform.name.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Name"; theform.name.focus(); return false; } if(theform.email.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Email"; theform.email.focus(); return false; } if(theform.cmbmenu.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select a Menu"; theform.cmbmenu.focus(); return false; } if(theform.companyname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Company Name"; theform.companyname.focus(); return false; } if(theform.titlecompany.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Company Title"; theform.titlecompany.focus(); return false; } if(theform.phone.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Phone"; theform.phone.focus(); return false; } } function ValidateUploadCV(theform){ if(theform.firstname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter First Name"; theform.firstname.focus(); return false; } if(theform.lastname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Last Name"; theform.lastname.focus(); return false; } if(theform.gender.value==0){ document.getElementById("txtRegitser").innerHTML="Please select the Gender"; theform.gender.focus(); return false; } if(theform.months.value==0){ document.getElementById("txtRegitser").innerHTML="Please select the Month"; theform.months.focus(); return false; } if(theform.days.value==0){ document.getElementById("txtRegitser").innerHTML="Please select the Day"; theform.days.focus(); return false; } if(theform.years.value==0){ document.getElementById("txtRegitser").innerHTML="Please select the Year"; theform.years.focus(); return false; } if(theform.email.value==0){ document.getElementById("txtRegitser").innerHTML="Please Enter your Email"; theform.email.focus(); return false; } if(theform.countryID.value==0){ document.getElementById("txtRegitser").innerHTML="Please select your Country"; theform.countryID.focus(); return false; } if(theform.phone_home.value==0){ document.getElementById("txtRegitser").innerHTML="Please select your Country"; theform.phone_home.focus(); return false; } if(theform.phone_mobile.value==0){ document.getElementById("txtRegitser").innerHTML="Please select your Country"; theform.phone_mobile.focus(); return false; } } function ValidateCustomMenu(theform){ if(theform.name.value==0){ document.getElementById("txtRegitser").innerHTML="Please Enter Name"; theform.name.focus(); return false; } if(theform.day_time_phone.value==0){ document.getElementById("txtRegitser").innerHTML="Please Enter Day Time Phone"; theform.day_time_phone.focus(); return false; } if(theform.email.value==0){ document.getElementById("txtRegitser").innerHTML="Please Enter Email Address"; theform.email.focus(); return false; } if(theform.occasion.value==0){ document.getElementById("txtRegitser").innerHTML="Please Enter Occasion"; theform.occasion.focus(); return false; } if(theform.event_location.value==0){ document.getElementById("txtRegitser").innerHTML="Please Enter Location of Event"; theform.event_location.focus(); return false; } } function ValidateCreditCard(theform){ if(theform.cmbtitle.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select Title"; theform.cmbtitle.focus(); return false; }////emd of if if(theform.firstname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter First Name"; theform.firstname.focus(); return false; }////emd of if if(theform.lastname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Last Name"; theform.lastname.focus(); return false; }////emd of if if(theform.cardno.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Your Credit Card Number"; theform.cardno.focus(); return false; }////emd of if if(theform.month.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select the Card Expiry Month"; theform.month.focus(); return false; }////emd of if if(theform.year.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select the Card Expiry Year"; theform.year.focus(); return false; }////emd of if if(theform.cvvno.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Your CVV Number"; theform.cvvno.focus(); return false; }////emd of if if(theform.address1.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Address"; theform.address1.focus(); return false; }////emd of if if(theform.city.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Your City Name"; theform.city.focus(); return false; }////emd of if if(theform.zipcode.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Your Zipcode"; theform.zipcode.focus(); return false; }////emd of if if(theform.Counties.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select your Country"; theform.Counties.focus(); return false; }////emd of if }///end of function ///////////////////Edit Profile Validations//////////////////////////// function validateEditProfile(theform){ if(theform.firstname.value==""){ document.getElementById("txtHint").innerHTML="Please Enter First Name"; theform.firstname.focus(); return false; }////emd of if if(theform.lastname.value==""){ document.getElementById("txtHint").innerHTML="Please Enter Last Name"; theform.lastname.focus(); return false; }////emd of if if(theform.email.value==""){ document.getElementById("txtHint").innerHTML="Please Enter Email Address"; theform.email.focus(); return false; }////emd of if /////Validate Email if(validateEmail(theform.email.value)==false){ document.getElementById("txtHint").innerHTML="Please Enter Valid Email Address"; theform.email.focus(); return false; } ////End Validate Email if(theform.password.value!=""){ if(theform.password.value.length<5){ document.getElementById("txtHint").innerHTML="Password Length Must be gratter than 4"; theform.password.focus(); return false; }////emd of if if(theform.newpassword.value==""){ document.getElementById("txtHint").innerHTML="Please Enter the New Password"; theform.newpassword.focus(); return false; }////emd of if if(theform.newpassword.value.length<5){ document.getElementById("txtHint").innerHTML="New Password Length Must be gratter than 4"; theform.newpassword.focus(); return false; }////emd of if if(theform.rnewpassword.value==""){ document.getElementById("txtHint").innerHTML="Please Enter the Retype New Password"; theform.rnewpassword.focus(); return false; }////emd of if if(theform.rnewpassword.value.length<5){ document.getElementById("txtHint").innerHTML="Retype Password Length Must be gratter than 4"; theform.rnewpassword.focus(); return false; }////emd of if if(theform.rnewpassword.value.length!=theform.newpassword.value.length){ document.getElementById("txtHint").innerHTML="New Password Does not match with Retype New Password"; theform.rnewpassword.focus(); return false; }////emd of if }////emd of if if(theform.contactnumber.value==""){ document.getElementById("txtHint").innerHTML="Please Enter Contact Number"; theform.contactnumber.focus(); return false; }////emd of if if(theform.zipcode.value==""){ document.getElementById("txtHint").innerHTML="Please Enter Zip/Postal Code"; theform.zipcode.focus(); return false; }////emd of if if(theform.address1.value==""){ document.getElementById("txtHint").innerHTML="Please Enter Address"; theform.address1.focus(); return false; }////emd of if //alert(theform.firstname.value); } ///////////////////End Edit Profile Validations//////////////////////////// ///////////////////Register Process Validations//////////////////////////// function validateRegister(theform){ if(theform.cmbtitle.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select Title"; theform.cmbtitle.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.firstname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter First Name"; theform.firstname.focus(); window.scrollTo(0,230); return false; }////emd of if /* var REG=/^([0-9\-]*)+$/; if(REG.test(theform.firstname.value)==false){ document.getElementById("txtRegitser").innerHTML="Please Enter Numeric Value"; theform.firstname.focus(); window.scrollTo(0,230); return false; } */ if(theform.lastname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Last Name"; theform.lastname.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.contactnumber.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Contact Number"; theform.contactnumber.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.email.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Email Address"; theform.email.focus(); window.scrollTo(0,230); return false; }////emd of if /////Validate Email if(validateEmail(theform.email.value)==false){ document.getElementById("txtRegitser").innerHTML="Please Enter Valid Email Address"; theform.email.focus(); window.scrollTo(0,230); return false; } ////End Validate Email if(theform.password.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Password"; theform.password.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.password.value.length<5){ document.getElementById("txtRegitser").innerHTML="Password Length Must be gratter than 4"; theform.password.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.cpassword.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Confirm Password"; theform.cpassword.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.cpassword.value!=theform.password.value){ document.getElementById("txtRegitser").innerHTML="Password Does not match with confirm Password"; theform.cpassword.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.address1.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Address"; theform.address1.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.code_id.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select Your Dublin Code"; theform.code_id.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.town.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select Your Location"; theform.town.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.chkagree.checked==false){ document.getElementById("txtRegitser").innerHTML="You have not agreed to the Terms & Conditions"; theform.chkagree.focus(); window.scrollTo(0,230); return false; }////emd of if //alert(theform.firstname.value); } function validateEmail(strValue){ /************************************************ DESCRIPTION: Validates that a string contains a valid email pattern. PARAMETERS: strValue - String to be tested for validity RETURNS: True if valid, otherwise false. REMARKS: Accounts for email with country appended does not validate that email contains valid URL type (.com, .gov, etc.) or valid country suffix. *************************************************/ var objRegExp = /^([a-zA-Z0-9])+([a-zA-Z0-9_\.\-]*)+\@(([a-zA-Z0-9-])+([-]*)+\.)+([a-zA-Z0-9]{2,4})+$/; //check for valid email return objRegExp.test(strValue); } //////////////////End Registration Process //////////////////////////////// ///////////Login Box////////////// function validateLogin(theform){ if(theform.txtemail.value==""){ document.getElementById("txtLogin").innerHTML="Please Enter Email Address"; theform.txtemail.focus(); return false; }////emd of if if(validateEmail(theform.txtemail.value)==false){ document.getElementById("txtLogin").innerHTML="Please Enter Valid Email Address"; theform.txtemail.focus(); return false; } if(theform.txtpassword.value==""){ document.getElementById("txtLogin").innerHTML="Please Enter Password"; theform.txtpassword.focus(); return false; }////emd of if } //////////End Login Box/////////// //////////Validate Guest Login////////// function ValidateGuestLogin_for_Lunch(theform){ if(theform.contactnumber.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Contact Number"; theform.contactnumber.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.cmbtitle.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select Title"; theform.cmbtitle.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.firstname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter First Name"; theform.firstname.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.lastname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Last Name"; theform.lastname.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.email.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Email Address"; theform.email.focus(); window.scrollTo(0,230); return false; }////emd of if /////Validate Email if(validateEmail(theform.email.value)==false){ document.getElementById("txtRegitser").innerHTML="Please Enter Valid Email Address"; theform.email.focus(); window.scrollTo(0,230); return false; } if(theform.company_name.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Your Company Name"; theform.company_name.focus(); window.scrollTo(0,230); return false; } ////End Validate Email } function ValidateGuestLogin(theform){ if(theform.contactnumber.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Contact Number"; theform.contactnumber.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.cmbtitle.value==0){ document.getElementById("txtRegitser").innerHTML="Please Select Title"; theform.cmbtitle.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.firstname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter First Name"; theform.firstname.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.lastname.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Last Name"; theform.lastname.focus(); window.scrollTo(0,230); return false; }////emd of if if(theform.email.value==""){ document.getElementById("txtRegitser").innerHTML="Please Enter Email Addresss"; theform.email.focus(); window.scrollTo(0,230); return false; }////emd of if /////Validate Email if(validateEmail(theform.email.value)==false){ document.getElementById("txtRegitser").innerHTML="Please Enter Valid Email Address"; theform.email.focus(); window.scrollTo(0,230); return false; } ////End Validate Email var group1Checked var group3Checked for (var i=0; i