function changestatus(e,a,r,t,s){var l=$("#"+a).val();$(r).html();""!=l&&$.ajax({url:e+"ajax/changestatus",data:{status:l,id:t,module:s},type:"post",beforeSend:function(){$(r).removeClass("label-danger"),$(r).removeClass("label-success"),$(r).html('')},success:function(e){"Active"==(l=e.trim())?($(r).html(''),$(r).removeClass("label-danger"),$(r).addClass("label-success")):"Inactive"==l&&($(r).html(''),$(r).removeClass("label-success"),$(r).addClass("label-danger")),$("#"+a).val(l)}})}function changefeaturedstatus(e,a,r,t,s){var l=$("#"+a).val();$(r).html();""!=l&&$.ajax({url:e+"ajax/changefeaturedstatus",data:{fstatus:l,id:t,module:s},type:"post",beforeSend:function(){$(r).removeClass("label-danger"),$(r).removeClass("label-success"),$(r).html('')},success:function(e){"Active"==(l=e.trim())?($(r).html(''),$(r).removeClass("label-danger"),$(r).addClass("label-success")):"Inactive"==l&&($(r).html(''),$(r).removeClass("label-success"),$(r).addClass("label-danger")),$("#"+a).val(l)}})}function changefeaturedsts(e,a,r,t,s){var l=$("#"+a).val();$(r).html();""!=l&&$.ajax({url:e+"ajax/changefeaturedsts",data:{status:l,id:t,module:s},type:"post",beforeSend:function(){$(r).removeClass("label-danger"),$(r).removeClass("label-success"),$(r).html('')},success:function(e){"Active"==(l=e.trim())?($(r).html(''),$(r).removeClass("label-danger"),$(r).addClass("label-success")):"Inactive"==l&&($(r).html(''),$(r).removeClass("label-success"),$(r).addClass("label-danger")),$("#"+a).val(l)}})}function changetopsts(e,a,r,t,s){var l=$("#"+a).val();$(r).html();""!=l&&$.ajax({url:e+"ajax/changetopsts",data:{status:l,id:t,module:s},type:"post",beforeSend:function(){$(r).removeClass("label-danger"),$(r).removeClass("label-success"),$(r).html('')},success:function(e){"Active"==(l=e.trim())?($(r).html(''),$(r).removeClass("label-danger"),$(r).addClass("label-success")):"Inactive"==l&&($(r).html(''),$(r).removeClass("label-success"),$(r).addClass("label-danger")),$("#"+a).val(l)}})}function changebeststs(e,a,r,t,s){var l=$("#"+a).val();$(r).html();""!=l&&$.ajax({url:e+"ajax/changebeststs",data:{status:l,id:t,module:s},type:"post",beforeSend:function(){$(r).removeClass("label-danger"),$(r).removeClass("label-success"),$(r).html('')},success:function(e){"Active"==(l=e.trim())?($(r).html(''),$(r).removeClass("label-danger"),$(r).addClass("label-success")):"Inactive"==l&&($(r).html(''),$(r).removeClass("label-success"),$(r).addClass("label-danger")),$("#"+a).val(l)}})}function changedealsts(e,a,r,t,s){var l=$("#"+a).val();$(r).html();""!=l&&$.ajax({url:e+"ajax/changedealsts",data:{status:l,id:t,module:s},type:"post",beforeSend:function(){$(r).removeClass("label-danger"),$(r).removeClass("label-success"),$(r).html('')},success:function(e){"Active"==(l=e.trim())?($(r).html(''),$(r).removeClass("label-danger"),$(r).addClass("label-success")):"Inactive"==l&&($(r).html(''),$(r).removeClass("label-success"),$(r).addClass("label-danger")),$("#"+a).val(l)}})}function check(e){e.value!=document.getElementById("password").value?e.setCustomValidity("Password Must be Matching."):e.setCustomValidity("")}function registration(e){var a,r="";if(""==(a=$("#username").val())&&($("#username").css("border-color","red"),r=1),""==(a=$("#name").val())&&($("#name").css("border-color","red"),r=1),""==(a=$("#company").val())&&($("#company").css("border-color","red"),r=1),""==(a=$("#email").val())&&($("#email").css("border-color","red"),r=1),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($("#email").val())||""==a||($("#email").css("border-color","red"),r=1),""==(a=$("#password").val())&&($("#password").css("border-color","red"),$("#passwordErr").html("Enter Password"),r=1),""==(a=$("#password_confirm").val())&&($("#password_confirm").css("border-color","red"),$("#password_confirmErr").html("Enter Confirm Password"),r=1),$("#password").val()!=$("#password_confirm").val()&&""!=$("#password").val()&&($("#password_confirm").css("border-color","red"),$("#password_confirmErr").html("Password does not match"),r=1),""==(a=$("#phone").val())&&($("#phone").css("border-color","red"),$("#phoneErr").html("Enter Mobile No"),r=1),""==(a=$("#website").val())&&($("#website").css("border-color","red"),r=1),""==(a=$("#compititors").val())&&($("#compititors").css("border-color","red"),r=1),document.getElementById("txtCaptcha").value!=document.getElementById("captcha").value)return $("#captcha").css("border-color","#e85445"),$("#captchaError").html("Captcha code did not match."),setTimeout((function(){$("#captchaError").html("")}),3e3),!1;if(1!=r){var t=new FormData($("#registerfrm")[0]);$.ajax({url:e+"ajax/registration",data:t,contentType:!1,cache:!1,processData:!1,type:"post",beforeSend:function(){$("#regimsgloader").html('')},success:function(e){"exist"==e&&""!=e?$("#regimsgloader").html('
Congratulations! You Have Successfully Registered With Us. Please Check Your Inbox And Click On Verify Link!
'))}})}return!1}function loginuser(e,a=null){var r="",t=$("#useremail").val(),s=$("#userpassword").val();return""==$("#useremail").val()&&($("#useremail").css("border-color","red"),$("#useremailErr").html("Enter Your Email!"),r=1),""==$("#username").val()&&($("#username").css("border-color","red"),r=1),""==$("#userpassword").val()&&($("#userpassword").css("border-color","red"),$("#userpasswordErr").html("Please Enter Your Password!"),r=1),1!=r&&$.ajax({type:"POST",url:e+"ajax/loginuser",data:{useremail:t,userpassword:s},beforeSend:function(){$("#loginmsgloader").html('')},success:function(r){if("error"!=r||""==r)return $("input:text").val(""),$("input:password").val(""),null==a||""==a?($("#loginfrm").html('
')}})}function validateenqfrm(e){var a="",r=document.getElementById("txtCaptcha").value,t=document.getElementById("captcha").value;""==(s=$("#name").val())&&($("#name").css("border-color","red"),$("#nameErr").html("Enter Name!"),a=1),""==(s=$("#email").val())&&($("#email").css("border-color","red"),$("#emailErr").html("Enter Your Email!"),a=1),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($("#email").val())||""==s||($("#email").css("border-color","red"),$("#emailErr").html("Invalid Email Format!"),a=1),""==(s=$("#phone").val())&&($("#phone").css("border-color","red"),$("#phoneErr").html("Please Enter Phone!"),a=1);var s=$("#phone").val();/^[0-9]+$/.test($("#phone").val())||""==s||($("#phone").css("border-color","red"),$("#phoneErr").html("Invalid Phone"),a=1),""==(s=$("#state").val())&&($("#state").css("border-color","red"),a=1),""==(s=$("#city").val())&&($("#city").css("border-color","red"),a=1),""==(s=$("#requirement").val())&&($("#requirement").css("border-color","red"),a=1);s=$("#requirement").val();return/(?:(?:https?|ftp):\/\/)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?/gi.test($("#requirement").val())&&""!=s&&($("#requirement").css("border-color","red"),$("#requirementErr").html("Please remove URL links"),a=1),r!=t&&($("#captcha").css("border-color","#e85445"),$("#captchaError").html("Captcha code did not match."),a=1),1!=a&&$.ajax({type:"POST",url:e+"ajax/enqfrmprocess",data:$("#enqfrm").serialize(),beforeSend:function(){$("#msgloader").html('
')),setTimeout((function(){$("#msgloader").html("")}),5e3)}}),!1}function addsoftware(e){for(instance in CKEDITOR.instances)CKEDITOR.instances[instance].updateElement();var a="";"superadmin"==$("#actionfrom").val()&&(""==$("#company_name").val()&&($("#company_name").css("border-color","red"),a=1),""==$("#company_website").val()&&($("#company_website").css("border-color","red"),a=1),""==$("#company_email").val()&&($("#company_email").css("border-color","red"),a=1),""==$("#company_phone").val()&&($("#company_phone").css("border-color","red"),a=1));(""==$("#name").val()&&($("#name").css("border-color","red"),a=1),""!=$("#logo").val()||""!=$("#softwareid").val()&&null!=$("#softwareid").val()||($("#logo").css("border-color","red"),a=1),""==$("#tagline").val()&&($("#tagline").css("border-color","red"),a=1),""==$("#product_url").val()&&($("#product_url").css("border-color","red"),a=1),""==$("#primarycategory").val()&&($("#primarycategoryErr").html("This field is required!"),a=1),""==$("#secondarycategory").val()&&($("#secondarycategoryErr").html("This field is required!"),a=1),0==$(".features:checked").length&&($("#errfeature").html("Select features"),a=1),$(".features:checked").length>30&&($("#errfeature").html("Select Maximum 30 features."),a=1),""==$("#competitor").val()&&($("#competitorErr").html("This field is required!"),a=1),""==$("#summary").val()&&($("#summary").css("border-color","red"),a=1),""==$("#description").val()&&($("#descriptionErr").html("This field is required!"),a=1),"update-software"==$("#modulename").val()&&""==$("#plan_name1").val())?(0==$('input[name="accessible"]:checked').length&&($("#accessibleErr").html("This field is required!"),a=1),0==$('input[name="support_browser"]:checked').length&&($("#support_browserErr").html("This field is required!"),a=1),0==$('input[name="free_trial"]:checked').length&&($("#free_trialErr").html("This field is required!"),a=1),0==$('input[name="payment_option[]"]:checked').length&&($("#payment_optionErr").html("This field is required!"),a=1),0==$('input[name="free_plan"]:checked').length&&($("#free_planErr").html("This field is required!"),a=1),0==$('input[name="api_available"]:checked').length&&($("#api_availableErr").html("This field is required!"),a=1),0==$('input[name="customization"]:checked').length&&($("#customizationErr").html("This field is required!"),a=1),0==$('input[name="audience[]"]:checked').length&&($("#audienceErr").html("This field is required!"),a=1),0==$('input[name="desktop_options[]"]:checked').length&&($("#desktop_optionsErr").html("This field is required!"),a=1),0==$('input[name="available_support[]"]:checked').length&&($("#available_supportErr").html("This field is required!"),a=1)):(""==$("#plan_name1").val()&&($("#plan_name1").css("border-color","red"),a=1),""==$("#plan_price1").val()&&($("#plan_price1").css("border-color","red"),a=1),""==$("#plan_unit1").val()&&($("#plan_unit1").css("border-color","red"),a=1),""==$('input[name="plan_feature_1[]"]').val()&&($('input[name="plan_feature_1[]"]').css("border-color","red"),a=1));if(1!=a){var r=new FormData($("#softwarefrm")[0]);$.ajax({url:e+"ajax/addsoftware",data:r,contentType:!1,cache:!1,processData:!1,type:"post",beforeSend:function(){$("#msgloader").html('')},success:function(a){"error"==a&&""!=a?$("#msgloader").html('
Something Went Wrong Please Try Again Later!
'):($("#msgloader").html('
Successfully Submitted!
'),"front"==$("#actionfrom").val()&&setTimeout((function(){window.location.href=e+"update-software/"+a}),2e3),"superadmin"==$("#actionfrom").val()&&setTimeout((function(){window.location.href=e+"siteadmin/software/edit/"+a}),2e3)),setTimeout((function(){$("#msgloader").html("")}),5e3)}})}return!1}function getstate(e){var a=$("#country").val();if("101"!=a)return $("#statesdiv").hide(),!1;$.ajax({type:"POST",url:e+"ajax/getstate",data:{country:a},beforeSend:function(){$("#state").html('')},success:function(e){$("#statesdiv").show(),$("#state").html(e)}})}function delfeature(e,a=null,r=null,t=null){if("update"==a&&""!=r){if(!confirm("Are You Sure Want To Delete This Record!"))return!1;var s=$("#prjtcounter").val();s=parseInt(s)-parseInt(1);$("#prjtcounter").val(s),$.ajax({url:t+"ajax/removefeature",data:{featureid:r},type:"post",beforeSend:function(){},success:function(a){$("#prjtrow"+e).remove()}})}else{var l=$("#prjtcounter").val();l=parseInt(l)-parseInt(1);$("#prjtcounter").val(l),$("#prjtrow"+e).remove()}}function removesftwrimg(e,a,r,t,s){if(a>0){if(!confirm("Are You Sure Want To Delete This Record!"))return!1;$.ajax({url:e+"ajax/removesftwrimg",data:{id:a,imgname:s,type:r},type:"post",beforeSend:function(){$("."+t).html('')},success:function(e){$("."+t).remove()}})}}function removesrvwrimg(e,a,r,t,s){if(a>0){if(!confirm("Are You Sure Want To Delete This Record!"))return!1;$.ajax({url:e+"ajax/removesrvwrimg",data:{id:a,imgname:s,type:r},type:"post",beforeSend:function(){$("."+t).html('')},success:function(e){$("."+t).remove()}})}}function addservice(e){for(instance in CKEDITOR.instances)CKEDITOR.instances[instance].updateElement();var a="";if(""==$("#service_industry").val()&&($("#service_industry").css("border-color","red"),a=1),""!=$("#company_logo").val()||""!=$("#serviceid").val()&&null!=$("#serviceid").val()||($("#company_logo").css("border-color","red"),a=1),""==$("#hourly_rate").val()&&($("#hourly_rate").css("border-color","red"),a=1),""==$("#company_type").val()&&($("#company_type").css("border-color","red"),a=1),""==$("#serviceusers").val()&&($("#serviceusersErr").html("This field is required!"),setTimeout((function(){$("#serviceusersErr").html("")}),2e3),a=1),""==$("#annualrevenue").val()&&($("#annualrevenue").css("border-color","red"),a=1),""==$("#project_size").val()&&($("#project_size").css("border-color","red"),a=1),""==$("#country").val()&&($("#countryErr").html("This field is required!"),setTimeout((function(){$("#countryErr").html("")}),2e3),a=1),""==$("#noofprojects").val()&&($("#noofprojects").css("border-color","red"),a=1),""==$("#service_category").val()&&($("#service_categoryErr").html("This field is required!"),setTimeout((function(){$("#service_categoryErr").html("")}),2e3),a=1),""==$("#company_tagline").val()&&($("#company_tagline").css("border-color","red"),a=1),""==$("#company_overview").val()&&($("#company_overview").css("border-color","red"),a=1),""==$("#description").val()&&($("#descriptionErr").html("This field is required!"),setTimeout((function(){$("#descriptionErr").html("")}),2e3),a=1),""==$("#affiliate").val()&&($("#affiliate").css("border-color","red"),a=1),1!=a){var r=new FormData($("#servicefrm")[0]);$.ajax({url:e+"ajax/addservice",data:r,contentType:!1,cache:!1,processData:!1,type:"post",beforeSend:function(){$("#msgloader").html('')},success:function(a){"error"==a&&""!=a?$("#msgloader").html('
')}})}function copyToClipboard(e){var a=$("");$("body").append(a),a.val($(e).html()).select();var r=$(e).html();function t(e){e.clipboardData.setData("text/html",r),e.clipboardData.setData("text/plain",r),e.preventDefault()}document.addEventListener("copy",t),document.execCommand("copy"),document.removeEventListener("copy",t),$(e).append('Copied Successfully'),setTimeout((function(){$(".msgbx").remove()}),2e3),a.remove(),$("#success").slideDown("slow")}function addreview(e){var a,r="",t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;(""==(a=$("#software_id").val())&&($("#software_id").css("border-color","red"),$("#software_idErr").html("Select Software"),r=1),""==(a=$("#name").val())&&($("#name").css("border-color","red"),$("#nameErr").html("Enter Name"),r=1),"siteadmin"!=$("#action").val())&&(""==(a=$("#email").val())&&($("#email").css("border-color","red"),$("#emailErr").html("Enter Email Id"),r=1),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($("#email").val())||""==a||($("#email").css("border-color","red"),$("#emailErr").html("Invalid Email Id"),r=1));if(""==(a=$("#overall_rating").val())&&($("#ratingbx").html("All ratings are mandatory!"),r=1),""==(a=$("#features").val())&&($("#ratingbx").html("All ratings are mandatory!"),r=1),""==(a=$("#ease_of_use").val())&&($("#ratingbx").html("All ratings are mandatory!"),r=1),""==(a=$("#value_for_money").val())&&($("#ratingbx").html("All ratings are mandatory!"),r=1),""==(a=$("#customer_support").val())&&($("#ratingbx").html("All ratings are mandatory!"),r=1),""==(a=$("#review_title").val())&&($("#review_title").css("border-color","red"),$("#review_titleErr").html("Enter Review Tite"),r=1),t.test($("#review_title").val())&&($("#review_title").css("border-color","red"),$("#review_titleErr").html("URL links are not allowed, please remove URL link from the review title"),r=1),""==(a=$("#your_review").val())&&($("#your_review").css("border-color","red"),$("#your_reviewErr").html("Enter Review"),r=1),t.test($("#your_review").val())&&($("#your_review").css("border-color","red"),$("#your_reviewErr").html("URL links are not allowed, please remove URL link from the review"),r=1),""==(a=$("#impressive_about").val())&&($("#impressive_about").css("border-color","red"),$("#impressive_aboutErr").html("Enter impressive about software"),r=1),""==(a=$("#features_part").val())&&($("#features_part").css("border-color","red"),$("#features_partErr").html("Enter which software features/part can be improved"),r=1),null!=(a=$(".sft_value_for_money:checked").length)&&""!=a||($("#sft_value_for_moneyErr").html("This field is required!"),r=1),null!=(a=$(".satisfied_with_fture:checked").length)&&""!=a||($("#satisfied_with_ftureErr").html("This field is required!"),r=1),null!=(a=$(".software_implementation:checked").length)&&""!=a||($("#software_implementationErr").html("This field is required!"),r=1),""==(a=$("#missing_feature").val())&&($("#missing_feature").css("border-color","red"),$("#missing_featureErr").html("Enter any missing_feature"),r=1),null!=(a=$(".mobile_app:checked").length)&&""!=a||($("#mobile_appErr").html("This field is required!"),r=1),""==(a=$("#mobile_app_rating").val())&&($("#mobile_app_ratingErr").html("This field is required!"),r=1),""==(a=$("#other_software_used").val())&&($("#other_software_used").css("border-color","red"),$("#other_software_usedErr").html("Enter other products like software have you used or evaluated"),r=1),""==(a=$("#software_diff_competitors").val())&&($("#software_diff_competitors").css("border-color","red"),$("#software_diff_competitorsErr").html("Enter How software is better/different from its competitors"),r=1),""==(a=$("#support_rating").val())&&($("#support_ratingErr").html("This field is required!"),r=1),1!=r){var s=new FormData($("#write_reviewfrm")[0]);$.ajax({url:e+"ajax/addreview",data:s,contentType:!1,cache:!1,processData:!1,type:"post",beforeSend:function(){$("#msgloader").html('')},success:function(e){"fail"==e&&""!=e?$("#msgloader").html('
'),setTimeout((function(){location.reload()}),2e3)),setTimeout((function(){$("#msgloader").html("")}),5e3)}})}else $("html, body").animate({scrollTop:$("body").offset().top},1e3);return!1}function sendEnquiry(e){var a="",r=$("#txtCaptchaDiv").html(),t=$("#captcha").val();if(""==$("#send_name").val()&&($("#send_name").css("border-color","red"),a=1),""==$("#send_email_id").val()?($("#send_email_id").css("border-color","red"),a=1):/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($("#send_email_id").val())||($("#send_email_id").css("border-color","#e85445"),a=1),""==$("#send_mobile").val()&&($("#send_mobile").css("border-color","red"),a=1),""==$("#send_city").val()&&($("#send_city").css("border-color","red"),a=1),""==$("#send_preferred_time").val()&&($("#send_preferred_time").css("border-color","red"),a=1),""==$("#captcha").val()?($("#captcha").css("border-color","#e85445"),$("#captchaErr").html("This value is required."),a=1):r!=t&&($("#captcha").css("border-color","#e85445"),$("#captchaErr").html("Captcha code did not match."),a=1),1!=a){var s=new FormData($("#rqstfrm")[0]);$.ajax({url:e+"ajax/sendEnquiry",data:s,contentType:!1,cache:!1,processData:!1,type:"post",beforeSend:function(){$("#enqmsgloader").html('')},success:function(e){"exist"==e&&""!=e?$("#enqmsgloader").html('
You Have Already Sent An Enquiry On This Software!
'),setTimeout((function(){location.reload()}),3e3))}})}return!1}function getsftprice(e){var a="",r=$("#txtCaptchaDiv3").html(),t=$("#captcha3").val();if(""==$("#send_name3").val()&&($("#send_name3").css("border-color","red"),a=1),""==$("#send_email_id3").val()?($("#send_email_id3").css("border-color","red"),a=1):/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($("#send_email_id3").val())||($("#send_email_id3").css("border-color","#e85445"),a=1),""==$("#send_mobile3").val()&&($("#send_mobile3").css("border-color","red"),a=1),""==$("#captcha3").val()?($("#captcha3").css("border-color","#e85445"),$("#captcha3Err").html("This value is required."),a=1):r!=t&&($("#captcha3").css("border-color","#e85445"),$("#captcha3Err").html("Captcha code did not match."),a=1),1!=a){var s=new FormData($("#rqstfrm3")[0]);$.ajax({url:e+"ajax/getsftprice",data:s,contentType:!1,cache:!1,processData:!1,type:"post",beforeSend:function(){$("#enqmsgloader3").html('')},success:function(e){"exist"==e&&""!=e?$("#enqmsgloader3").html('
You Have Already Sent An Enquiry On This Software!
')),setTimeout((function(){$("#msgloader").html("")}),5e3)}})}return!1}function delplan(e,a=null,r=null,t=null){if("update"==a&&""!=r){if(!confirm("Are You Sure Want To Delete This Record!"))return!1;var s=$("#prjtcounter").val();s=parseInt(s)-parseInt(1);$("#prjtcounter").val(s),$.ajax({url:t+"ajax/delplan",data:{featureid:r},type:"post",beforeSend:function(){},success:function(a){$("#prjtrow"+e).remove()}})}else{var l=$("#prjtcounter").val();l=parseInt(l)-parseInt(1);$("#prjtcounter").val(l),$("#prjtrow"+e).remove()}}function getcategorymenu(e){var a=$("#searchcat").val();$.ajax({type:"POST",url:e+"ajax/getcategorymenu",data:{searchcat:a},beforeSend:function(){$(".categorymenubx").html('')},success:function(e){$(".categorymenubx").html(e)}})}function getservicemenu(e){var a=$("#searchser").val();$.ajax({type:"POST",url:e+"ajax/getservicemenu",data:{searchser:a},beforeSend:function(){$(".servicemenubx").html('')},success:function(e){$(".servicemenubx").html(e)}})}function validatecontact(e){event.preventDefault();var a,r="";if(""==(a=$("#name").val())&&($("#name").css("border-color","red"),$("#nameErr").html("Enter Your Name!"),r=1),""==(a=$("#email").val())&&($("#email").css("border-color","red"),$("#emailErr").html("Please Enter Your Email!"),r=1),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($("#email").val())||""==a||($("#email").css("border-color","red"),$("#emailErr").html("Invalid Email Format!"),r=1),""==(a=$("#company").val())&&($("#company").css("border-color","red"),$("#companyErr").html("Enter Your company!"),r=1),""==(a=$("#phone").val())&&($("#phone").css("border-color","red"),$("#phoneErr").html("Enter Your Contact No!"),r=1),/^[0-9]+$/.test($("#phone").val())||""==a||($("#phone").css("border-color","red"),$("#phoneErr").html("Invalid Contact No!"),r=1),""==(a=$("#subject").val())&&($("#subject").css("border-color","red"),r=1),""==(a=$("#message").val())&&($("#message").css("border-color","red"),r=1),""==(a=$("#c_captcha1").val()))return $("#c_captcha1").css("border-color","red"),!1;if($("#c_captcha1").val()!=$("#ccode1").val()&&""!=$("#c_captcha1").val())return alert("Invalid captcha code!"),!1;if(1!=r){var t=new FormData($("#contactfrm")[0]);$.ajax({type:"POST",url:e+"ajax/contactus_proccess",data:t,contentType:!1,cache:!1,processData:!1,beforeSend:function(){$("#msgloader").html('
'))}}),setTimeout((function(){$("#regimsgloader").html("")}),3e3),!1}function validatesecuredpayment(e){var a,r="",t=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;e=$("#basePath").val();""==(a=$("#secured_payment_amount").val())&&($("#secured_payment_amount").css("border-color","red"),$("#secured_payment_amountErr").html("Enter Amount"),r=1),""==(a=$("#secured_payment_quotation_id").val())&&($("#secured_payment_quotation_id").css("border-color","red"),$("#secured_payment_quotation_idErr").html("Enter Quotation Id"),r=1),t.test($("#secured_payment_quotation_id").val())&&($("#secured_payment_quotation_id").css("border-color","red"),$("#secured_payment_quotation_idErr").html("URL links are not allowed, please remove URL link from the quotation id"),r=1),""==(a=$("#secured_payment_name").val())&&($("#secured_payment_name").css("border-color","red"),$("#secured_payment_nameErr").html("Enter Name"),r=1),""==(a=$("#secured_payment_email").val())&&($("#secured_payment_email").css("border-color","red"),$("#secured_payment_emailErr").html("Enter Email Id"),r=1),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($("#secured_payment_email").val())||""==a||($("#secured_payment_email").css("border-color","red"),$("#secured_payment_emailErr").html("Invalid Email Format"),r=1),""==(a=$("#secured_payment_phone").val())&&($("#secured_payment_phone").css("border-color","red"),$("#secured_payment_phoneErr").html(" Enter Phone No."),r=1),/^[0-9]+$/.test($("#secured_payment_phone").val())||""==a||($("#secured_payment_phone").css("border-color","red"),$("#secured_payment_phoneErr").html("Invalid Phone"),r=1),""==(a=$("#secured_payment_country").val())&&($("#secured_payment_country").css("border-color","red"),$("#secured_payment_countryErr").html("Select Country"),r=1),""==$("#secured_payment_address").val()&&($("#secured_payment_address").css("border-color","red"),$("#secured_payment_addressErr").html("Enter Message"),r=1),t.test($("#secured_payment_address").val())&&($("#secured_payment_address").css("border-color","red"),$("#secured_payment_addressErr").html("URL links are not allowed, please remove URL link from the address"),r=1),""==(a=$("#secured_payment_state").val())&&($("#secured_payment_state").css("border-color","red"),$("#secured_payment_stateErr").html("Enter State"),r=1),""==(a=$("#secured_payment_city").val())&&($("#secured_payment_city").css("border-color","red"),$("#secured_payment_cityErr").html("Enter City"),r=1),""==(a=$("#secured_payment_pincode").val())&&($("#secured_payment_pincode").css("border-color","red"),$("#secured_payment_pincodeErr").html("Enter Pincode"),r=1),t.test($("#secured_payment_pincode").val())&&($("#secured_payment_pincode").css("border-color","red"),$("#secured_payment_pincodeErr").html("URL links are not allowed, please remove URL link from the pincode"),r=1);var s=$("#captchabx_codeBox1contact").val()+$("#captchabx_codeBox2contact").val()+$("#captchabx_codeBox3contact").val()+$("#captchabx_codeBox4contact").val();return""==s&&($("#captchacontactErr").html("You can't leave Captcha Code"),r=1),s!=$("#captchacontact").val()&&""!=s&&($("#captchacontactErr").html("Invalid captcha code!"),r=1),document.getElementById("terms").checked?r="":($("#terms").css("border-color","red"),$("#termsErr").html("Please agree to the privacy policy"),r=1),1!=r&&($("#captchacontactErr").html(""),$.ajax({type:"post",url:e+"ajax/validatesecuredpayment",data:$("#secuured-payment-frm").serialize(),beforeSend:function(){$("#msgloader13").html('
')})),$(document).on("keyup",".focusfieldservices",(function(e){var a=0;$(".focusfieldservices").each((function(){a+=Number($(this).val())})),$("#totalpercentservices").html(a),a>100?($("#totalpercentservices").css("color","#f00"),$("#totalpercentservicesErr").html("Sum of the percentage can not be greater than 100")):100==a?($("#totalpercentservices").css("color","#26c826"),$("#totalpercentservicesErr").html("")):($("#totalpercentservices").css("color","#000"),$("#totalpercentservicesErr").html("Sum of the percentage entered should be 100"))})),$(document).on("keyup",".focusfieldsindustry",(function(e){var a=0;$(".focusfieldsindustry").each((function(){a+=Number($(this).val())})),$("#totalpercentindustry").html(a),a>100?($("#totalpercentindustry").css("color","#f00"),$("#totalpercentindustryErr").html("Sum of the percentage can not be greater than 100")):100==a?($("#totalpercentindustry").css("color","#26c826"),$("#totalpercentindustryErr").html("")):($("#totalpercentindustry").css("color","#000"),$("#totalpercentindustryErr").html("Sum of the percentage entered should be 100"))})),$(document).on("click",".remove-field",(function(e){$(this).parent(".remove").remove(),e.preventDefault()})),$(document).on("click",".service_provided",(function(e){var a=$(this).data("srvid");if(a>0){var r=$("#basePath").val();$.ajax({url:r+"ajax/getservicetypefocusfield",data:{parentid:a},type:"post",beforeSend:function(){$(".srvfieldbx").html('')},success:function(e){$(".srvfieldbx").html(e),$("#totalpercent").html("0"),$(document).on("keypress",".numfg",(function(e){return keys=["0","1","2","3","4","5","6","7","8","9","."],keys.indexOf(event.key)>-1})),$(document).on("keyup",".focusfield",(function(e){var a=0;$(".focusfield").each((function(){a+=Number($(this).val())})),$("#totalpercent").html(a),a>100?($("#totalpercent").css("color","#f00"),$("#totalpercentserviceprovidedErr").html("Sum of the percentage can not be greater than 100")):100==a?($("#totalpercent").css("color","#26c826"),$("#totalpercentserviceprovidedErr").html("")):($("#totalpercent").css("color","#000"),$("#totalpercentserviceprovidedErr").html("Sum of the percentage entered should be 100"))}))}})}})),$(document).on("click",".service_feature_add_btn",(function(e){var a=$(".service_provided:checked").val(),r=0,t="";$(".focusfield").each((function(){(r+=Number($(this).val()))>100&&$("#totalpercent").css("color","#f00"),""!=$(this).val()&&(fieldtitle=$(this).data("focusfieldtitle"),t=t+"