function popUp(href, width, height)
{
	//alert("href: " + href);
	//alert("width: " + width);
	//alert("height: " + height);
	day = new Date();
	id = day.getTime();
	var x = (640 - width) / 2;
	var y = (480 - height) / 2;
	if (screen)
	{
		y = (screen.availHeight - height) / 2;
		x = (screen.availWidth - width) / 2;
	}
	window.open(href, id, 'toolbar=yes,location=yes,directories=no,menubar=yes,resizable=yes,scrollbars=yes,width='+width+',height='+height+',screenX='+x+',screenY='+y+',left='+x+',top='+y);
}

function popupResults(formActionUrl, sessionNo)
{
	newWin = window.open('http://' + formActionUrl + '?session_no=' + sessionNo + '&request_id=twtskrslt', 'Results', 'toolbar=no,location=no,directories=no,menubar=no, resizable=yes,scrollbars=yes,width=300,height=200,screenX=150,screenY=150, left=150,top=150');
}

function getdata(dataField, spanName)
{
	dataField.value = document.getElementById(spanName).innerHTML;
	//alert("tableData: " + document.forms[0].tableData.value);
}

function validatePwd(pwd)
{
	var result = "ok";
	if (pwd.length < 6 || pwd.length > 15)
		result = "length";
	if (pwd.match(/[A-Z]/i) && pwd.match(/[0-9]/))
		var ok = "ok";
	else
		result = "chars";
	return result;
}
