//ns = (document.layers)? true:false;
//ie = (document.all)? true:false;

var mouseX;
var mouseY;

//document.onmousemove = checkwhere;
//if(document.captureEvents) { document.captureEvents(Event.MOUSEMOVE); }

/*
function checkwhere(e) {

	if (document.layers){
		mouseX = e.x + document.body.scrollLeft;
		mouseY = e.y + document.body.scrollTop;
	}
	else if (document.all){

		mouseX = event.clientX + document.body.scrollLeft;
		mouseY = event.clientY + document.body.scrollTop;
	}
	else if (document.getElementById){
		mouseX = e.clientX + document.body.scrollLeft;
		mouseY = e.clientY + document.body.scrollTop;
	}
}
*/

function hint(rolloverObj, hintObj, vis, offX, offY) {
	if (vis != 'none') {
		hintObj.style.left = mouseX + offX;
		hintObj.style.top = mouseY + offY;
	}
	hintObj.style.display = vis;
}

function OpenWindow(th, width, height, scroll) {
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - width) / 2;
		var yc = (ah - height) / 2;
		str = ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
	}
	var newwin = window.open(th, 'page_1', 'width=' + width + ',height=' + height + ',resizable=no,location=no,toolbar=no,menubar=no,status=no,scrollbars=' + scroll + str);
	newwin.focus();
}

function getObject(id) {
	if (document.all) {
		return document.all[id];
	}
	else if (document.getElementById) {
		return document.getElementById(id);
	}
	return;
}

function isNumeric(val) {
	if (isNaN(val) || val.indexOf(".") != -1 || val.indexOf("e") != -1 || val.indexOf(",") != -1) {
		return false;
	}
	else {
		return true;
	}
}

function showHide(id1) {
//	if (ie) {
		el = getObject(id1).style;
		if (el.display == "none"){
			el.display = "block";
		} else {
			el.display = "none";
			document.registration.legal.value = ""
		}
//	} else
//		return true;
}

