﻿var TrapClicksForHowManySeconds = 10;
var AlertBoxMessage = "Only a single click is needed. The system is processing...\n\n\rกรุณากดจ่ายเงินครั้งเดียวค่ะ ระบบกำลังดำเนินการ...";
var NameOfForm = 'form_paynow';
var NameOfSubmitButton = '';
var TrapTime = 0;
var DoubleClickTrapperCounter = 0;

function DoubleClickTrapperAction(buttonname) {
    DoubleClickTrapperCounter++;
    DoubleClickTrapperButton();

    NameOfForm = "form_paynow";
    NameOfSubmitButton = buttonname;
    var trapTheClick = false;
    var tDate = new Date;
    if (DoubleClickTrapperCounter > 1) {
        trapTheClick = true;
    }
    if (trapTheClick == true) {
        if (TrapTime == 0) {
            TrapTime = tDate.valueOf();
        } else {
            tDate = new Date;
            var localTrapTime = tDate.valueOf();
            if ((localTrapTime - TrapTime) > (TrapClicksForHowManySeconds * 1000)) {
                TrapTime = 0;
                trapTheClick = false;
                DoubleClickTrapperCounter = 0;
            }
        }
    }
    var valueToReturn = true;
    if (trapTheClick == true) {
        valueToReturn = false;
        DoubleClickTrapperAlert();
    }
    return valueToReturn;
}
function DoubleClickTrapperButton() {
    var formname = StripSpaces(NameOfForm);
    var submitname = StripSpaces(NameOfSubmitButton);
    //var newtext    = StripSpaces(NewTextForSubmitButton);
    if (formname.length > 0 && submitname.length > 0) {
        var s = 'document.' + NameOfForm + '.' + NameOfSubmitButton; // + ".value = '" + NewTextForSubmitButton + "'";
        eval(s);
    }
}
function DoubleClickTrapperPopUp() {
    var url = StripSpaces(PopUpBoxURL);
    if (url.length > 0) {
        if (PopUpBoxHeight < 1) {
            PopUpBoxHeight = 200;
        }
        if (PopUpBoxWidth < 1) {
            PopUpBoxWidth = 300;
        }
        window.open(url, '', ('height=' + PopUpBoxHeight + ',width=' + PopUpBoxWidth + ',resizable=yes,scrollbars=yes'));
    }
}
function DoubleClickTrapperAlert() {
    var message = StripSpaces(AlertBoxMessage);
    if (message.length > 0) {
        alert(AlertBoxMessage);
    }
}
function StripSpaces(s) {
    while (s.indexOf(' ') == 0) {
        s = s.substr(1);
    }
    return s;
}
function doc_print() {
    window.print();
}
function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}
function textCounter(field, countfield, maxlimit) {
    if (field.value.length > maxlimit) {
        field.value = field.value.substring(0, maxlimit);
    } else {
        countfield.value = maxlimit - field.value.length;
    }
}
function check_null_mathod(m_name, m_style) {
    if (document.getElementById(m_name) != null) {
        document.getElementById(m_name).style.display = m_style;
    }
}
function set_attribute_form(form_url) {
    if (document.getElementById(NameOfForm) != null) {
        document.getElementById(NameOfForm).setAttribute("action", form_url);
    }
}
function change_mathod(methodID) {
    var lang = "E";
    document.getElementById("lblPayBank").innerHTML = "";
    document.getElementById("visa_promotion").style.display = 'none';
    if (getCookie("language") != null) {
        lang = getCookie("language").toUpperCase();
    }
    if (methodID == "psb") {
        check_null_mathod("start_main", "block");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "block");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "none");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "none");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?psb=true");
        document.getElementById("r_psb").checked = "true";
        document.getElementById("cus_amt").style.visibility = 'visible';
        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "images/PAYSBUY(S).gif";
        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "เพย์สบาย";
            document.getElementById("logo_head_method").title = "เพย์สบาย";
            document.getElementById("lblPayBank").innerHTML = "";
        }
        else {
            document.getElementById("logo_head_method").alt = "PAYSBUY";
            document.getElementById("logo_head_method").title = "PAYSBUY";
            document.getElementById("lblPayBank").innerHTML = "";
        }
    } else if (methodID == "visa") {
        document.getElementById("visa_promotion").style.display = '';
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "block");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "none");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "block");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?c=true");
        document.getElementById("r_visa").checked = "true";


        document.getElementById("cus_amt").style.visibility = 'visible';
        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "images/logo-visa(PN).gif";
        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "วีซ่า";
            document.getElementById("logo_head_method").title = "วีซ่า";
        }
        else {
            document.getElementById("logo_head_method").alt = "Visa";
            document.getElementById("logo_head_method").title = "Visa";
        }
    } else if (methodID == "master") {
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "block");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "none");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "block");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?m=true");
        document.getElementById("r_master").checked = "true";


        document.getElementById("cus_amt").style.visibility = 'visible';
        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "images/logo-master(PN).gif";
        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "มาสเตอร์";
            document.getElementById("logo_head_method").title = "มาสเตอร์";
        }
        else {
            document.getElementById("logo_head_method").alt = "Master";
            document.getElementById("logo_head_method").title = "Master";
        }
    } else if (methodID == "amex") {
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "block");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "none");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "block");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?a=true");
        document.getElementById("r_amex").checked = "true";
        document.getElementById("cus_amt").style.visibility = 'visible';
        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "images/logo-amex(PN).gif";
        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "อเมริกันเอ็กส์เพรส";
            document.getElementById("logo_head_method").title = "อเมริกันเอ็กส์เพรส";
        }
        else {
            document.getElementById("logo_head_method").alt = "AMEX";
            document.getElementById("logo_head_method").title = "AMEX";
        }
    } else if (methodID == "jcb") {
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "block");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "none");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "block");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?j=true");
        document.getElementById("r_jcb").checked = "true";


        document.getElementById("cus_amt").style.visibility = 'visible';
        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "images/logo-jcb(PN).gif";
        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "เจซีบี";
            document.getElementById("logo_head_method").title = "เจซีบี";
            document.getElementById("lblPayBank").innerHTML = "";
        }
        else {
            document.getElementById("logo_head_method").alt = "JCB";
            document.getElementById("logo_head_method").title = "JCB";
            document.getElementById("lblPayBank").innerHTML = "";
        }
    } else if (methodID == "paypal") {
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "none");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "block");
        check_null_mathod("ob_main", "none");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "none");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?p=true");
        document.getElementById("r_paypal").checked = "true";
        document.getElementById("cus_amt").style.visibility = 'hidden';
        document.getElementById("paypal_cus_amt").style.visibility = 'visible';
        document.getElementById("logo_head_method").src = "images/logo-payapl(PN).gif";
        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "เพย์พาล";
            document.getElementById("logo_head_method").title = "เพย์พาล";
        }
        else {
            document.getElementById("logo_head_method").alt = "PayPal";
            document.getElementById("logo_head_method").title = "PayPal";
        }
    } else if (methodID == "ob") {

        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "block");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "none");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?ob=true");
        document.getElementById("r_ob").checked = "true";

        document.getElementById("cus_amt").style.visibility = 'visible';
        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "images/logo-th(PN).gif";

        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "ออนไลน์ แบ้งกิ้ง";
            document.getElementById("logo_head_method").title = "ออนไลน์ แบ้งกิ้ง";
            document.getElementById("lblPayBank").innerHTML = "บัญชีธนาคารไทยพาณิชย์";
            //document.getElementById("lblPayBank").innerHTML = "บัญชีธนาคารไทยพานิชย์";
        }
        else {
            document.getElementById("logo_head_method").alt = "Online Banking";
            document.getElementById("logo_head_method").title = "Online Banking";
            document.getElementById("lblPayBank").innerHTML = "SCB BANK TRANSFER";
            //document.getElementById("lblPayBank").innerHTML = "SCB BANK TRANSFER";
        }
    } else if (methodID == "bank_w") {
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "none");
        check_null_mathod("bank_w_main", "block");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "none");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?wb=true");
        document.getElementById("r_bank_w").checked = "true";
        document.getElementById("cus_amt").style.visibility = 'visible';
        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "images/logo-inter(PN).gif";
        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "ธนาคารต่างประเทศ";
            document.getElementById("logo_head_method").title = "ธนาคารต่างประเทศ";
        }
        else {
            document.getElementById("logo_head_method").alt = "Inter Bank";
            document.getElementById("logo_head_method").title = "Inter Bank";
        }
    } else if (methodID == "cs") {
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "none");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "block");
        check_null_mathod("cc_main", "none");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?cs=true");
        document.getElementById("r_cs").checked = "true";
        document.getElementById("cus_amt").style.visibility = 'visible';
        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        if (lang == "T") {
            document.getElementById("logo_head_method").src = "images/logo-counter(PN)_1.gif";
            document.getElementById("logo_head_method").alt = "เคาน์เตอร์ เซอร์วิส";
            document.getElementById("logo_head_method").title = "เคาน์เตอร์ เซอร์วิส";
        }
        else {
            document.getElementById("logo_head_method").src = "images/logo-counter-en(PN)_1.gif";
            document.getElementById("logo_head_method").alt = "Counter Service";
            document.getElementById("logo_head_method").title = "Counter Service";
        }
    } else if (methodID == "ob_ktb") {
        //alert('ob_ktb');
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "block");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "none");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?ob=true");
        document.getElementById("r_ktb").checked = "true";
        document.getElementById("cus_amt").style.visibility = 'visible';

        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "images/logo-ktc-02.gif";

        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "ออนไลน์ แบ้งกิ้ง";
            document.getElementById("logo_head_method").title = "ออนไลน์ แบ้งกิ้ง";
            document.getElementById("lblPayBank").innerHTML = "บัญชีธนาคารกรุงไทย";
        }
        else {
            document.getElementById("logo_head_method").alt = "Online Banking";
            document.getElementById("logo_head_method").title = "Online Banking";
            document.getElementById("lblPayBank").innerHTML = "KTB BANK TRANSFER";
        }
    } else if (methodID == "ob_bay") {
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "block");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "none");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?ob=true");
        document.getElementById("r_bay").checked = "true";
        document.getElementById("cus_amt").style.visibility = 'visible';

        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "https://www.paysbuy.com/imgs/logo-krungsri-02.gif";

        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "ออนไลน์ แบ้งกิ้ง";
            document.getElementById("logo_head_method").title = "ออนไลน์ แบ้งกิ้ง";
            document.getElementById("lblPayBank").innerHTML = "บัญชีธนาคารกรุงศรีอยุธยา";
        }
        else {
            document.getElementById("logo_head_method").alt = "Online Banking";
            document.getElementById("logo_head_method").title = "Online Banking";
            document.getElementById("lblPayBank").innerHTML = "BAY BANK TRANSFER";
        }
    } else if (methodID == "ob_bbl") {
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "block");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "none");
        check_null_mathod("cash_main", "none");
        set_attribute_form("paynow.aspx?ob=true");
        document.getElementById("r_bbl").checked = "true";
        document.getElementById("cus_amt").style.visibility = 'visible';

        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "https://www.paysbuy.com/imgs/bbl_logo.jpg";

        if (lang == "T") {
            document.getElementById("logo_head_method").alt = "ออนไลน์ แบ้งกิ้ง";
            document.getElementById("logo_head_method").title = "ออนไลน์ แบ้งกิ้ง";
            document.getElementById("lblPayBank").innerHTML = "บัญชีธนาคารกรุงเทพ";
        }
        else {
            document.getElementById("logo_head_method").alt = "Online Banking";
            document.getElementById("logo_head_method").title = "Online Banking";
            document.getElementById("lblPayBank").innerHTML = "BBL BANK TRANSFER";
        }
    } else if (methodID == "cash") {
        check_null_mathod("start_main", "none");
        check_null_mathod("login_main", "block");
        check_null_mathod("psb_main", "none");
        check_null_mathod("visa_main", "none");
        check_null_mathod("master_main", "none");
        check_null_mathod("amex_main", "none");
        check_null_mathod("jcb_main", "none");
        check_null_mathod("paypal_main", "none");
        check_null_mathod("ob_main", "none");
        check_null_mathod("bank_w_main", "none");
        check_null_mathod("cs_main", "none");
        check_null_mathod("cc_main", "none");
        check_null_mathod("cash_main", "block");
        set_attribute_form("paynow.aspx?cash=true");
        document.getElementById("r_cash").checked = "true";
        document.getElementById("cus_amt").style.visibility = 'visible';
        document.getElementById("paypal_cus_amt").style.visibility = 'hidden';
        document.getElementById("logo_head_method").src = "images/money.png";
        if (lang == "T") {
            document.getElementById("logo_head_method").src = "images/money.png";
            document.getElementById("logo_head_method").alt = "ชำระเงินสด";
            document.getElementById("logo_head_method").title = "ชำระเงินสด";
        }
        else {
            document.getElementById("logo_head_method").src = "images/money.png";
            document.getElementById("logo_head_method").alt = "Cash";
            document.getElementById("logo_head_method").title = "Cash";
        }
    }




    if (document.getElementById("hide_method") != null) {
        document.getElementById("hide_method").value = methodID;
    }
}


// for new paynow

var hh = 38;
var inter;
//we show the box by setting the visibility of the element and incrementing the height smoothly
function ShowBox() {
    obj = document.getElementById("coverlogin");
    //Depending on the amount of text, set the maximum height here in pixels
    if (hh == 52) {
        obj.style.visibility = 'visible';
        obj.style.height = '52px';
        clearInterval(inter);
        return;
    }

    obj.style.visibility = 'visible';
    hh += 2;
    obj.style.height = hh + 'px';
    document.getElementById("click_show").style.display = "none";
    document.getElementById("click_hide").style.display = "block";
}

//same way as above but reversed
function HideBox() {
    document.getElementById("click_show").style.display = "block";
    document.getElementById("click_hide").style.display = "none";
    obj = document.getElementById("coverlogin");
    if (hh == 38) {
        obj.style.visibility = 'visible';
        obj.style.height = '38px';
        clearInterval(inter);
        return;
    }
    hh -= 2;
    obj.style.height = hh + 'px';
}
function hide_user_lite(chk_box, div_class, data_email, email) {
    if (document.getElementById(chk_box).checked) {
        document.getElementById(div_class).style.display = "inline";
        document.getElementById(email).value = document.getElementById(data_email).value;
    }
    else {
        document.getElementById(div_class).style.display = "none";
        document.getElementById(email).value = "";
    }
}
function getEmail(data, email) {
    if (data != '') {
        document.getElementById(email).value = data;
    }
    else {
        document.getElementById(email).value = '';
    }
}

/* script coundown */
var milisec = 0;
var seconds = 20;
var lang = "E";
if (getCookie("language") != null) {
    lang = getCookie("language").toUpperCase();
}
if (lang == "T") {
    if (document.getElementById("show_time") != null) {
        document.getElementById("show_time").innerHTML = "หรือรอ <font class=\"text-bold\">20</font> วินาทีเพื่อกลับสู่หน้าร้านค้า";
    }
}
else {
    if (document.getElementById("show_time") != null) {
        document.getElementById("show_time").innerHTML = "or wait <font class=\"text-bold\">20</font> seconds to go back to merchant's page.";
    }
}
function display(url_redirect) {

    if (milisec <= 0) {
        milisec = 9;
        seconds -= 1;
    }
    if (seconds <= -1) {
        milisec = 0;
        seconds += 1;
    } else {
        milisec -= 1;
        if (lang == "T") {
            if (document.getElementById("show_time") != null) {
                document.getElementById("show_time").innerHTML = "หรือรอ <font class=\"text-bold\">" + seconds + "</font> วินาที";
            }
        }
        else {
            if (document.getElementById("show_time") != null) {
                document.getElementById("show_time").innerHTML = "or wait <font class=\"text-bold\">" + seconds + "</font> seconds";
            }
        }
        if (seconds <= 0) {
            seconds = 0;
            window.location = url_redirect + "?autopost=true";
        }
        else {
            setTimeout("display('" + url_redirect + "')", 100);
        }
    }

}



/*function getValue(str, id) {
if (str != "")
{
document.getElementById("paynow_paynow_ob_hide_value_bank").value = '';
document.getElementById("paynow_paynow_ob_hide_value_bank").value = str;
}
if (id != "")
{
document.getElementById("paynow_paynow_ob_hide_value_id").value = '';
document.getElementById("paynow_paynow_ob_hide_value_id").value = str;
}
}*/


function checkinvoice(type) {
    DoubleClickTrapperAction('confBT');
    document.getElementById(type + "div_conf").style.display = "none";
    document.getElementById(type + "div_load").style.display = "block";

}
