function myHome(portalFlag) { if ( portalFlag=='NEW_AGENCY') { window.location.href='/BagicNxt/partner/login.do'; HoldOn.open(); } else { window.location.href='/BagicNxt/partner/Health_index.jsp'; HoldOn.open(); } } function fc(pgName) { window.location.href="/BagicNxt"+pgName; HoldOn.open(); //window.open("/BagicNxt"+pgName); } function chkBalance() { var url="/BagicNxt/partner/GetAgnFltDtls.do"; window.open(url,'Balance',"toolbar=0,menubar=0,resizable=0,scrollbars=yes,width=800,height=600,statusbars=no,titlebar=no,left=270,top=150"); //var url="/BagicNxt/agent/GetAgnFltDtls.do"; } function openDoc(file) { var screenUrl = 'height=400,width=400,menubar=no,resizable=yes,status=yes, left=0, top=0,scrollbars=yes'; window.open(file,null,screenUrl); //return; } function openDashboard() { var url="/BagicNxt/agentPortal/loadAgencyDetails.do"; window.open(url,'Balance',"toolbar=0,menubar=0,resizable=0,scrollbars=yes,width=1200,height=270,statusbars=no,titlebar=no,left=80,top=100"); } function Opening1() { window.location.href='../renewalnotices/firstpage.jsp'; } function Opening6() { window.location.href='../renewalnotices/firstpage.jsp?p_product_code=7'; } function Opening2() { window.location.href="../renewal/getRenewalSearchPageForm.do"; } function Opening3() { window.location.href='../agentPortal/downloadRenNotices.jsp?flg=brk'; } function Opening4(clm_type) { if(clm_type=='PC') { window.location.href='/BagicNxt/partner/paid-claims.jsp?p_clm_type='+clm_type; HoldOn.open(); } else { window.location.href='/BagicNxt/partner/outstanding-claims.jsp?p_clm_type='+clm_type; HoldOn.open(); } } function viewSmsForm() { window.open("/BagicNxt/partner/viewSmsContestForm.do","SmsConsentForm", "toolbar=0,menubar=0,statusbars=yes,titlebar=no,resizable=0,scrollbars=yes,width=600,height=450,top=180,left=350"); } function goToTdsCertificate() { window.location='/BagicNxt/partner/TDS-certificate.jsp?panno='+document.getElementById("pan").value+"&flag=A"; } function getPan() { var target_1=document.getElementById("pan"); var strXmlSourceFile= '/BagicNxt/aPortal/getPanno.do'; fillTargetText(strXmlSourceFile,target_1); } function ProductCode(xyz) { switch(xyz) { case "COMVECLOAD": top.location="/BagicNxt/motor/motorComindex.jsp"; break; } } function loadMotorPolicyPageProp() { window.location="/BagicNxt/polProcessing/loadProposalSearch.do"; } function Opening5() { window.open("https://general.bajajallianz.com/Corp/claims/general-insurance-claim-assistance_portal.jsp",'test','height=550,width=900,menubar=no,resizable=yes,status=yes, left=200, top=70,scrollbars=yes'); } function openHLTASSESMNTTOOL(URL) { window.open(URL,null,'height=600,width=970,menubar=no,resizable=yes,status=no, left = 200, top=50,scrollbars=yes'); } function chkRenewal() { window.open("/BagicNxt/agent/renewalCalender.do",'RenewalCalender',"toolbar=0,menubar=0,resizable=0,scrollbars=yes,width=1000,height=300,statusbars=no,titlebar=no,left=270,top=150"); } function submitBussiness() { if(document.getElementById("radio-policy-serach").checked == true) { window.location="/BagicNxt/partner/search-policy.jsp?p_flag=search-policy"; HoldOn.open(); } var SCIP = document.getElementById("radio-scip-serach"); if(SCIP){ if(SCIP.checked == true) { window.location="/BagicNxt/partner/scip-search.jsp"; HoldOn.open(); } } if(document.getElementById("radio-endorsement-serach").checked == true) { window.location="/BagicNxt/partner/endt-search.jsp"; HoldOn.open(); } if(document.getElementById("radio-GMCendorsement-serach").checked == true) { window.open("/BagicNxt/genclaims/validateUser.do",'_blank'); } if(document.getElementById("radio-claim-serach").checked == true) { window.location="/BagicNxt/partner/claim-status.jsp"; HoldOn.open(); } if(document.getElementById("radio-renewal-serach").checked == true) { window.location="/BagicNxt/partner/renewal-search.jsp?p_flag=renewal-search"; HoldOn.open(); } if(document.getElementById("radio-quote-serach").checked == true) { window.location="/BagicNxt/partner/quote-search.jsp?p_flag=quote-search"; HoldOn.open(); } if(document.getElementById("radio-wc-serach").checked == true) { window.location="/BagicNxt/partner/wc-quote-search.jsp"; HoldOn.open(); } if(document.getElementById("radio-endorsement-bucket").checked == true) { window.location="/BagicNxt/partner/endt-bucket.jsp"; HoldOn.open(); } if(document.getElementById("radio-scrutiny-bucket").checked == true) { window.open("/BagicNxt/partner/scrutiny-bucket.jsp","_blank"); } if(document.getElementById("radio-customer-details").checked == true) { window.location="/BagicNxt/partner/customerDetails.jsp"; HoldOn.open(); } if(document.getElementById("radio-customerPage").checked == true) { window.location="/BagicNxt/partner/PartnerPage.jsp"; HoldOn.open(); } if(document.getElementById("radio-downloadDigital-bucket").checked == true) { window.location="/BagicNxt/partner/DownloadDigitalCustomer.jsp"; HoldOn.open(); } if(document.getElementById("radio-quoteLiability-search").checked == true) { window.open("/BagicNxt/quotation/checkSubStatus.do",'_blank'); HoldOn.open(); } if(document.getElementById("hlf_pol").checked == true) { window.location="/BagicNxt/partner/HlfService.jsp"; HoldOn.open(); } } function setEmailValues(p_reference_no,p_customer_name,p_pdf_url,p_pdf_ver) { if (p_reference_no != '') { var vprodcode = p_reference_no.substr(11,4); } if (vprodcode == '1008') { var vprodurl = p_pdf_url.replace('L',p_pdf_ver); document.getElementById("p_reference_no").value=p_reference_no; document.getElementById("p_customer_name").value=p_customer_name; document.getElementById("p_pdf_url").value= vprodurl; document.getElementById("email").value=""; } else { document.getElementById("p_reference_no").value=p_reference_no; document.getElementById("p_customer_name").value=p_customer_name; document.getElementById("p_pdf_url").value=p_pdf_url; document.getElementById("email").value=""; } } function sendPdfMail() { //document.getElementById("sendmailBtn").innerHTML="Sending..."; p_reference_no=document.getElementById("p_reference_no").value; p_customer_name=document.getElementById("p_customer_name").value; p_pdf_url=document.getElementById("p_pdf_url").value; p_pdf_url=encodeURIComponent(p_pdf_url); p_email_id=document.getElementById("email").value; p_mail_type=document.getElementById("p_mail_type").value; var reg = /^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/; if(document.getElementById("email").value==""){ alert('Please enter email id'); window.setTimeout(document.getElementById("email").focus(), 1); return false; } else if (!p_email_id.match(reg)) { alert("Kindly enter the valid email id"); document.getElementById("email").value=""; window.setTimeout(document.getElementById("email").focus(), 1); return false; } else { var url = "/BagicNxt/partner/sendPdfMail.do?p_reference_no="+p_reference_no+"&p_customer_name="+p_customer_name+"&p_pdf_url="+p_pdf_url+"&p_email_id="+p_email_id+"&p_mail_type="+p_mail_type; if (document.getElementById("CLICK").value=="R_CLICK_EMAIL") { R_click(); } if (window.ActiveXObject) { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); //IE } else if (window.XMLHttpRequest) { httpRequest = new XMLHttpRequest(); //Other than IE } httpRequest.open("GET", url, false); httpRequest.onreadystatechange = function() {sendPdfMailResp(); } ; httpRequest.send(null); } } function sendPdfMailResp() { if (httpRequest.readyState == 4) { if(httpRequest.status == 200) { var profileXML = httpRequest.responseText; var resp=profileXML.replace(/\s/g,' ').replace(/ ,/g,' '); //document.getElementById("sendmailBtn").innerHTML="Send Mail"; alert(resp); } } } function validMobile(mobileField) { var reg = /^[6789]\d{5}/; if(reg.test(mobileField) == false || mobileField.length!=10 ) { alert('Please enter the Mobile No start with 6,7,8,9 only and length should be 10 digits'); return false; } return true; } function setMobileNumber(p_reference_no,p_customer_name) { document.getElementById("p_reference_no").value=p_reference_no; document.getElementById("p_customer_name").value=p_customer_name; document.getElementById("MobileNo").value=""; } function sendlinkmsg() { p_reference_no=document.getElementById("p_reference_no").value; p_customer_name=document.getElementById("p_customer_name").value; p_mobile=document.getElementById("MobileNo").value; var url = "/BagicNxt/partner/sendlinkmsg.do?p_policy_ref="+p_reference_no+"&p_customer_name="+p_customer_name+"&p_mobile="+p_mobile; $.ajax({ type: "GET", url: url, //data : {'p_policy_ref' :p_policy_ref}, cache: false, async : false, success: function(xml) { $(xml).find('OBJLEAF').each(function(){ var id =$(this).attr('result'); alert(""+id); }); }, error: function(xhr, status, error){ console.log("error"); }, dataType: "xml" }); } //for 48345977 function P_click(policy_no){ var formURL ="/BagicNxt/partner/PClickDetails.do"; event.preventDefault(); $.ajax( { url : formURL, type: "POST", data : { 'p_extra_objects.stringval1' : document.getElementById("location").value , 'p_extra_objects.stringval2' : document.getElementById("p_information_obj.stringval6").value, 'p_extra_objects.stringval3' : document.getElementById("imdCode").value , 'p_extra_objects.stringval4' : policy_no, 'p_extra_objects.stringval5' :document.getElementById("email").value }, success:function(data){ $('#email-details').modal('show'); }, error: function(jqXHR, textStatus, errorThrown) { alert( errorThrown + ". Please try again."); } }); } function R_click(){ var formURL ="/BagicNxt/partner/RClickDetails.do"; policy_no=document.getElementById("p_reference_no").value; event.preventDefault(); $.ajax( { url : formURL, type: "POST", data : { 'p_extra_objects.stringval1' : document.getElementById("lcode").value, 'p_extra_objects.stringval2' : document.getElementById("p_information_obj.stringval6").value, 'p_extra_objects.stringval3' : document.getElementById("imdCode").value , 'p_extra_objects.stringval4' : policy_no, 'p_extra_objects.stringval5' :document.getElementById("email").value }, success:function(data){ $('#email-details').modal('show'); }, error: function(jqXHR, textStatus, errorThrown) { alert( errorThrown + ". Please try again."); } }); } //for 48345977 function Agent_click(){ var formURL ="/BagicNxt/partner/AgentClickDetails.do"; event.preventDefault(); $.ajax( { url : formURL, type: "POST", data : { 'p_extra_objects.stringval1' : document.getElementById("p_userinfo.branchCode").value , 'p_extra_objects.stringval2' : document.getElementById("p_userinfo.userName").value, 'p_extra_objects.stringval3' : document.getElementById("p_userinfo.mainAgentCode").value }, success:function(data){ }, error: function(jqXHR, textStatus, errorThrown) { alert( errorThrown + ". Please try again."); } }); } //added by Komal B for Quote mail function setEmailValuesQuote(p_scrutiny_no) { debugger document.getElementById("p_scrutiny_no").value=p_scrutiny_no; STP_MAIL(); } function sendPdfMailQuote() { debugger p_pdf_url=document.getElementById("p_scrutiny_no").value; p_pdf_url=encodeURIComponent(p_pdf_url); p_email_id= document.getElementById("email").value; p_mail_type=document.getElementById("p_mail_type").value; var reg = /^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/; if(p_email_id==""){ alert('Please enter email id'); window.setTimeout(document.getElementById("email").focus(), 1); return false; } else if (!p_email_id.match(reg)) { alert("Kindly enter the valid email id"); document.getElementById("email").value=""; window.setTimeout(document.getElementById("email").focus(), 1); return false; } else { var url = "/BagicNxt/partner/sendPdfMailQuote.do?p_scrutiny_no="+p_pdf_url+"&p_email_id="+p_email_id+"&p_mail_type="+p_mail_type; if (window.ActiveXObject) { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); //IE } else if (window.XMLHttpRequest) { httpRequest = new XMLHttpRequest(); //Other than IE } httpRequest.open("GET", url, false); httpRequest.onreadystatechange = function() {sendPdfMailRespQuote(); } ; httpRequest.send(null); } } function sendPdfMailRespQuote() { if (httpRequest.readyState == 4) { if(httpRequest.status == 200) { var profileXML = httpRequest.responseText; var resp=profileXML.replace(/\s/g,' ').replace(/ ,/g,' '); alert(resp); } } }