Open_Notes, Open_Notes1
            var NotesPopup = true;

View_Factsheet
                 var Notes = 0;
                 var InNotes = 0;
                 var HideSuitabilityPopup = false;
                 var HideEligibilityPopup = true;
                 var Hideblockly = false;
                 var Hideblockly1 = true;
                 var HidePayoffGraph = false;
                 var HidePayoffGraph1 = true;
                 
        function allownum(e, sender, limit) {
            var retval;
            var key = window.event ? e.keyCode : e.which;
            var keychar = String.fromCharCode(key);
            var reg = new RegExp("[0-9]")
            if (key == 8) {
                keychar = String.fromCharCode(key);
            }
            if (key == 13) {
                key = 8;
                keychar = String.fromCharCode(key);
            }
            retval = reg.test(keychar);

            if (retval == true) {
                var val;
                val = sender.value + (key - 48);
                if (val > limit) {
                    key = 8;
                    keychar = String.fromCharCode(key);
                }
            }

            return reg.test(keychar);

        }

        function toggleFilterHide() {

            var btnHideStateFilter = document.getElementById("filterTableToHide").style.display;
            var btnHideFilter = document.getElementById("btnHideFilter");
            alert("hi");
            btnHideFilter.className.replace(/(?:^|\s)btn(?!\S)/g, '') = "btnHide";
            //hide of apply filter div
            if (btnHideStateFilter == "none") {
                document.getElementById("filterTableToHide").style.display = "block";
                btnHideFilter.value = "Hide";
                btnHideFilter.className = "btnHide";
            }
            else {
                document.getElementById("filterTableToHide").style.display = "none";
                btnHideFilter.value = "Show";
                btnHideFilter.className ="btnShow";
            }
        }
        function toggleProductHide() {
            var btnHideProductState = document.getElementById("productTableToHide").style.display;
            var btnHideProduct = document.getElementById("btnHideProduct");

            if (btnHideProductState == "none") {
                document.getElementById("productTableToHide").style.display = "block";
                btnHideProduct.value = "Hide";
            }
            else {
                document.getElementById("productTableToHide").style.display = "none";
                btnHideProduct.value = "Show";
            }
        }


        function toggleReferenceHide() {

            var btnHideRefernceState = document.getElementById("referenceTableToHide").style.display;
            var btnHideReference = document.getElementById("btnHideReference");

            if (btnHideRefernceState == "none") {
                document.getElementById("referenceTableToHide").style.display = "block";
                btnHideReference.value = "Hide";
            }
            else {
                document.getElementById("referenceTableToHide").style.display = "none";
                btnHideReference.value = "Show";
            }
        }

        function toggleRiskScoreToHide() {

            var btnHideRiskScoreState = document.getElementById("riskScoreToHide").style.display;     //div
            var btnHideRiskScore = document.getElementById("btnHideRiskScore");                       //button id

            if (btnHideRiskScoreState == "none") {
                document.getElementById("riskScoreToHide").style.display = "block";
                btnHideRiskScore.value = "Hide";
            }
            else {
                document.getElementById("riskScoreToHide").style.display = "none";
                btnHideRiskScore.value = "Show";
            }
        }

        function toggleRatingHide() {

            var btnHideRatingState = document.getElementById("ratingToHide").style.display;     //div
            var btnHideRating = document.getElementById("btnHideRating");                       //button id

            if (btnHideRatingState == "none") {
                document.getElementById("ratingToHide").style.display = "block";
                btnHideRating.value = "Hide";
            }
            else {
                document.getElementById("ratingToHide").style.display = "none";
                btnHideRating.value = "Show";
            }
        }

        function mouseHover(obj) {

            //$(obj).css("background-color", "#262626");

        }
        function MouseOut(obj) {

            //$(obj).css("background-color", "#262626");

        }

        //Aditya Bhong on 29-Jan-2016 to launch new order in accordian
        function New_Order(lblcntrl) {

            var NoteMasterId = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();

            //Added by Gopika w to open bond entry page
            var Mode = document.getElementById('ctl00_MainContent_hdn_Mode').value;
            var UID = document.getElementById('ctl00_MainContent_hdn_UID').value;

            //if (Mode = "RM" && UID.includes("IA")) {
            //    Mode = "Dealer"
            //}
            //else {
            //    Mode = document.getElementById('ctl00_MainContent_hdn_Mode').value;
            //}

            if (Mode = "RM" && funIncludes(UID, "IA") == true) {
                Mode = "Dealer"
            }
            else {
                Mode = document.getElementById('ctl00_MainContent_hdn_Mode').value;
            }

            Mode="Dealer" //Aditya B || 31-Jan-2020 || Hardcoded Mode=Dealer as told by Jasim/DJ

            window.open('../FinIQ_Bond_Entry/FinIQ_Bond_Entry.aspx?NoteId=' + NoteMasterId + '&Mode=' + Mode + '&Master_Popup=POPUP', 'OpenPopup', 'top=150,left=120,status=1,scrollbars=1,resizable=1,width=1500px,height=800px');
            // var CustomerID = document.getElementById('ctl00_MainContent_hdncustid').value;

            // if ($("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductcode").text()   != 'BOND')
            // {
            //      $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important;width:1250px !important' src='../TrancheOrderEntry/TrancheOrderEntry.aspx?RMWMode=Y&Note_Master_Id= " + NoteMasterId + "&CustID= " + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
            // }
            // else
            // {
            //     $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important;width:1350px !important' src='../FinIQ_Bond_Entry/FinIQ_Bond_Entry.aspx?RMWMode=Y&NoteId= " + NoteMasterId + "&CustID= " + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&WithFullView=Y&pagenum=1&view=fitH,0'></iframe>");
            // }
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductclusters").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").show();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblViewAttachedFiles").hide();
            //// $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchPriceUpdate").hide();
            // document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchNewRFQ").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchManualRFQ").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblDisplayNews").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductFolder").hide();
            // $("#div" + lblcntrl).css('height', 'auto');
            // $("#div" + lblcntrl).slideToggle();

        }
        //End
        // start Added by Dashrath for IPO order entry for WLB bonds


        function New_Order_Ipo(lblcntrl) {

            var NoteMasterId = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();


            var Mode = document.getElementById('ctl00_MainContent_hdn_Mode').value;
            var UID = document.getElementById('ctl00_MainContent_hdn_UID').value;



            if (Mode = "RM" && funIncludes(UID, "IA") == true) {
                Mode = "Dealer"
            }
            else {
                Mode = document.getElementById('ctl00_MainContent_hdn_Mode').value;
            }
            Mode = "IPO_Order" + Mode
            window.open('../FinIQ_Bond_Entry/FinIQ_Bond_Entry.aspx?NoteId=' + NoteMasterId + '&Mode=' + Mode + '&Master_Popup=POPUP', 'OpenPopup', 'top=150,left=120,status=1,scrollbars=1,resizable=1,width=1500px,height=800px');


        }

        function New_Order_Compact(lblcntrl) {
            //
            var NoteMasterId = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();
            var CustomerID = document.getElementById('ctl00_MainContent_hdncustid').value;
            var wflurl = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblWflUrl").text();
            var prdurl = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblPrdUrl").text();
            var templateID = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbltemplateid").text();
            var FundCode = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblsubscheme").text();
            var SchemeCode = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_lblscheme').innerText; /* Code Added By Dinesh On 21-Apr-2018 Demo*/
            //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblscheme").text();
            var FundCcy = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblccy").text().trim();
            //var template_Code = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_lbltemplatecode').innerText;

            //if (CustomerID != '') {
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPORD&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //}
            //else {
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPORD&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //}

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='no' frameborder='0' style='height:800px !important;width:800px !important' src='../RMWorkstation/OrderEntry_RMWLayout.aspx?FundCode=" + FundCode + "&Ccy=" + FundCcy + "&SchemeCode=" + SchemeCode + "&NoteMasterID=" + NoteMasterId + "&CustomerId=" + CustomerID + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");  /* Code Added By Dinesh On 26-Apr-2018 BRUNEI demo.*/

            //if(wflurl=='Y' && prdurl=='')
            //{
            //    if (CustomerID != '') {
            //        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&TemplateID=T:"+ templateID +"&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            //    }
            //    else {
            //        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&DealNum=N:" + NoteMasterId + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            //    }
            //}
            //else if(wflurl=='Y' && prdurl=='')
            //{
            //    if (CustomerID != '') {
            //        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //    }
            //    else {
            //        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            //    }
            //}
            //else if (wflurl == 'N' && prdurl != '') {
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1000px !important' src=" + prdurl + "?RMWMode=Y&NoteId=" + NoteMasterId + "&CustID=" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //}
            //else {
            //    alert('Please define mapping on template master');
            //}



            




            //if ($("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductcode").text()!='Bond')
            //{
            //     $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important;width:1250px !important' src='../TrancheOrderEntry/TrancheOrderEntry.aspx?RMWMode=Y&Note_Master_Id= " + NoteMasterId + "&CustID= " + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
            //}
            //else
            //{
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important;width:1350px !important' src='../FinIQ_Bond_Entry/FinIQ_Bond_Entry.aspx?RMWMode=Y&NoteId= " + NoteMasterId + "&CustID= " + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
            //}
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductclusters").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblViewAttachedFiles").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchNotes").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchPriceUpdate").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
            $("#div" + lblcntrl).css('height', 'auto');
            $("#div" + lblcntrl).slideToggle();
        }

        function callme(x, lblcntrl) {
          
            //$('#'+x).toggle("slow");
            //$('#' + x).slideDown("slow");
      
               if (InNotes == 1) {
               InNotes = 0;
                return;
               }
            $('#' + x).css('height', 'auto !important');

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
               $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblPitchbook").hide(); //added by shreyas
            if (NotesPopup == true) {
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
                NotesPopup = false;
            }
            else {
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").show();
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchNotes").hide();
                //NotesPopup = true;
            }
            
            if (HideEligibilityPopup == true && HideSuitabilityPopup != false) {
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
                HideSuitabilityPopup = true;
            }
            else {
                HideSuitabilityPopup = true;
             }

             if (Hideblockly1 == true && Hideblockly != false) {
                 document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
                 Hideblockly = true;
             }
             else {
                 Hideblockly = true;
             }

             if (HidePayoffGraph1 == true && HidePayoffGraph != false) {
                 $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
                 HidePayoffGraph = true;
             }
             else {
                 HidePayoffGraph = true;
             }  
              
             $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductInfo").hide();
             $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductFolder").hide();
             $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").hide();

             $('#' + x).slideToggle();

        }

        function show_Bond_Prices_SGX(x, lblcntrl, NoteMasterID) {

            lblcntrl = lblcntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_dSGXPrice', '');
            //alert(lblcntrl);
            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();
            //alert(notemasterid);
            //var CustomerID = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();
            var CustomerID = document.getElementById('ctl00_MainContent_hdncustid').value;
            var parentCntrl1 = "#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "";
            //alert(notemasterid);
            //alert(parentCntrl1);
            var bestprice = document.getElementById("<%= Hdn_SGX_Price_Val.ClientID %>").value;
            //Added Customer ID in querystring  by Anand K on 03 Sep 2015
            //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' src='../OrderLog_OCBC/OrderLog_OCBC.aspx?Mode=VIEW&NMID=" + notemasterid + "&CustomerID=" + CustomerID + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
           
            var str='';
            str = str + '<br/><br/><table><tr><td>';

            str = str + '<span style="float:left;height:26px; line-height:26px; font:bold 13px/26px verdana !important;">' + bestprice + '</span>';

            str = str + '</td></tr></table>';
            //alert(str);
            //alert($("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").text());
            //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_dSGXPrice").html('<img src="../App_Resources/PP_Icons/1.png" alt="" style="float:left;"/> <span style="float:left; vertical-align: middle; height:26px; line-height:26px; font:bold 13px/26px verdana !important;">' + bestprice + '</span>');
            $(parentCntrl1 + "_lblBNDSGXPrices").html('<img src="../App_Resources/PP_Icons/1.png" alt="" style="float:left;"/> ' + str + '<span><img src="../App_Resources/Accept.png"/><a href="#" onClick="AcceptPrice(' + bestprice + ',' + lblcntrl + ');"style="font:normal 15px verdana !important;line-height:26px;">Accept Price</a></span>');
//            var BNDSGXPrices = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").text();
//            alert(BNDSGXPrices);
             $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "__Commentary").empty();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchNotes").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
            //document.getElementById("dBestPrice").style.display = "none";
            $("#div" + lblcntrl).css('height', 'auto');
            $("#div" + lblcntrl).slideToggle();
        }
        function show_Orders(x, lblcntrl, NoteMasterID) {
            //alert(x);
            //alert(lblcntrl);
            //alert(NoteMasterID);

            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();
            //var CustomerID = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();
            var CustomerID = document.getElementById('ctl00_MainContent_hdncustid').value;

            //alert(notemasterid);
            //Added Customer ID in querystring  by Anand K on 03 Sep 2015
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' src='../OrderLog/OrderLog.aspx?Mode=GT&NMID=" + notemasterid + "&CustomerID=" + CustomerID + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

            //alert($("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").text());

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductFolder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductInfo").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchNotes").hide();
            $("#div" + lblcntrl).css('height', 'auto');
            $("#div" + lblcntrl).slideToggle();



            //$('#'+x).toggle("slow");
            //$('#' + x).slideDown("slow");
            // window.open("../OrderLog_OCBC/OrderLog_OCBC.aspx?Mode=VIEW&NMID=" & NoteMasterID & "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1,0");
            //document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl00_lblorderlog').text = "<iframe id='iframe0'   scrolling='no' frameborder='0' src='../OrderLog_OCBC/OrderLog_OCBC.aspx?Mode=VIEW&NMID=" & NoteMasterID & "'></iframe>"

            // $('#ctl00_MainContent_dlProductPriceDetails_ctl00_lblorderlog').text('<iframe scrolling="no" frameborder="0" style="width:1100px; height:500px; background-color:#FF0000;" src="../OrderLog_OCBC/OrderLog_OCBC.aspx?Mode=VIEW&NMID=' & NoteMasterID & '"></iframe>');


            //  $('#ctl00_MainContent_dlProductPriceDetails_ctl00__Commentary').css('display', 'none');

            //$('#' + x).slideToggle();
        }

function Open_Notes(cntrl) {
    // 
    //// window.open("../RMWorkstation/Notes.aspx?Mode=VIEW&CUSTID=" & NoteMasterID & "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1,0");
    NotesPopup = true;
    var rowid = cntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_imgbtnnotesempty', '');
    // rowid = cntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_imgbtnfillednotes', ''); 2_imgbtnnotesfilled

            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblnotemasterid").text();
            var customerid = document.getElementById('ctl00_MainContent_hdncustid').value;
            var customername = document.getElementById('ctl00_MainContent_hdncustname').value;

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblSuitabilityurl").hide();

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllaunchneworder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductInfo").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductFolder").hide();
            //  document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_imgblockly1').style.display = "none";

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchNotes").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchNotes").html("<iframe id='iframe" + rowid + "' scrolling='no' frameborder='0' style='height:500px !important;width:500px !important' src='../RMWorkstation/Notes.aspx?NoteMasterID=" + notemasterid + "&CustomerID=" + customerid + "&CustomerName=" + customername + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

    //$("#div" + cntrl).css('height', 'auto');
    //$("#div" + cntrl).slideToggle();
}
function Open_Notes1(cntrl) {
    //  
    //// window.open("../RMWorkstation/Notes.aspx?Mode=VIEW&CUSTID=" & NoteMasterID & "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1,0");
    NotesPopup = true;
    var rowid = cntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_imgbtnnotesfilled', '');
    // rowid = cntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_imgbtnfillednotes', ''); 2_imgbtnnotesfilled

    var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblnotemasterid").text();
    var customerid = document.getElementById('ctl00_MainContent_hdncustid').value;
    var customername = document.getElementById('ctl00_MainContent_hdncustname').value;

    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblEQAllPrices").hide();
    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblBNDSGXPrices").hide();
    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblorderlog").hide();
    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbliFramContainer").hide();
    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllipperdetails").hide();
    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblSuitabilityurl").hide();

    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblviewquota").hide();
    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllaunchneworder").hide();
    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductInfo").hide();
    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductFolder").hide();
    //  document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_imgblockly1').style.display = "none";

    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchNotes").show();
    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchNotes").html("<iframe id='iframe" + rowid + "' scrolling='no' frameborder='0' style='height:500px !important;width:500px !important' src='../RMWorkstation/Notes.aspx?NoteMasterID=" + notemasterid + "&CustomerID=" + customerid + "&CustomerName=" + customername + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

    //$("#div" + cntrl).css('height', 'auto');
    //$("#div" + cntrl).slideToggle();
}

function view_quota(lblcntrl) {

            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();

            var CustomerID = document.getElementById('ctl00_MainContent_hdncustid').value;

            ////alert(notemasterid);

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").html("<iframe id='iframe" + lblcntrl + "' scrolling='no' frameborder='0' style='height:1000px !important;width:1000px !important' src='../OrderLog/OrderLog.aspx?Mode=VIEW&NMID=" + notemasterid + "&CustomerID=" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

            //var str = ''

            //str = str + '<table cellpadding=2 cellspacing=2>'                        
            //str = str + '<tr><td>' + $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:500px !important' src='../PriceEnquiry_New/Branch_Level_Quota.aspx?NoteMasterID=" + notemasterid + "&RowIndex=" + lblcntrl + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>"); +'</td></tr>'
            //str = str + '<tr><td>' + $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important' src='../OrderLog/OrderLog.aspx?Mode=VIEW&NMID=" + notemasterid + "&CustomerID=" + CustomerID + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>"); +'</td></tr>' //Added Customer ID in querystring  by Anand K on 03 Sep 2015
            //str = str + '</table>'

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductFolder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductInfo").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchNewRFQ").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchManualRFQ").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblDisplayNews").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductFolder").hide();
            $("#div" + lblcntrl).css('height', 'auto');
            $("#div" + lblcntrl).slideToggle();

        }

        function AcceptPrice(bestprice, index) {

            var notemasterid = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + index + '_lblnotemasterid').innerText;

            PageMethods.UpdateEQBestPrice(bestprice, notemasterid)

        }
        
        function show_prices(index) {

            index = index.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_dBestPrice', '');

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "_lblEQAllPrices").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "_lblBNDSGXPrices").hide();            
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "_lbllipperdetails").hide();
            
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "__Commentary").empty();

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "_lblpayoffgraph").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + index + "_lblLaunchNotes").hide();

            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + index + '_imgblockly1').style.display = "none";
                        
            $("#div" + index).css('height', 'auto');
            $("#div" + index).slideToggle();

        }
     
        function show_hide_notes(NmID) {

            if ($("#ctl00_MainContent_rdbtargetclient_1").is(":checked") && $("#ctl00_MainContent_FinIQ_Fast_Find_Customer1_txtCustomerName").text()!= '') {
                InNotes = 1;
                //alert(Notes);
                if (Notes == 0) {
                    $("#DNotes").show();
                    Notes = 1;
                    $("#ctl00_MainContent_hdnNoteMasterIDForNotes").val($("#ctl00_MainContent_dlProductPriceDetails_ctl0" + NmID + "_lblnotemasterid").text());
                    //alert($("#ctl00_MainContent_hdnNoteMasterIDForNotes").val());
                    $("#ctl00_MainContent_lblNMCustName").text($("#ctl00_MainContent_FinIQ_Fast_Find_Customer1_txtCustomerName").text());
                    $("#ctl00_MainContent_Notes").val("");

                    var currenttime = new Date();

                    currenttime = [currenttime.getMonth() + 1,
                                   currenttime.getDate(),
                                   currenttime.getFullYear()].join('/') + ' ' +
                                  [currenttime.getHours(),
                                  currenttime.getMinutes(),
                                  currenttime.getSeconds()].join(':');

                    //alert(currenttime);

                    document.getElementById('ctl00_MainContent_hdn_stickynote_opened_at').value = currenttime;

                    //alert(document.getElementById('ctl00_MainContent_hdn_stickynote_opened_at').value);
                }
                else {
                    $("#DNotes").hide();
                    Notes = 0;
                }
            }
        }
        function clear_notes() {
            //alert('hi');
            $("#ctl00_MainContent_Notes").val("");
        }
        //#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1,0
function showhide(obj) {

        
      
       // alert("Hi");
        }
        
             function switchViews(obj, row) {
            var div = document.getElementById(obj);


            if (div.style.display == "none") {
                div.style.display = "inline";
            }
            else {
                div.style.display = "none";
            }
        }

       

       function BlinkText() {
          
           $('.blink').blink(); // default is 500ms blink interval.
           //$('.blink').blink({delay:100}); // causes a 100ms blink interval.
       }

      

       function showemptynotesicon() {
           //$(document).ready(function() {
            //alert("empty_notes");
             $("html #Div2").css("display", "inline");

           //});
           
          // document.getElementById('Div2').style.display = 'inline !important';
       }

       function showfillednotesicon() {
           //$(document).ready(function() {
           //alert("filled_notes");
            $("html #Div1").css("display", "inline");

           //});
           
           //document.getElementById('Div1').style.display = 'inline !important';
        }

       
                
        function showfilters() {


            $("#ctl00_MainContent_hdn_showfilters").val("Yes");    

            // Set the effect type
            //var effect = 'slide';

            // Set the options for the effect type chosen
            //var options = { direction: $('.mySelect').val() };

            // Set the duration (default: 400 milliseconds)
            var duration = 1500;

            $('#ctl00_MainContent_myDiv').toggle("slide", duration);

            $('#btnhidefilters').css("display", "block");
            $('#btnshowfilters').css("display", "none");

            

        }

        function hidefilters() {

            //alert('hide');

            $("#ctl00_MainContent_hdn_showfilters").val("No");

            // Set the effect type
            //var effect = 'slide';

            // Set the options for the effect type chosen
            //var options = { direction: $('.mySelect').val() };

            // Set the duration (default: 400 milliseconds)
            
            var duration = 1500;

            $('#ctl00_MainContent_myDiv').toggle("slide", duration);
            
            
            
            //$('#ctl00_MainContent_dvpriceenquiry').toggle("slide", duration);

//            $('#ctl00_MainContent_myDiv').animate({

//                left: 0 - $('#ctl00_MainContent_myDiv').width() + 10 + 'px'
//                //alert($('#ctl00_MainContent_myDiv').width());

//            }, 500, function() {

//                $('#tdmasterfilters').width("0px");

//            });

//            $('#ctl00_MainContent_dvpriceenquiry').animate({

//            left:'10px'
//            
//    }, 500);

            $('#btnshowfilters').css("display", "block");
            $('#btnhidefilters').css("display", "none");
        }

        

        function ShowHideMasterFilter() {

            //alert($('#ctl00_MainContent_btnHideFilter1').attr("class"));
            //alert('Hii');

            if ($('#ctl00_MainContent_btnHideFilter1').attr("class") == 'btnShow') {

                $("#slider-range").show();
                $("#slider-range1").show();
                $("#slider-range2").show();
                $("#slider-range3").show();
                $("#slider-range4").show();
                $("#slider-range5").show();
                $("#slider-range6").show();
                $('#ctl00_MainContent_filterTableToHide').slideDown(500);
                $('#ctl00_MainContent_btnHideFilter1').attr("class", "btnHide");
                $('#ctl00_MainContent_hdn_showmasterfilter').val("Show");
            }

            else if ($('#ctl00_MainContent_btnHideFilter1').attr("class") == 'btnHide') {

                $("#slider-range").hide();
                $("#slider-range1").hide();
                $("#slider-range2").hide();
                $("#slider-range3").hide();
                $("#slider-range4").hide();
                $("#slider-range5").hide();
                $("#slider-range6").hide();
                $('#ctl00_MainContent_filterTableToHide').slideUp(500);
                $('#ctl00_MainContent_btnHideFilter1').attr("class", "btnShow");
                $('#ctl00_MainContent_hdn_showmasterfilter').val("Hide");

            }
        }
        
        function ShowHideProductFilter() {

            if ($('#btnHideProduct1').attr("class") == 'btnShow') {

                $('#ctl00_MainContent_productTableToHide').slideDown(500);
                $('#btnHideProduct1').attr("class", "btnHide");
                $('#ctl00_MainContent_hdn_showproductfilter').val("Show");
            }

            else if ($('#btnHideProduct1').attr("class") == 'btnHide') {
            
            $('#ctl00_MainContent_productTableToHide').slideUp(500);
            $('#btnHideProduct1').attr("class", "btnShow");
            $('#ctl00_MainContent_hdn_showproductfilter').val("Hide");
            
        }

    }

    function ShowHideReferenceNo() {

        if ($('#btnHideReference1').attr("class") == 'btnShow') {

            $('#ctl00_MainContent_referenceTableToHide').slideDown(500);
            $('#btnHideReference1').attr("class", "btnHide");
            $('#ctl00_MainContent_hdn_showreferencenofilter').val("Show");
        }

        else if ($('#btnHideReference1').attr("class") == 'btnHide') {

            $('#ctl00_MainContent_referenceTableToHide').slideUp(500);
            $('#btnHideReference1').attr("class", "btnShow");
            $('#ctl00_MainContent_hdn_showreferencenofilter').val("Hide");

        }

    }

    function ShowHideRiskScore() {

        if ($('#btnHideRiskScore1').attr("class") == 'btnShow') {

            $('#ctl00_MainContent_riskScoreToHide').slideDown(500);
            $('#btnHideRiskScore1').attr("class", "btnHide");
            $('#ctl00_MainContent_hdn_showriskscorefilter').val("Show");
        }

        else if ($('#btnHideRiskScore1').attr("class") == 'btnHide') {

        $('#ctl00_MainContent_riskScoreToHide').slideUp(500);
        $('#btnHideRiskScore1').attr("class", "btnShow");
        $('#ctl00_MainContent_hdn_showriskscorefilter').val("Hide");

        }

    }

    function ShowHideRating() {

        if ($('#btnHideRating1').attr("class") == 'btnShow') {

            $('#ctl00_MainContent_ratingToHide').slideDown(500);
            $('#btnHideRating1').attr("class", "btnHide");
            $('#ctl00_MainContent_hdn_showrating').val("Show");
        }

        else if ($('#btnHideRating1').attr("class") == 'btnHide') {

            $('#ctl00_MainContent_ratingToHide').slideUp(500);
            $('#btnHideRating1').attr("class", "btnShow");
            $('#ctl00_MainContent_hdn_showrating').val("Hide");

        }

    }

    function ProductCssClass_Hide() {

        $('#btnHideProduct1').attr("class", "btnHide");
    }

    function ProductCssClass_Show() {

        alert($('#btnHideProduct1').attr("class"));
        $('#btnHideProduct1').attr("class", "btnShow");
        alert($('#btnHideProduct1').attr("class"));
    }

    function ShowSuitabilityPopup(cntrl) {

        //alert("ShowSuitabilityPopup");

        var rowid = cntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_imgbtnnoneligibleproducts', '');
               
        var customerid = document.getElementById('ctl00_MainContent_hdncustid').value;
        var customertype = document.getElementById('ctl00_MainContent_hdn_cust_Type').value;
        var productcode = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_lblproductcode').innerText;
        var notemasterid = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_lblnotemasterid').innerText;
        var scheme = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_lblscheme').innerText;

        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblEQAllPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblBNDSGXPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblorderlog").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbliFramContainer").empty();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblviewquota").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllipperdetails").empty();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblSuitabilityurl").show();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblpayoffgraph").hide();
        document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_imgblockly1').style.display = "none";
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductFolder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllaunchneworder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductInfo").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchNotes").hide();

        HideSuitabilityPopup = false;
    }
    
    function Show_Blockly(cntrl) {


        var rowid = cntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_imgblockly', '');

        var template_Code = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_lbltemplatecode').innerText;

        //alert(template_Code);

        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblEQAllPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblBNDSGXPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblorderlog").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbliFramContainer").empty();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllipperdetails").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblSuitabilityurl").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblviewquota").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblpayoffgraph").hide(); 
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductFolder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllaunchneworder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductInfo").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchNotes").hide();

        document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_imgblockly1').style.display = "inline";
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_imgblockly1").attr("src", "../App_Resources/imagesPE/" + template_Code + ".jpeg");
        Hideblockly = false;
    }

    function Show_Payoff_Graph(cntrl) {


        var rowid = cntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_imgpayoff', '');

        var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblnotemasterid").text();
        
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblEQAllPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblBNDSGXPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblorderlog").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbliFramContainer").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllipperdetails").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblSuitabilityurl").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblviewquota").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchNotes").hide();

        document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_imgblockly1').style.display = "none";

        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblpayoffgraph").show();

        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblpayoffgraph").html("<iframe id='iframe" + rowid + "' scrolling='no' frameborder='0' style='height:600px !important' src='../PriceEnquiry_New/Payoff_Graph.aspx?NoteMasterID=" + notemasterid + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

        HidePayoffGraph = false;
    }
     
    function Create_Folder(cntrl) {

        var rowid = cntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_imgproductfolder', '');

        var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblnotemasterid").text();
        var customerid = document.getElementById('ctl00_MainContent_hdncustid').value;

        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblEQAllPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblBNDSGXPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblorderlog").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbliFramContainer").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllipperdetails").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblSuitabilityurl").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblviewquota").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lbllaunchneworder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductInfo").hide();
        document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_imgblockly1').style.display = "none";
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchNotes").hide();

        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductFolder").show();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + rowid + "_lblLaunchProductFolder").html("<iframe id='iframe" + rowid + "' scrolling='no' frameborder='0' style='height:300px !important;width:600px !important' src='../RMWorkstation/CreateFolders.aspx?NoteMasterID=" + notemasterid + "&CustomerID="+ customerid +"#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
    }
    
    function View_Factsheet(cntrl) {

        var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblnotemasterid").text();

        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblEQAllPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblBNDSGXPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblorderlog").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllipperdetails").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblSuitabilityurl").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblviewquota").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllaunchneworder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").hide();
        document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + cntrl + '_imgblockly1').style.display = "none";
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchNewRFQ").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchManualRFQ").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").show();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblDisplayNews").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").html("<iframe id='iframe" + cntrl + "' scrolling='no' frameborder='0' style='height:300px !important;width:600px !important' src='../RMWorkstation_Bonds/ViewAttachedFiles.aspx?NoteMasterID=" + notemasterid + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

        $("#div" + cntrl).css('height', 'auto');
        $("#div" + cntrl).slideToggle();
    }

    //Aditya Bhong on 07-Jun-2017 to launch manual rfq in accordian for SCB.
    function Manual_RFQ(lblcntrl) {

        

        var ISIN = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblISIN").text();
        var Ccy = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblccy").text().trim(); //Changed by Gopika W

        //Added by Nikita S for Note Master ID told by DJ On 30-Oct-2017
        var NoteMasterId = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();


        ////alert(NoteMasterId);

        var ProductName = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproduct").text();
        var MaturityDate = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblmaturitydate").text();



        //Changed by Gopika W on 24 july 2017
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchManualRFQ").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:90px !important;width:1100px !important' src='../Bonds_ManualRFQ/Bonds_ManualRFQ.aspx?ISIN=" + ISIN + "&CCY=" + Ccy + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
        //window.open('../Bonds_ManualRFQ/Bonds_ManualRFQ.aspx?ISIN=' + ISIN + '&CCY=' + Ccy + '&ProductName=' + ProductName + '&MaturityDate=' + MaturityDate + '&Master_Popup=POPUP', 'OpenPopup', 'top=250,left=750,status=1,scrollbars=1,resizable=1,width=370px,height=300px');

        //window.open('../Bonds_ManualRFQ/Bonds_ManualRFQ.aspx?WorkflowMode="EDIT"&ISIN=' + ISIN + '&CCY=' + Ccy + '&ProductName=' + ProductName + '&MaturityDate=' + MaturityDate + '&Master_Popup=POPUP', 'OpenPopup', 'top=250,left=750,status=1,scrollbars=1,resizable=1,width=370px,height=300px');

        //Changed by Nikita S for Note Master ID told by DJ On 30-Oct-2017
        window.open('../Bonds_ManualRFQ/Bonds_ManualRFQ.aspx?WorkflowMode="EDIT"&ISIN=' + ISIN + '&CCY=' + Ccy + '&NoteMasterId=' + NoteMasterId + '&ProductName=' + ProductName + '&MaturityDate=' + MaturityDate + '&Master_Popup=POPUP', 'OpenPopup', 'top=250,left=750,status=1,scrollbars=1,resizable=0,width=420px,height=450px');
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductclusters").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchNewRFQ").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchManualRFQ").show();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide(); 
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblViewAttachedFiles").hide();
        //// $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchPriceUpdate").hide();
        //document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblDisplayNews").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductFolder").hide();
        ////$('#ctl00_MainContent_dlProductPriceDetails_ctl00__Commentary').css('display', 'none !important');
        ////$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "__Commentary").hide(); //Added By gopika w
        //$("#div" + lblcntrl).css('height', 'auto');
        //$("#div" + lblcntrl).slideToggle();
    }
    //End

    function View_ProductInfo(cntrl) {

        var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblnotemasterid").text();

        //Added By Gopika w on 28 July 2017
        //window.open('ProductInfo.aspx?NoteMasterID=' + notemasterid + '&Master_Popup=POPUP', 'OpenPopup', 'top=150,left=500,status=1,scrollbars=1,resizable=0,width=750px,height=700px');

        window.open('ProductInfo.aspx?NoteMasterID=' + notemasterid + '&Master_Popup=POPUP', 'OpenPopup', 'top=500,left=500,status=1,scrollbars=1,resizable=0,width=750px,height=900px');

        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblEQAllPrices").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblBNDSGXPrices").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblorderlog").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllipperdetails").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblSuitabilityurl").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblviewquota").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllaunchneworder").hide();
        //document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + cntrl + '_imgblockly1').style.display = "none";
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchNewRFQ").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchManualRFQ").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").show();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblDisplayNews").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
        //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").html("<iframe id='iframe" + cntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1000px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPRMW&DealNum=N:" + notemasterid + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

        //$("#div" + cntrl).css('height', 'auto');
        //$("#div" + cntrl).css('width', 'auto');
        //$("#div" + cntrl).slideToggle();
    }

    //Aditya Bhong on 1-Jul-2017 to display the news for SCB FI Connect. <Start>
    function displayNews(lblcntrl) {
        var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();

        var str = ''

        str = str + '<table cellpadding=2 cellspacing=2>'
        //Modified by Gopika W on 24 july 2017
        str = str + '<tr><td>' + $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblDisplayNews").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:400px !important;width:1100px !important' src='../RMWorkstation_Bonds/DisplayNews.aspx?NoteMasterId=" + notemasterid + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>"); +'</td></tr>'
        str = str + '</table>'

        ////alert(notemasterid)

        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductclusters").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblProductPerformance").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblViewAttachedFiles").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchPriceUpdate").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblViewScenarioAnalysis").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblDisplayNews").show();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductFolder").hide();
        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
        $("#div" + lblcntrl).css('height', 'auto');
        $("#div" + lblcntrl).slideToggle();

    }
    //Aditya Bhong on 1-Jul-2017 to display the news for SCB FI Connect. <End>
        //function showhidefilters() {
          
//function pageLoad(sender,args)
//{
  
//$(document).ready(function() {

                //  $("#PENav").addAttr('jQuery110207620929944938339', '13');

//              alert($("#ctl00_MainContent_hdn_showfilters").val());

//                if ($("#ctl00_MainContent_hdn_showfilters").val() == "No") {

//                    $("#PENav").toggleClass("rightNav");
//                    $("#PENav").removeClass("leftNav");
//                }
//                else if ($("#ctl00_MainContent_hdn_showfilters").val() == "") {
//                    //$("#PENav").toggleClass("leftNav");
//                    // $("#PENav").removeClass("rightNav");
//                }

//                else {
//                    $("#PENav").toggleClass("leftNav");
//                    $("#PENav").removeClass("rightNav");

              //                }

//              alert($('#tblmain').css("left"));

//              if ($('#tblmain').css("left")=="0px") {

//                     $('.tblMainPE').stop().animate({
//                      left: (-1 * 450) + 'px'
//                  }, 500);
//                  $('#tblmain').css("left", "-450px");
//              }
//              else {
//                 //Do Nothing
              //              }

//              $('.tblMainPE').stop().animate({
//                  left: (-1 * 450) + 'px'
//              }, 500);

//              $(document).ready(function() {
//                  $(this).toggleClass("rightNav");
//                  $(this).removeClass("leftNav");
//              });
function PageLoad_RMW() {

                $("#ctl00_MainContent_PENav").click(function() {
                   
                    $(this).toggleClass("rightNav");
                    $(this).removeClass("leftNav");
                
                    if ($(this).attr('class') == "rightNav") {
                        $('.tblMainPE').stop().animate({
                            left: (-1 * 450) + 'px'
                        }, 1000);
                        //$('.tblMainPE').toggle("slide");
                    }
                    else {
                        $(this).toggleClass("leftNav");
                        $(this).removeClass("rightNav");
                        $('.tblMainPE').stop().animate({
                            left: (0) + 'px'
                        }, 1000);
                        //$('.tblMainPE').toggle("slide");
                    }
                    loadSlider();
                });
                loadSlider();
}
           // });

//   }


            function HideMasterFilters() {

                
                
                $("#ctl00_MainContent_PENav").toggleClass("rightNav");
                $("#ctl00_MainContent_PENav").removeClass("leftNav");
                
                    $('.tblMainPE').stop().animate({
                        left: (-1 * 450) + 'px'
                    }, 1000);

               

            }
          
        function loadSlider() {
            $(document).ready(function() {

                
            //var minyield = document.getElementById('ctl00_MainContent_hdn_min_yield').value;
            //var minprice = document.getElementById('ctl00_MainContent_hdn_min_price').value;
            //var minstrike = document.getElementById('ctl00_MainContent_hdn_min_strike').value;
            //var mincoupon = document.getElementById('ctl00_MainContent_hdn_min_coupon').value;
            //var minriskscore = document.getElementById('ctl00_MainContent_hdn_min_riskscore').value;

            //    var maxyield = document.getElementById('ctl00_MainContent_hdn_max_yield').value;
            //    var maxprice = document.getElementById('ctl00_MainContent_hdn_max_price').value;
            //    var maxcoupon = document.getElementById('ctl00_MainContent_hdn_max_coupon').value;
            //    var maxstrike = document.getElementById('ctl00_MainContent_hdn_max_strike').value;
            //    var maxriskscore = document.getElementById('ctl00_MainContent_hdn_max_riskscore').value;
                
                //                alert('Yield max' + maxyield);
                //                alert('Yield min' + minyield);
                //                alert('Price max' + maxprice);
                //                alert('Price min' + minprice);
                //                alert('Strike max' + maxstrike);
                //                alert('Strike min' + minstrike);
                //                alert('Coupon max' + maxcoupon);
                //                alert('Coupon min' + mincoupon);
                //                alert('Risk score max' + maxriskscore);
                //                alert('Risk score min' + minriskscore);

                if ($("#ctl00_MainContent_txtfrom").val() == "") {
                    //$("#ctl00_MainContent_txtfrom").val(minyield);
                    //$("#ctl00_MainContent_txtto").val(maxyield);
                    $("#ctl00_MainContent_txtfrom").val(0);
                    $("#ctl00_MainContent_txtto").val(99);
                }

                if ($("#ctl00_MainContent_txtpricefrom").val() == "") {
                    //$("#ctl00_MainContent_txtpricefrom").val(minprice);
                    //$("#ctl00_MainContent_txtpriceto").val(maxprice);
                    $("#ctl00_MainContent_txtpricefrom").val(0);
                    $("#ctl00_MainContent_txtpriceto").val(99);
                }

                if ($("#ctl00_MainContent_txtstrikefrom").val() == "") {
                    //$("#ctl00_MainContent_txtstrikefrom").val(minstrike);
                    //$("#ctl00_MainContent_txtstriketo").val(maxstrike);
                    $("#ctl00_MainContent_txtstrikefrom").val(0);
                    $("#ctl00_MainContent_txtstriketo").val(99);
                }

                if ($("#ctl00_MainContent_txtcouponfrom").val() == "") {
                    //$("#ctl00_MainContent_txtcouponfrom").val(mincoupon);
                    //$("#ctl00_MainContent_txtcouponto").val(maxcoupon);
                    $("#ctl00_MainContent_txtcouponfrom").val(0);
                    $("#ctl00_MainContent_txtcouponto").val(99);
                }

                if ($("#ctl00_MainContent_txtriskfrom").val() == "") {
                    //$("#ctl00_MainContent_txtriskfrom").val(minriskscore);
                    //$("#ctl00_MainContent_txtriskto").val(maxriskscore);
                    $("#ctl00_MainContent_txtriskfrom").val(0);
                    $("#ctl00_MainContent_txtriskto").val(10);
                }

                //Aditya B on 4-Aug-2015 <Start>
                if ($("#ctl00_MainContent_txtcorelationfrom").val() == "") {
                    $("#ctl00_MainContent_txtcorelationfrom").val(0);
                    $("#ctl00_MainContent_txtcorelationto").val(99);
                }
                //Aditya B on 4-Aug-2015 <End>

                //Aditya B on 5-Nov-2015 <Start>
                if ($("#ctl00_MainContent_txtwdfrom").val() == "") {
                    $("#ctl00_MainContent_txtwdfrom").val(0);
                    $("#ctl00_MainContent_txtwdto").val(99);
                }
                //Aditya B on 5-Nov-2015 <End>

                $(function() {

                    $("#slider-range").slider({
                        range: true,
                        min:0,
                        //max:maxyield,
                        max:99,
                        values: [$("#ctl00_MainContent_txtfrom").val(), $("#ctl00_MainContent_txtto").val()],
                        slide: function(event, ui) {
                            $("#ctl00_MainContent_txtfrom").val(ui.values[0]);
                            $("#ctl00_MainContent_txtto").val(ui.values[1]);
                        }
                    });
                });




                $(function() {
                    $("#slider-range1").slider({
                        range: true,
                        min: 0,
                        //max: maxprice,
                        max: 99,
                        values: [$("#ctl00_MainContent_txtpricefrom").val(), $("#ctl00_MainContent_txtpriceto").val()],
                        slide: function(event, ui) {
                            // $("#amount").val(ui.values[0] + "%" + " - " + ui.values[1] + "%");
                            $("#ctl00_MainContent_txtpricefrom").val(ui.values[0]);
                            $("#ctl00_MainContent_txtpriceto").val(ui.values[1]);
                        }
                    });


                });

                $(function() {
               
                    $("#slider-range2").slider({
                        range: true,
                        min: 0,
                        //max: maxstrike,
                        max: 99,
                        values: [$("#ctl00_MainContent_txtstrikefrom").val(), $("#ctl00_MainContent_txtstriketo").val()],
                        slide: function(event, ui) {
                            //$("#amount").val(ui.values[0] + "%" + " - " + ui.values[1] + "%");
                        $("#ctl00_MainContent_txtstrikefrom").val(ui.values[0]);
                        $("#ctl00_MainContent_txtstriketo").val(ui.values[1]);
                        }
                    });


                });

                $(function() {
                    $("#slider-range3").slider({
                        range: true,
                        min: 0,
                        //max: maxcoupon,
                        max: 99,
                        values: [$("#ctl00_MainContent_txtcouponfrom").val(), $("#ctl00_MainContent_txtcouponto").val()],
                        slide: function(event, ui) {
                            //$("#amount").val(ui.values[0] + "%" + " - " + ui.values[1] + "%");
                            $("#ctl00_MainContent_txtcouponfrom").val(ui.values[0]);
                            $("#ctl00_MainContent_txtcouponto").val(ui.values[1]);
                        }
                    });


                });

                /*$(function() {
                $("#slider-range4").slider({
                range: true,
                min: 0,
                max: 99,
                values: [$("#ctl00_MainContent_txtriskscorefrom").val(), $("#ctl00_MainContent_txtriskscoreto").val()],
                slide: function(event, ui) {
                          
                $("#ctl00_MainContent_txtriskscorefrom").val(ui.values[0]);
                $("#ctl00_MainContent_txtriskscoreto").val(ui.values[1]);
                }
                });


                });*/


                $(function() {
                    $("#slider-range4").slider({
                        range: true,
                        min:0,
                        //max:maxriskscore,
                        max: 10,
                        values: [$("#ctl00_MainContent_txtriskfrom").val(), $("#ctl00_MainContent_txtriskto").val()],
                        slide: function(event, ui) {
                            // $("#amount").val(ui.values[0] + "%" + " - " + ui.values[1] + "%");
                            $("#ctl00_MainContent_txtriskfrom").val(ui.values[0]);
                            $("#ctl00_MainContent_txtriskto").val(ui.values[1]);
                        }
                    });


                });

                //                Added by Aditya B on 4-Aug-2015 for corelation % filter as told by Milind Sir
                $(function() {
                    $("#slider-range5").slider({
                        range: true,
                        min: 0,
                        max: 99,
                        values: [$("#ctl00_MainContent_txtcorelationfrom").val(), $("#ctl00_MainContent_txtcorelationto").val()],
                        slide: function(event, ui) {
                           // $("#amount").val(ui.values[0] + "%" + " - " + ui.values[1] + "%");
                            $("#ctl00_MainContent_txtcorelationfrom").val(ui.values[0]);
                            $("#ctl00_MainContent_txtcorelationto").val(ui.values[1]);
                        }
                    });
                });
                //                 Added by Aditya B on 4-Aug-2015 <END>


                //                Added by Aditya B on 5-Nov-2015 for watch distance filter as told by Milind Sir
                $(function() {
                    $("#slider-range6").slider({
                        range: true,
                        min: 0,
                        max: 200,
                        values: [$("#ctl00_MainContent_txtwdfrom").val(), $("#ctl00_MainContent_txtwdto").val()],
                        slide: function(event, ui) {
                           // $("#amount").val(ui.values[0] + "%" + " - " + ui.values[1] + "%");
                            $("#ctl00_MainContent_txtwdfrom").val(ui.values[0]);
                            $("#ctl00_MainContent_txtwdto").val(ui.values[1]);
                        }
                    });
                });
                //                 Added by Aditya B on 5-Nov-2015 <END>
            });
        }

        function doHourglass() {
            $('#DisableDiv').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif"/>');
            
            
//            cntrl.click();
//            if (cntrl) cntrl.disabled = true;
//            document.body.style.cursor = 'wait';
        }

   

        function ShowSearchByProductLoading() {
            $('#DivSearchByProductLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

     

        function ShowSearchByProductLoading1() {
            $('#DivSearchByProductLoading1').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

     

        function ShowSearchByProductLoading2() {
            $('#DivSearchByProductLoading2').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

    

        function ShowSearchByProductLoading3() {
            $('#DivSearchByProductLoading3').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

      

        function ShowSearchByProductLoading4() {
            $('#DivSearchByProductLoading4').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

     

        function ShowSearchByReferenceNoLoading() {
            $('#DivSearchByReferenceNoLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

      

        function ShowSearchByRatingLoading() {
            $('#DivSearchByRatingLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

       

        function ShowSearchByMasterFiltersLoading() {
            $('#DivSearchByMasterFiltersLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        

        function ShowSearchByExchangeFilterLoading() {
            $('#DivSearchByExchangeFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

       

        function ShowSearchByCurrencyFilterLoading() {
            $('#DivSearchByCurrencyFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchBySchemeFilterLoading() {
            $('#DivSearchBySchemeFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByIssuerFilterLoading() {
            $('#DivSearchByIssuerFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByAssetClassFilterLoading() {
            $('#DivSearchByAssetClassFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByMarketScenarioFilterLoading() {
            $('#DivSearchByMarketScenarioFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByRecommendationFilterLoading() {
            $('#DivSearchByRecommendationFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByYieldFilterLoading() {
            $('#DivSearchByYieldFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByPriceFilterLoading() {
            $('#DivSearchByPriceFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByStrikeFilterLoading() {
            $('#DivSearchByStrikeFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByCouponFilterLoading() {
            $('#DivSearchByCouponFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByMyLikesFilterLoading() {
            $('#DivSearchByMyLikesFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByRiskScoreFilterLoading() {
            $('#DivSearchByRiskScoreFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByEligibleProductsFilterLoading() {
            $('#DivSearchByEligibleProductsFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByCustRecommendationFilterLoading() {
            $('#DivSearchByCustRecommendationFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByIPOFilterLoading() {
            $('#DivSearchByIPOFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowSearchByMaturityFilterLoading() {
            $('#DivSearchByMaturityFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowFactsheetLoading(cntrl) {

            var rowindex = cntrl.id.replace('ctl00_MainContent_dlProductPriceDetails_ctl0', '').replace('_lnkGenerateTermsheet', '');
          
            $('#ctl00_MainContent_dlProductPriceDetails_ctl0' + rowindex + '_DivFactsheetLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" />');
        }

        function ApplyFavouriteFilterLoading() {
            $('#DivApplyFavouriteFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ApplyGenerateProposalLoading() {
            $('#DivApplyGenerateProposalLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ApplySaveFavouriteFilterLoading() {
            $('#DivApplySaveFavouriteFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ApplySetWatchFilterLoading() {
            $('#DivApplySetWatchFilterLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ApplySaveNotesLoading() {
            $('#DivApplySaveNotesLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        //Show hourglass on enter key press
        //$(document).keyup(function(e) {
        //    if (e.keyCode == 13) {
        //        ApplySaveNotesLoading();
        //    }
        //});

        function ApplyCreateFolderLoading() {
            $('#DivApplyCreateFolderLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowUpdatePriceLoading() {
            $('#DivUpdatePriceLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }

        function ShowApplySortLoading() {
           
            $('#DivApplySortLoading').html('<img src="../App_Resources/Ajax_loader_White/loading_1.gif" class="HourGlass"/>');
        }
           
         // Aditya B on 27-Oct-2015 to close client call notes on escape key press
        //$(document).keyup(function(e) {
        //    if (e.keyCode == 27) { 
        //        $("#ctl00_MainContent_pnnotes").hide();
        //    }
        //});
// End     

        //Aditya Bhong on 30-May-2017 to launch new rfq in accordian for SCB.
        function New_RFQ(lblcntrl) {

            var ISIN = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblISIN").text();

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchNewRFQ").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:500px !important;width:1350px !important' src='../Bonds_RFQ/Bonds_RFQ.aspx?ISIN=" + ISIN + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductclusters").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchNewRFQ").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchManualRFQ").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblViewAttachedFiles").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchPriceUpdate").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblDisplayNews").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductFolder").hide();
            $("#div" + lblcntrl).css('height', 'auto');
            $("#div" + lblcntrl).slideToggle();
        }
        //End

        //Actions for tranches || Start
        function View_Factsheet_Tranche(cntrl, count) {
            //Commented by Manasi A on 01-Mar-2018
            //var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblRemarks").text();
            //var TemplateName = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblTempName").text();

            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblnotemasterid").text();
            var TemplateName = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblTempName").text();

            if (count == 0) {
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblEQAllPrices").hide();
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblBNDSGXPrices").hide();
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblorderlog").hide();
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllipperdetails").hide();
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblSuitabilityurl").hide();
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblviewquota").hide();
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllaunchneworder").hide();
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").hide();
                document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + cntrl + '_imgblockly1').style.display = "none";
            }
            if (count == 1) {
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").html("<iframe id='iframe" + cntrl + "' scrolling='no' frameborder='0' style='height:500px !important;width:700px !important' src='../RM_Workstation_Tranche/ViewUploadDocuments_Tranche.aspx?NoteMasterID=" + notemasterid + "&TemplateName=" + TemplateName + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

                //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").html("<iframe id='iframe" + cntrl + "' scrolling='no' frameborder='0' style='height:100px !important;width:100px !important' src='../RMWorkstation/ViewAttachedFiles.aspx?NoteMasterID=" + notemasterid + "&TemplateName=" + TemplateName + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
                //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").html("<iframe id='iframe" + cntrl + "' scrolling='yes' frameborder='0' style='height:700px !important;width:1000px !important' src='" + TemplateName + "'></iframe>");
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").show();

                $("#div" + cntrl).slideToggle();
                $("#div" + cntrl).css('display', 'block');
            }


            if (count == 0) {
                count = 1;
                View_Factsheet_Tranche(cntrl, count);
            }
        }

        //////Added by Manasi A on 28-Feb-2018 ----------------------------Start--------------------------------------
        function View_IndicativeTermInfo_Tranche(cntrl) {
            var SessionToken = document.getElementById('ctl00_MainContent_hdnSessionTokenVariable').value;
            var strDealNum = "";
            //alert(SessionToken);
            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblnotemasterid").text();
            //  alert(notemasterid);

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllaunchneworder").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + cntrl + '_imgblockly1').style.display = "none";

            //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").html("<iframe id='iframe" + cntrl + "'  frameborder='0' style='vertical-align: top; min-height:1200px; max-height:1500px; width:2000px; overflow:hidden !important; '  src='../DocumentGeneration/DocumentGeneration.aspx?ButtonID=0&DealNum= " + notemasterid + "&WorkflowMode=RMWorkstation&TokenID=0&OBJECTTYPE=Product&EVENT=PRODUCT_TERMSHEET&LANGUAGEID=1&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            //$("#div" + cntrl).css('height', 'auto');
            //$("#div" + cntrl).css('width', 'auto');
            //$("#div" + cntrl).slideToggle();
        }

        //////----------------------------------------------End--------------------------------------------------

        function View_ProductInfo_Tranche(cntrl) {

            var SessionToken = document.getElementById('ctl00_MainContent_hdnSessionTokenVariable').value;
            var strDealNum = "";
            //alert(SessionToken);
            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblnotemasterid").text();
            //  alert(notemasterid);
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllaunchneworder").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + cntrl + '_imgblockly1').style.display = "none";

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").html("<iframe id='iframe" + cntrl + "'  frameborder='0' style='vertical-align: top; min-height:950px; max-height:950px; width:1950px; '  src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&NoteMasterID=N:" + notemasterid + "&DealNum=" + strDealNum + "&csrfToken=" + SessionToken + "&RMWYN=Y&RMWMode=PRD&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            $("#div" + cntrl).css('height', 'auto');
            $("#div" + cntrl).css('width', 'auto');
            $("#div" + cntrl).slideToggle();
        }

        function View_OrderEntry_Tranche(cntrl) {

            var SessionToken = document.getElementById('ctl00_MainContent_hdnSessionTokenVariable').value;
            var strDealNum = "";
            //alert(SessionToken);
            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblnotemasterid").text();
            //  alert(notemasterid);
            var TemplateCode = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbltemplatecode").text();

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllaunchneworder").hide();
            //shweta to hide ytm/coupon on order entery click on 2aug

            //couponfreqid = "#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblcouponfreq"
            //couponfreqvalue = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblcouponfreq").text();
            //couponlabelid = "#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblYTM_Coupon"


            //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblYTM_Coupon").hide();
            //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblcouponfreq").hide();
            //end shweta
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + cntrl + '_imgblockly1').style.display = "none";

            //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").show();
            //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").html("<iframe id='iframe" + cntrl + "'  frameborder='0' style='vertical-align: top; min-height:1200px; max-height:1500px; width:2000px; overflow:hidden !important; '  src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&NoteMasterID=N:" + notemasterid + "&DealNum=" + strDealNum + "&csrfToken=" + SessionToken + "&RMWYN=Y&Master_Popup=IFRAME#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").show();

            //////Added by Manasi to manage width for AC and BL 
            if (TemplateCode == "BullELI") {
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").html("<iframe id='iframe" + cntrl + "' frameborder='0' style='vertical-align: top; height:490px; width:3600px;'  src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&NoteMasterID=N:" + notemasterid + "&UCPCondition=Y" + "&DealNum=" + strDealNum + "&csrfToken=" + SessionToken + "&RMWYN=Y&RMWMode=ORD&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

            }
            else if (TemplateCode == "AutocallELN") {
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").html("<iframe id='iframe" + cntrl + "' frameborder='0' style='vertical-align: top; height:490px; width:2400px;'  src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&NoteMasterID=N:" + notemasterid + "&UCPCondition=Y" + "&DealNum=" + strDealNum + "&csrfToken=" + SessionToken + "&RMWYN=Y&RMWMode=ORD&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

            }
            else {
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").html("<iframe id='iframe" + cntrl + "' frameborder='0' style='vertical-align: top; height:490px; width:2400px;'  src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&NoteMasterID=N:" + notemasterid + "&UCPCondition=Y" + "&DealNum=" + strDealNum + "&csrfToken=" + SessionToken + "&RMWYN=Y&RMWMode=ORD&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
            }

            //   $("#div" + cntrl).css('height', 'auto');
            //    $("#div" + cntrl).css('width', 'auto');
            $("#div" + cntrl).slideToggle();



        }
//Actions for tranches || End


        //Added by Aditya B on 8-Jun-2019 || Actions for funds || Start
        function View_Factsheet_Funds(cntrl) {

            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblnotemasterid").text();

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllaunchneworder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + cntrl + '_imgblockly1').style.display = "none";

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").html("<iframe id='iframe" + cntrl + "' scrolling='no' frameborder='0' style='height:300px !important;width:600px !important' src='../RMWorkstation/ViewAttachedFiles.aspx?NoteMasterID=" + notemasterid + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

            $("#div" + cntrl).css('height', 'auto');
            $("#div" + cntrl).slideToggle();
        }

        function View_ProductInfo_Funds(cntrl) {


            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblnotemasterid").text();

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductFolder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lbllaunchneworder").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + cntrl + '_imgblockly1').style.display = "none";

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + cntrl + "_lblLaunchProductInfo").html("<iframe id='iframe" + cntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPRDL&DealNum=N:" + notemasterid + " &NoteMasterID=N:" + notemasterid + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            $("#div" + cntrl).css('height', 'auto');
            $("#div" + cntrl).css('width', 'auto');
            $("#div" + cntrl).slideToggle();
        }

        function New_Order_Funds(lblcntrl) {

            var NoteMasterId = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();
            var CustomerID = document.getElementById('ctl00_MainContent_hdncustid').value;
            var wflurl = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblWflUrl").text();
            var prdurl = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblPrdUrl").text();
            //var templateID = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbltemplateid").text();
            var templateID = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbltemplatecode").text();
            //alert(templateID);
            //var template_Code = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_lbltemplatecode').innerText;

            //if (CustomerID != '') {
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //}
            //else {
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //}


            if (wflurl == 'Y' && prdurl == '') {
                if (CustomerID != '') {
                    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

                }
                else {
                    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&DealNum=N:" + NoteMasterId + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

                }
            }
            else if (wflurl == 'Y' && prdurl != '') {
                if (templateID == 'Fund_Setup') {
                    templateID = 'Funds_Trade_Setup';
                }

                if (CustomerID != '') {
                    //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
                    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&Mode=" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
                }
                else {
                    //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
                    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../UCP/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&Mode=" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
                }
            }
            else if (wflurl == 'N' && prdurl != '') {
                $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1000px !important' src=" + prdurl + "?RMWMode=Y&NoteId=" + NoteMasterId + "&CustID=" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            }
            else {
                alert('Please define mapping on template master');
            }








            //if ($("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductcode").text()!='Bond')
            //{
            //     $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important;width:1250px !important' src='../TrancheOrderEntry/TrancheOrderEntry.aspx?RMWMode=Y&Note_Master_Id= " + NoteMasterId + "&CustID= " + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
            //}
            //else
            //{
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important;width:1350px !important' src='../FinIQ_Bond_Entry/FinIQ_Bond_Entry.aspx?RMWMode=Y&NoteId= " + NoteMasterId + "&CustID= " + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
            //}
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductclusters").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblViewAttachedFiles").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchPriceUpdate").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
            $("#div" + lblcntrl).css('height', 'auto');
            $("#div" + lblcntrl).slideToggle();
        }

        function New_Order_Compact_Funds(lblcntrl) {
            //
            var NoteMasterId = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();
            var CustomerID = document.getElementById('ctl00_MainContent_hdncustid').value;
            var wflurl = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblWflUrl").text();
            var prdurl = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblPrdUrl").text();
            var templateID = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbltemplateid").text();
            var FundCode = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblsubscheme").text();
            var SchemeCode = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_lblscheme').innerText; /* Code Added By Dinesh On 21-Apr-2018 Demo*/
            //$("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblscheme").text();
            var FundCcy = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblccy").text().trim();
            //var template_Code = document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + rowid + '_lbltemplatecode').innerText;

            //if (CustomerID != '') {
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPORD&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //}
            //else {
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPORD&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //}

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='no' frameborder='0' style='height:800px !important;width:800px !important;padding: 25px 25px 5px 105px !important' src='../RMWorkstation/OrderEntry_RMWLayout.aspx?FundCode=" + FundCode + "&Ccy=" + FundCcy + "&SchemeCode=" + SchemeCode + "&NoteMasterID=" + NoteMasterId + "&CustomerId=" + CustomerID + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");  /* Code Added By Dinesh On 26-Apr-2018 BRUNEI demo.*/

            //if(wflurl=='Y' && prdurl=='')
            //{
            //    if (CustomerID != '') {
            //        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&TemplateID=T:"+ templateID +"&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            //    }
            //    else {
            //        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPWFL&DealNum=N:" + NoteMasterId + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            //    }
            //}
            //else if(wflurl=='Y' && prdurl=='')
            //{
            //    if (CustomerID != '') {
            //        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //    }
            //    else {
            //        $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1500px !important' src='../FinIQ_UCP_Control/FinIQ_UCPDealEntry.aspx?WorkflowMode=UCPQEN&TemplateID=T:" + templateID + "&DealNum=N:" + NoteMasterId + "&Customer=C:" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");

            //    }
            //}
            //else if (wflurl == 'N' && prdurl != '') {
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='height:800px !important;width:1000px !important' src=" + prdurl + "?RMWMode=Y&NoteId=" + NoteMasterId + "&CustID=" + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=1&pagenum=1&view=fitH,0'></iframe>");
            //}
            //else {
            //    alert('Please define mapping on template master');
            //}








            //if ($("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductcode").text()!='Bond')
            //{
            //     $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important;width:1250px !important' src='../TrancheOrderEntry/TrancheOrderEntry.aspx?RMWMode=Y&Note_Master_Id= " + NoteMasterId + "&CustID= " + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
            //}
            //else
            //{
            //    $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important;width:1350px !important' src='../FinIQ_Bond_Entry/FinIQ_Bond_Entry.aspx?RMWMode=Y&NoteId= " + NoteMasterId + "&CustID= " + CustomerID + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
            //}
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblproductclusters").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblViewAttachedFiles").hide();
            // $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchPriceUpdate").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
            $("#div" + lblcntrl).css('height', 'auto');
            $("#div" + lblcntrl).slideToggle();
        }

        function view_quota_Funds(lblcntrl) {

            var notemasterid = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();

            var CustomerID = document.getElementById('ctl00_MainContent_hdncustid').value;
            var FundCode = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblsubscheme").text();

            //alert(notemasterid);

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").html("<iframe id='iframe" + lblcntrl + "' scrolling='no' frameborder='0' style='height:1000px !important;width:1000px !important' src='../OrderLog/OrderLog.aspx?Mode=VIEW&NMID=" + notemasterid + "&CustomerID=" + CustomerID + "&FundCode=" + FundCode + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");

            //var str = ''

            //str = str + '<table cellpadding=2 cellspacing=2>'                        
            //str = str + '<tr><td>' + $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:500px !important' src='../PriceEnquiry_New/Branch_Level_Quota.aspx?NoteMasterID=" + notemasterid + "&RowIndex=" + lblcntrl + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>"); +'</td></tr>'
            //str = str + '<tr><td>' + $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").html("<iframe id='iframe" + lblcntrl + "'   scrolling='no' frameborder='0' style='height:1000px !important' src='../OrderLog/OrderLog.aspx?Mode=VIEW&NMID=" + notemasterid + "&CustomerID=" + CustomerID + "#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>"); +'</td></tr>' //Added Customer ID in querystring  by Anand K on 03 Sep 2015
            //str = str + '</table>'

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblorderlog").show();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbliFramContainer").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllipperdetails").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblEQAllPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblBNDSGXPrices").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblSuitabilityurl").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblviewquota").hide();
            document.getElementById('ctl00_MainContent_dlProductPriceDetails_ctl0' + lblcntrl + '_imgblockly1').style.display = "none";
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblpayoffgraph").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductFolder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lbllaunchneworder").hide();
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductInfo").hide();

            $("#div" + lblcntrl).css('height', 'auto');
            $("#div" + lblcntrl).slideToggle();

        }
//Added by Aditya B on 8-Jun-2019 || Actions for funds || End

        // Added funIncludes by Dashrath on 22-Jan-2018 for WLB bonds.
        function funIncludes(str, searchStr) {
            var returnValue = false;

            if (str.indexOf(searchStr) !== -1) {
                returnValue = true;
            }

            return returnValue;
        }

        function RePrice(lblcntrl) {

            var NoteMasterId = $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblnotemasterid").text();

            //callme('div' + lblcntrl, lblcntrl);

            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductInfo").html("<iframe id='iframe" + lblcntrl + "' scrolling='yes' frameborder='0' style='width:500px !important' src='../RMWorkstation/RePrice.aspx?&NoteMasterId= " + NoteMasterId + "&Master_Popup=POPUP#navpanes=0&toolbar=0&statusbar=0&scrollbar=0&pagenum=1&view=fitH,0'></iframe>");
            $("#ctl00_MainContent_dlProductPriceDetails_ctl0" + lblcntrl + "_lblLaunchProductInfo").show();
            $("#div" + lblcntrl).slideToggle();
            $('#div' + lblcntrl).css('display', 'block');
            $("#div" + lblcntrl).css('height', 'auto');
            $("#div" + lblcntrl).css('width', 'auto');
        }
         
        function resizeIframeNewOrder(obj) {
            obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
}
function onlyNominal(event, t) {
    try {
        var keyCodeEntered = (event.which) ? event.which : (window.event.keyCode) ? window.event.keyCode : -1;
        if (((keyCodeEntered >= 48) && (keyCodeEntered <= 57)) || keyCodeEntered == 46) {
            return true;
        }
        else if (t.value.length > 0) {
            if (keyCodeEntered == 75 || keyCodeEntered == 107 || keyCodeEntered == 77 || keyCodeEntered == 109 || keyCodeEntered == 66 || keyCodeEntered == 98 || keyCodeEntered == 84 || keyCodeEntered == 116 || keyCodeEntered == 76 || keyCodeEntered == 108 || keyCodeEntered == 80 || keyCodeEntered == 112) {
                if (((t.value) && (t.value.indexOf('K') >= 0)) || ((t.value) && (t.value.indexOf('k') >= 0)) || ((t.value) && (t.value.indexOf('M') >= 0)) || ((t.value) && (t.value.indexOf('m') >= 0)) || ((t.value) && (t.value.indexOf('B') >= 0)) || (t.value) && (t.value.indexOf('b') >= 0) || (t.value) && (t.value.indexOf('T') >= 0) || (t.value) && (t.value.indexOf('t') >= 0) || (t.value) && (t.value.indexOf('L') >= 0) || (t.value) && (t.value.indexOf('l') >= 0) || (t.value) && (t.value.indexOf('P') >= 0) || (t.value) && (t.value.indexOf('p') >= 0))
                    return false;
                else
                    return true;
            }
        }
        return false;
    } catch (err) {
        console.log(err.Description);
    }
}
