﻿var cid;
var SIRURL;
function disablesubmit(caller) {
    cid = caller.id;
    var x = setTimeout('dodisable(cid)', 100);
}

function dodisable(id) {

    var btn = document.getElementById(id);
    btn.value = "Please Wait ...";
    btn.disabled = true;
}

function SetGuidField() {

    var cc = document.getElementById('txtCC');
    var length = cc.value.split(' ').join('').length

    if (length < 13 | length > 16) {
        document.getElementById('ctl00_cplhContent_lblError').innerHTML = "Invalid Credit Card Number.";
        return false;
    }
    else {
        document.getElementById('ContentPlaceHolder1_lblError').innerHTML = "";
        document.getElementById('secure_I_C_1').value = '12/31/9999_' +
                                                        document.getElementById('txtCC').value;

        document.getElementById('txtCC').value = "";
        document.forms[0].action = SIRURL;
        return true;
    }
}

function SetPostAction() {

    document.forms[0].action = "confirm.aspx";
}
