<!-- 

function isFilled(elm) {
	elmstr = elm.value + "";
	if (elmstr == "")
		return false;
	else return true;
}

function Trim(elm) {
	var elmstr = elm.value + "";
	while (elmstr.charAt(0) == " ") {
		elmstr = elmstr.substring(1, elmstr.length);
	}
	while (elmstr.charAt(elmstr.length-1) == " ") {
		elmstr = elmstr.substring(0, elmstr.length-1);
	}
	return elmstr;
}

function isAmount(elm) {
	var elmstr = elm.value + "";
	for (var i = 0; i < (elmstr.length); i++) {
		if ((elmstr.charAt(i) < "0" ||
				elmstr.charAt(i) > "9") &&
//				(elmstr.charAt(i) != ",") &&
				(elmstr.charAt(i) != ".")) {
			return false;
		}
	}
	return true;
}

function isInt(elm) {
	var elmstr = elm.value + "";
	if (elmstr == "") return false;
	for (var i = 0; i < (elmstr.length); i++) {
		if (elmstr.charAt(i) < "0" ||
			elmstr.charAt(i) > "9") {
			return false;
		}
	}
	return true;
}

function isDigit(D) {
	var elmstr = D + ""; 
	if (elmstr.length != 1) return false;
	if (!((elmstr.charAt(0) >= "0") && (elmstr.charAt(0) <= "9"))) {
		return false;
	}
	return true;
}

function isChar(C) {
	var elmstr = C + ""; 
	if (elmstr.length != 1) return false;
	elmstr = elmstr.toUpperCase();
	if (!((elmstr.charAt(0) >= "A") && (elmstr.charAt(0) <= "Z"))) {
		return false;
	}
	return true;
}

function isAlphaNum(elm) {
var elmstr = elm.value + "";
	for (var i = 0; i < (elmstr.length); i++) {
		if (!((elmstr.charAt(i) >= "0" && elmstr.charAt(i) <= "9") ||
		(elmstr.charAt(i) >= "A" && elmstr.charAt(i) <= "Z") ||
		(elmstr.charAt(i) >= "a" && elmstr.charAt(i) <= "z"))) {
			return false;
		}
	}
	return true;
}

function isEmail(elm) {
	var elmstr = elm.value + "";
	if (elmstr.indexOf("@") == "-1" ||
		elmstr.indexOf(".") == "-1" ||
		elmstr.indexOf(" ") != "-1" ||
		elmstr.length < 6) 
			return false;
	p = -1;
	for (var i = elmstr.length-1; i >= 0; i--) {
		if (elmstr.charAt(i) == ".") {
			p = i;
			break;
		}
	}
	if ((p < elmstr.indexOf("@")) || (p > elmstr.length-3))
		return false;
	else
		return true;
}

function isZIP(elm) {
	var elmstr = elm.value + ""; 
	if (elmstr == "") return false;
	if (!((elmstr.length == 5) || (elmstr.length == 10))) return false;
	for (var i = 0; i < elmstr.length; i++) {
		if (!((elmstr.charAt(i) >= "0" &&
					elmstr.charAt(i) <= "9") ||
					elmstr.charAt(i) == "-")) {
			return false;
		}
	}
	if (!(elmstr.indexOf("-") == 5 || elmstr.indexOf("-") == -1)) {
		return false;
	}
	return true;
}

function isCanadianPC(elm) {
	var elmstr = elm.value + ""; 
	if (elmstr == "") return false;
	if (!(elmstr.length == 7)) return false;
	if (!((isChar(elmstr.charAt(0))) &&
				(isDigit(elmstr.charAt(1))) &&
				(isChar(elmstr.charAt(2))) &&
				(elmstr.charAt(3) == " ") &&
				(isDigit(elmstr.charAt(4))) &&
				(isChar(elmstr.charAt(5))) &&
				(isDigit(elmstr.charAt(6))))) {
			return false;
	}
	return true;
}

function OpenAWindow(APage, W, H) {
	aWindow = window.open(APage, "", "width=" + W + ",height=" + H);
}

function Enlarge(x, w, h) {
	 w = w + 20;
	 h = h + 30;
	 x = x + ".jpg";
    window.open(x, "", "width=" + w + ",height=" + h);
}

function FormatNumber(TheNumber, decplaces) {
	expr = TheNumber + "";
//	alert("FormatNumber=" + expr);
	if (expr.substring(0,1) == "$") {
		expr = expr.substring(1);
	}
	var str = "" + Math.round(eval(expr) * Math.pow(10,decplaces));
	while (str.length <= decplaces) {
		str = "0" + str;
	}
	var decpoint = str.length - decplaces;
	var returnStr = str.substring(0,decpoint);
	if (decplaces > 0)
		returnStr += "." + str.substring(decpoint,str.length);
	return returnStr;
}

function isNumeric(elm) {
	var elmstr = elm + "";
	if (elmstr == "") return false;
	for (var i = 0; i < (elmstr.length); i++) {
		if ((elmstr.charAt(i) < "0" ||
				elmstr.charAt(i) > "9") &&
//				(elmstr.charAt(i) != ",") &&
				(elmstr.charAt(i) != ".")) {
			return false;
		}
	}
	return true;
}

function isInteger(elm) {
	var elmstr = elm + "";
	if (elmstr == "") return false;
	for (var i = 0; i < (elmstr.length); i++) {
		if (elmstr.charAt(i) < "0" ||
			elmstr.charAt(i) > "9") {
			return false;
		}
	}
	return true;
}


// -->