﻿// JScript File
function checkIt(id) {
    return testAmount(document.getElementById(id));
}

function testAmount(amt) {
    var add = amt.value;
    if (add.length == 0)
        return false;
    if (isNaN(add) || add.indexOf('.') != -1) {
        resetValue(amt);
        alert(strIntsOnly);
        return false;
    } else {
        try {
            add = parseInt(add);
            if (!add > 0) {
                resetValue(amt);
                return false;
            }
        } catch (e) {
	        resetValue(amt);
	        return false;
        }
    }
    return true;
}

function resetValue(el) {
    el.value = "";
    el.select();
    el.focus();
}