var sGBLFBContent='
Feedback
';var sgblcallcontent='
Request a call back
';$SUL(document).ready(function(){fnInitGBLFBFm('fbk');fnInitGBLFBFm('cbk');fnsetdefaulttxt();});function numberval(holders){var aHolders=holders.split(',');for(i=0;i-1))return true;else if(key==190&&$SUL(holder).val().indexOf('.')<0)return true;else return false;});}}}InputFieldtoValidatev2=function(param,defvalue,msg,sRegEx,RegErrMsg,required){var bIsProcess=true;if(!Sulekha.Common.isEmptyParam(Sulekha.Common.trim($SUL('#'+param).val()))&&!Sulekha.Common.isEmptyParam(sRegEx)&&!sRegEx.test(Sulekha.Common.trim($SUL('#'+param).val()))){bIsProcess=false;FieldMsg(param,RegErrMsg,'cno');}else if(Sulekha.Validate.required_chk('#'+param,msg,'','status')){if($SUL('#'+param).val()==defvalue){bIsProcess=false;FieldMsg(param,msg,'cyes');}else{FieldMsg(param,'','cyes');}}else{bIsProcess=false;FieldMsg(param,msg,'cno');}return bIsProcess;} FieldMsg=function(param,msg,classname){if(msg!=""){$SUL('#'+param).parent().addClass("alert");if($SUL('#'+param).val()!=null&&$SUL('#'+param).val()!=""&&$SUL('#'+param).val()!=undefined){$SUL('#'+param).next().addClass('lactive');}}else{$SUL('#'+param).parent().removeClass("alert");}if($SUL('#'+param).val()!=null&&$SUL('#'+param).val()!=""&&$SUL('#'+param).val()!=undefined){$SUL('#'+param).next().addClass('lactive');}} function fnInitGBLFBFm(prefix){if($SUL('#lifeedback').length>0&&prefix=='fbk'){$SUL('#lifeedback').append(sGBLFBContent);}if($SUL('#licallback').length>0&&prefix=='cbk'){$SUL('#licallback').append(sgblcallcontent);}if(prefix=='fbk')$SUL('#'+prefix+'title').bind('focusout',function(event){InputFieldtoValidatev2(prefix+"title",'Name',"Name",/^[a-zA-z\s]+$/,"Please enter only letters.");});else $SUL('#'+prefix+'title').bind('focusout',function(event){InputFieldtoValidatev2(prefix+"title",'Message Subject',"Enter Message Subject",/^[a-zA-z\s]+$/,"Please enter only letters.");});$SUL('#'+prefix+'txtemail').bind('focusout',function(){InputFieldtoValidatev2(prefix+"txtemail",'Email',"Email is required",/^[^@]+@[^@.]+\.[^@]*\w\w$/,"Enter Proper Mail Id.");});$SUL('#'+prefix+'txtareadesc').bind('focusout',function(){InputFieldtoValidatev2(prefix+"txtareadesc",'Comments',"Comments is required");});$SUL('#'+prefix+'txtphone').bind('focusout',function(){InputFieldtoValidatev2(prefix+"txtphone","Contact Number","Enter Valid Phone Number");});}function fnfbkshow(){fncbkclose();$SUL('#feedform').addClass("show").removeClass("hide");$SUL('body').addClass("blurbody");}function fncbkshow(){fnfbkclose();$SUL('#divcallBack').addClass("show").removeClass("hide");$SUL('body').addClass("blurbody");}function fnfbkclose(){$SUL('#feedform').addClass("hide").removeClass("show");$SUL('body').removeClass("blurbody");}function fncbkclose(){$SUL('#divcallBack').addClass("hide").removeClass("show");$SUL('body').removeClass("blurbody");}function fnsetdefaulttxt(){$SUL('#txtfeedselect').on('click',function(){$SUL('#divtxtfeedselect').slideToggle();});$SUL('#divtxtfeedselect').find('ul.result-menu > li > a').on('click',function(){var complaintTxt=$SUL(this).text();$SUL("#txtfeedselect").val(complaintTxt);$SUL('#divtxtfeedselect').slideToggle();});$SUL('#fbkclick').bind('click',function(){fbcsform('fbk');});$SUL('#cbksubmit').bind('click',function(){fbcsform('cbk');});$SUL(document).keyup(function(e){if(e.keyCode==27){fnfbkclose();}});numberval('fbktxtphone,cbktxtphone');}function fngblreplacespl(dirname){return dirname.toLowerCase().replace(/[^a-z0-9]+/ig,"-");}function fbcsform(pfix){ var validatestatus=new Array();var sSerialize='';var validflag=true;var rno=Math.floor(Math.random()*11);if(pfix=='fbk')validatestatus[0]=InputFieldtoValidatev2(pfix+"title",'Name',"Name",/^[a-zA-z\s]+$/,"Please enter only letters.");else validatestatus[0]=InputFieldtoValidatev2(pfix+"title",'Name',"Name",/^[a-zA-z\s]+$/,"Please enter only letters.");validatestatus[1]=InputFieldtoValidatev2(pfix+"txtemail",'Email',"Email",/^[^@]+@[^@.]+\.[^@]*\w\w$/,"Enter Proper Mail Id.");validatestatus[2]=InputFieldtoValidatev2(pfix+"txtphone",'Contact Number',"Contactno is required");if(pfix=='fbk')validatestatus[3]=InputFieldtoValidatev2(pfix+"txtareadesc",'Describe Your idea',"Comments is required");else validatestatus[3]=InputFieldtoValidatev2(pfix+"txtareadesc",'How can we help you today?',"Comments is required");for(var iProcess=0;iProcess'); Sulekha.Auth.JSONGetData('https://us.sulekha.com/common/feedbackmailv3.aspx?retfnname=fngblsuccessfeed&'+sSerialize);}}fngblsuccessfeed=function(o){var GBLFBResult=o[0].value,Msg='Problem Occured. Please try after Sometime.';if(GBLFBResult=='success'){Msg='Thank you . Our team will get back to you shortly.';if($SUL('#hdncsfileupload').length>0)$SUL('#hdncsfileupload').val('');}$SUL('#divsuccessresult').html(Msg);$SUL('#'+o[2].value+'txtemail').val('');$SUL('#'+o[2].value+'txtareadesc').val('');$SUL('#'+o[2].value+'txtphone').val('');$SUL('#'+o[2].value+'title').val('');$SUL('#frm'+o[2].value+'submit').parent().html('

Successfully sent

');}