﻿
function check_qty(txtqty) {
       if (emptyField(txtqty)) {
        alert('Please enter quantity');
        txtqty.focus();
        return false;
    }
    if (!isInt(txtqty.value)) {
        alert('Please enter Numeric Quantity');
        txtqty.focus();
        return false;
    }
    if (txtqty.value < 1) {
        alert('Quentity must be greater then zero.');
        txtqty.focus();
        return false;
    }

    if (!isInt(txtqty.value)) {
        alert('Please enter integer value.');
        txtqty.focus();
        return false;
    }
}


function check_qty1() {
    var test = 0;
    var con = 2;
    for (var i = 0; i < document.aspnetForm.length; i++) {
        if (emptyField(document.getElementById("ctl00_ContentPlaceHolder1_dtgridCart_ctl0" + con + "_txtqty"))) {
            alert('Please enter quantity');
            document.getElementById("ctl00_ContentPlaceHolder1_dtgridCart_ctl0" + con + "_txtqty").focus();
            return false;
        }

        if (document.getElementById("ctl00_ContentPlaceHolder1_dtgridCart_ctl0" + con + "_txtqty").value < 1) {
            alert('Quentity must be greater then zero.');
            document.getElementById("ctl00_ContentPlaceHolder1_dtgridCart_ctl0" + con + "_txtqty").focus();
            return false;
        }

        if (!isInt(document.getElementById("ctl00_ContentPlaceHolder1_dtgridCart_ctl0" + con + "_txtqty").value)) {
            alert('Please enter integer value.');
            document.getElementById("ctl00_ContentPlaceHolder1_dtgridCart_ctl0" + con + "_txtqty").focus();
            return false;
        }


        con = con + 1;
    }
}


function CheckPaymentselection() {
    if (document.getElementById("ctl00_ContentPlaceHolder1_rdoselection_0").checked == false && document.getElementById("ctl00_ContentPlaceHolder1_rdoselection_1").checked == false) {
        alert('Please select your payment method.');
        return false;
    }
}
