// JavaScript Document
function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}
// Returns true if string s is empty or 
// whitespace characters only.
var reWhitespace = /^\s+$/
var reEmail = /^.+\@.+\..+$/

function isWhitespace (s)

{   // Is s empty?
    return (isEmpty(s) || reWhitespace.test(s));
}

function isEmail (s)

{   if (isEmpty(s)) 
       if (isEmail.arguments.length == 1) return defaultEmptyOK;
       else return (isEmail.arguments[1] == true);
    
    else {
       return reEmail.test(s)
    }
}

function checkNumeric(e) 
		{
		
		var keynum
		var keychar
		var numcheck
		
		if(window.event) // IE
		{
			keynum = e.keyCode
		}
		else if(e.which) // Netscape/Firefox/Opera
		{
			keynum = e.which
		}
		
		
		if(keynum==8)
		{
			return true;	
		}
		else
		{
			keychar = String.fromCharCode(keynum)
			numcheck = /\d/
			return numcheck.test(keychar)	
		}
		/*if (field.value.length > maxlimit) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		// otherwise, update 'characters left' counter
		else
		cntfield.value = maxlimit - field.value.length;*/
		}
		
function checkNumeric_dot(e) 
		{
		
		var keynum
		var keychar
		var numcheck
		
		if(window.event) // IE
		{
			keynum = e.keyCode
		}
		else if(e.which) // Netscape/Firefox/Opera
		{
			keynum = e.which
		}
		
		
		if(keynum==8)
		{
			return true;	
		}
		else
		{
			keychar = String.fromCharCode(keynum)
			numcheck = /\d|\./
			return numcheck.test(keychar)	
		}
		/*if (field.value.length > maxlimit) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		// otherwise, update 'characters left' counter
		else
		cntfield.value = maxlimit - field.value.length;*/
		}
