function swapImg(sImg, sSrc) {
	document.images[sImg].src = sSrc;
}

function changeBackColor(sObj, sColor) {
	obj = document.all(sObj).style;
	eval("obj.backgroundColor = '#" + sColor + "';");
}

function hideObj(sObj) {
	eval("document.all('" + sObj + "').style.display = 'none'");
}

function showObj(sObj) {
	eval("document.all('" + sObj + "').style.display = ''");
}

function popupWin(sUrl) {
	window.open(sUrl, 'popup', 'width=400,height=400,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1');
}

function chkString(sTest) {
	if (!sTest) return false;
	if (sTest == " ") return false;
	var sChars = "*|,\"<>[]{}\;()&$#%";
	for (var i = 0; i < sTest.length; i++) {
		if (sChars.indexOf(sTest.charAt(i)) != -1)
		return false;
   }
   return true;
}

function chkInt(iTest) {
	if (!iTest) return false;
	if (iTest == " ") return false;
	if (iTest != 0) {
		if (iTest/iTest != 1) return false;
	}
   return true;
}

function chkDate(dTest) {
	if (dTest == '') return true;
	var sChars = "abcdefghijklmnopqrstuvwxyz~`!@#$%^&*()_=+{}|[]|:\"'<>?,";
	for (var i = 0; i < dTest.length; i++) {
		if (sChars.indexOf(dTest.charAt(i)) != -1) return false;
	}
	dValid = new Date(dTest);
	if (isNaN(dValid)) return false;   
	return true;
}