function isInteger (s)
{
	var i;
    if (isEmpty(s)) 
       if (isInteger.arguments.length == 1) return false;
       else return (isInteger.arguments[1] == true);
    // Search through string's characters one by one
    // until we find a non-numeric character.
    // When we do, return false; if we don't, return true.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (!isDigit(c)) return false;
    }
    // All characters are numbers.
    return true;
}
// Returns true if character c is a digit (0 .. 9).
function isDigit (c)
{
	return ((c >= "0") && (c <= "9"))
}
// Check whether string s is empty.
function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}
// Check if is Numeric
function isNumeric(val){return(parseFloat(val,10)==(val*1));}

function checkUncheckAll(oCheckbox) { 
var el, i = 0, bWhich = oCheckbox.checked, oForm = oCheckbox.form; 
while (el = oForm[i++]) if (el.type == 'checkbox') el.checked = bWhich; 
} 

