var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; function validate_quote_sm_form() { var doc=document.quote_sm_form; var number_check = /^(\+)*([0-9])+([-\/\.])*([0-9])+([-\/\.])*([0-9])+$/; if(doc.cname.value=="Your Name" || !doc.cname.value.length) { alert("Please Enter Your Name"); doc.cname.value=""; doc.cname.focus(); return false; } if(doc.cname.value.indexOf('<') != -1 || doc.cname.value.indexOf('>') != -1) { alert("Please don't use HTML Tags in Name"); doc.cname.value=""; doc.cname.focus(); return false; } if(doc.email.value=="Your Email Id" || !doc.email.value.length) { alert("Please enter your EmailID"); doc.email.focus(); return false; } if(!doc.email.value.match(mailformat)) { alert("InValid EmailID"); doc.email.focus(); return false; } if(doc.country.value == 0 || doc.country.value == "Country") { alert("Please Select Your Country"); doc.country.focus(); return false; } if(doc.mobile_no.value=="Your Mobile No." || !doc.mobile_no.value.length) { alert("Please Enter Your Mobile No."); doc.mobile_no.value=""; doc.mobile_no.focus(); return false; } if(doc.mobile_no.value.length < 10) { alert("Please enter a valid Mobile No. first"); doc.mobile_no.focus(); return false; } if(doc.mobile_no.value != 0 && doc.mobile_no.value!="Mobile No." && doc.mobile_no.value!="Your Mobile No.") { if (!number_check.test(doc.mobile_no.value)) { alert("Please enter Numbers only"); doc.mobile_no.focus(); return false; } } if(doc.mobile_no.value.indexOf('<') != -1 || doc.mobile_no.value.indexOf('>') != -1) { alert("Please don't use HTML Tags in Quick Quote"); doc.mobile_no.value=""; doc.mobile_no.focus(); return false; } } function validate_quote_form(){var e=document.quote_form;if(-1!=e.cname.value.indexOf("<")||-1!=e.cname.value.indexOf(">"))return alert("Please do not use HTML Tags in Name"),e.cname.value="",e.cname.focus(),!1;if("Your Email Id"==e.email.value||!e.email.value.length)return alert("Please enter your EmailID"),e.email.value="",e.email.focus(),!1;if(!e.email.value.match(mailformat))return alert("InValid EmailID"),e.email.focus(),!1;if("Your Mobile No."==e.mobile_no.value||!e.mobile_no.value.length)return alert("Please enter your Mobile No."),e.mobile_no.value="",e.mobile_no.focus(),!1;if(0!=e.mobile_no.value&&"Mobile No."!=e.mobile_no.value&&"Your Mobile No."!=e.mobile_no.value&&!/^(\+)*([0-9])+([-\/\.])*([0-9])+([-\/\.])*([0-9])+$/.test(e.mobile_no.value))return alert("Please enter numbers only"),e.mobile_no.focus(),!1;if(91==e.country_code.value){if(e.mobile_no.value.length<10||e.mobile_no.value.length>10)return alert("Please Enter A Valid Mobile Number (10 Digits Number Only)"),e.mobile_no.focus(),!1}else if(e.mobile_no.value.length<8||e.mobile_no.value.length>12)return alert("Please Enter A Valid Mobile Number (8 - 12 Digits Number Only)"),e.mobile_no.focus(),!1;return-1!=e.mobile_no.value.indexOf("<")||-1!=e.mobile_no.value.indexOf(">")?(alert("Please do not use HTML Tags in Quick Quote"),e.mobile_no.value="",e.mobile_no.focus(),!1):e.term.checked?void 0:(alert("Please accpet Terms & Conditions"),e.term.focus(),!1)}function validate_request_call_form(){var e=document.request_call_form;return 0==e.cname.value||"Your Name"==e.cname.value?(alert("Please enter your name"),e.cname.focus(),!1):-1!=e.cname.value.indexOf("<")||-1!=e.cname.value.indexOf(">")?(alert("Please do not use HTML Tags in Name"),e.cname.value="",e.cname.focus(),!1):0==e.email.value?(alert("Please enter your EmailID"),e.email.focus(),!1):-1==e.email.value.indexOf("@")||-1==e.email.value.indexOf(".")?(alert("InValid EmailID"),e.email.value="",e.email.focus(),!1):-1!=e.email.value.indexOf("<")||-1!=e.email.value.indexOf(">")?(alert("Please do not use HTML Tags in email"),e.email.value="",e.email.focus(),!1):0==e.mobile_no.value||"Mobile No."==e.mobile_no.value?(alert("Please enter your Mobile No."),e.mobile_no.focus(),!1):0==e.mobile_no.value||"Mobile No."==e.mobile_no.value||"Your Mobile No."==e.mobile_no.value||/^(\+)*([0-9])+([-\/\.])*([0-9])+([-\/\.])*([0-9])+$/.test(e.mobile_no.value)?-1!=e.mobile_no.value.indexOf("<")||-1!=e.mobile_no.value.indexOf(">")?(alert("Please do not use HTML Tags in Quick Quote"),e.mobile_no.value="",e.mobile_no.focus(),!1):0==e.requirement.value||"Requirements"==e.requirement.value?(alert("Please enter quote requirements"),e.requirement.focus(),!1):e.term.checked?void 0:(alert("Please accpet Terms & Conditions"),e.term.focus(),!1):(alert("Please enter numbers only"),e.mobile_no.focus(),!1)}function validate_contactus_form(){var e=document.contactus_form;return 0==e.Name.value?(alert("Please Enter Your Name"),e.Name.focus(),!1):/^([a-zA-Z\s])+([\s])*([a-zA-Z\s])*$/.test(e.Name.value)?0==e.Email.value?(alert("Please Enter Your Email Address"),e.Email.focus(),!1):-1==e.Email.value.indexOf("@")?(alert("InValid E-mail address"),e.Email.value="",e.Email.focus(),!1):-1==e.Email.value.indexOf(".")?(alert("InValid E-mail address"),e.Email.value="",e.Email.focus(),!1):e.Email.value.indexOf("@")!=e.Email.value.lastIndexOf("@")?(alert("Please Specify One E-mail address only"),e.Email.value="",e.Email.focus(),!1):0==e.country.value||"Country"==e.country.value?(alert("Please Select Your Country"),e.country.focus(),!1):0==e.Mobile.value||"Mobile *"==e.Mobile.value?(alert("Please enter your Mobile No. first before asking for quick quote"),e.Mobile.focus(),!1):e.Mobile.value.length<10||10")?(alert("Please do not use HTML Tags in Quick Quote"),e.Mobile.value="",e.Mobile.focus(),!1):void 0:(alert("Please enter numbers only"),e.Mobile.focus(),!1):(alert("Name should be in alphabets only"),e.Name.focus(),!1)}function html_entities_check(val,val1){var doc=eval(document.val);if(-1!=val1.value.indexOf("<")||-1!=val1.value.indexOf(">"))return alert("You cannot use HTML Tags in this field..."),val1.value="",val1.focus(),!1}function validate_feedback_form(){var e=document.feedback_form;return""==e.Queryfor.value?(alert("Please select type of Comment/Suggestion you want to give."),e.Queryfor.focus(),!1):0==e.message.value?(alert("Please enter your query message"),e.message.focus(),!1):e.message.value.indexOf("<")>=0&&e.message.value.indexOf(">")>=0?(alert("Please do not use HTML Tags in discription"),e.message.value="",e.message.focus(),!1):0==e.Name.value?(alert("Please Enter Your Name"),e.Name.focus(),!1):0==e.Email.value?(alert("Please Enter Your Email Address"),e.Email.focus(),!1):-1==e.Email.value.indexOf("@")?(alert("InValid E-mail address"),e.Email.value="",e.Email.focus(),!1):-1==e.Email.value.indexOf(".")?(alert("InValid E-mail address"),e.Email.value="",e.Email.focus(),!1):e.Email.value.indexOf("@")!=e.Email.value.lastIndexOf("@")?(alert("Please Specify One E-mail address only"),e.Email.value="",e.Email.focus(),!1):void 0}function validate_chars_left(e,l){var a=parseInt(document.getElementById(e).value.length);a<=l?document.getElementById("chars_left").innerHTML=l-parseInt(a):document.getElementById("chars_left").value=0}function payment_form_valid(e){var l=e.elements.length,a=0;for(j=0;j10)return alert("Please Enter A Valid Mobile Number (10 Digits Number Only)."),e.mobile_no.focus(),!1}else if(e.mobile_no.value.length<8||e.mobile_no.value.length>12)return alert("Please Enter A Valid Mobile Number (8 - 12 Digits Number Only)."),e.mobile_no.focus(),!1} function validate_wicrm_form(){var e=document.wicrm;if(0==e.name.value)return alert("Please Enter Your Name \n"),e.name.focus(),!1;if(!/^([a-zA-Z\s])+([\s])*([a-zA-Z\s])*$/.test(e.name.value))return alert("Name should be in alphabets only"),e.name.focus(),!1;if(0==e.email.value)return alert("Please Enter Your Email Address \n"),e.Email.focus(),!1;if(!e.email.value.match(mailformat))return alert("InValid E-mail address"),e.email.focus(),!1;if(0==e.country_codes.value)return alert("Please Select Your Country"),e.country_codes.focus(),!1;if(0==e.mobiles.value)return alert("Please Enter Your Mobile Number"),e.mobiles.focus(),!1;if(isNaN(e.mobiles.value))return alert("Please Enter Mobile Number in Numbers Only."),e.mobiles.focus(),!1;if("91"==e.country_codes.value){if(e.mobiles.value.length<10||10p').addClass('alrt').append('
')} function valName(e){if(0==e.value){$(e).parents('.call_box>p').removeClass('alrt').find('.e_box').remove();var DG=$(e).prop('placeholder');if(!DG){DG='Name'}else{};return $(e).parents('.call_box>p').addClass('alrt').append('
'),$(e).parents('.call_box>p').find('.e_box').text('Enter '+DG),/*e.focus(),*/!1}else if(!/^([a-zA-Z\s])+([\s])*([a-zA-Z\s])*$/.test(e.value)){return $(e).parents('.call_box>p').addClass('alrt').append('
'),$(e).parents('.call_box>p').find('.e_box').text('Invalid Name'),/*e.focus(),*/!1}else{$(e).parents('.call_box>p').removeClass('alrt').find('.e_box').remove()}} function valEmail(e){if(0==e.value){$(e).parents('.call_box>p').removeClass('alrt').find('.e_box').remove();return $(e).parents('.call_box>p').addClass('alrt').append('
'),$(e).parents('.call_box>p').find('.e_box').text("Enter Your Email Id \n"),!1} else if(!e.value.match(mailformat)){$(e).parents('.call_box>p').removeClass('alrt').find('.e_box').remove(); return $(e).parents('.call_box>p').addClass('alrt').append('
'),$(e).parents('.call_box>p').find('.e_box').text("Invalid E-mail address"),!1} else{$(e).parents('.call_box>p').removeClass('alrt').find('.e_box').remove()}} function valTel(e){if(0==e.value){$(e).parents('.call_box>p').removeClass('alrt').find('.e_box').remove();return $(e).parents('.call_box>p').addClass('alrt').append('
'),$(e).parents('.call_box>p').find('.e_box').text("Enter Your Mobile Number"),/*e.focus(),*/!1}else if(isNaN(e.value)){return $(e).parents('.call_box>p').addClass('alrt').append('
'),$(e).parents('.call_box>p').find('.e_box').text("Enter Numbers Only."),/*e.focus(),*/!1}else{$(e).parents('.call_box>p').removeClass('alrt').find('.e_box').remove()} ;console.log($('#country_codes').val()) if("91"==$('#country_codes').val()){if(e.value.length<10||10p').addClass('alrt').append('
'),$(e).parents('.call_box>p').find('.e_box').text("Invalid Mobile Number"),/*e.focus(),*/!1}}else if(e.value.length<8||12p').addClass('alrt').append('
'),$(e).parents('.call_box>p').find('.e_box').text("InValid Mobile Number"),/*e.focus(),*/!1}else{$(e).parents('.call_box>p').removeClass('alrt').find('.e_box').remove()}} function validate_wiedu_form(){var e=document.wiedu; if(0==e.cname.value)return alert("Please Enter Your Name \n"),e.cname.focus(),!1; if(!/^([a-zA-Z\s])+([\s])*([a-zA-Z\s])*$/.test(e.name.value))return alert("Name should be in alphabets only"),e.name.focus(),!1; if(0==e.email.value)return /*alert("Please Enter Your Email Address \n"),*/e.Email.focus(),!1; if(-1==e.email.value.indexOf("@")) return /*alert("Error in E-mail address"),e.email.value="",*/e.email.focus(),!1; if(-1==e.email.value.indexOf(".")) return /*alert("Error in E-mail address"),e.email.value="",*/e.email.focus(),!1; if(e.email.value.indexOf("@")!=e.email.value.lastIndexOf("@")) return /*alert("Please Specify One E-mail address only"),e.email.value="",*/e.email.focus(),!1; if(0==e.country_codes.value) return /*alert("Please Select Your Country"),*/e.country_codes.focus(),!1; if(0==e.mobiles.value) return /*alert("Please Enter Your Mobile Number"),*/e.mobiles.focus(),!1; if(isNaN(e.mobiles.value)) return /*alert("Please Enter Mobile Number in Numbers Only."),*/e.mobiles.focus(),!1; if("91"==e.country_codes.value){ if(e.mobiles.value.length<10||10