function windowOpen(URL,width,height)
{
	windowFeatures ="menubar=no,scrollbars=no,location=no,favorites=no,resizable=yes,status=no,toolbar=no,directories=no";
	winLeft = (screen.width-width)/2; 
	winTop = (screen.height-(height+110))/2; 
    	myWindow = window.open( URL,"win","width=" + width + ",height=" + height+",left=" + winLeft + ",top=" + winTop + windowFeatures);
	if (window.focus) {myWindow.focus()}

}

//==========================================================
function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name)
{
	createCookie(name,"",-1);
}

//==========================================================

var isNav4, isIE4, isNav6 = false;
var range = "";
var styleObj = "";

if (navigator.appVersion.charAt(0) >= 4) {
	if (navigator.appName == "Netscape") {
		if (navigator.appVersion.charAt(0) >= 5) {
			isNav6 = true;
		}
		else {
			isNav4 = true;
		}
	}
	else {
		isIE4 = true;
		range = "all.";
		styleObj = ".style";
	}
}

function getObject(obj) {
	var theObj;
	if (typeof obj == "string") {
		if (isNav6) {
			theObj = document.getElementById(obj).style;
		}
		else {
			theObj = eval("document." + range + obj + styleObj);
		}
	}
	else {
		theObj = obj;
	}
	return theObj;
}

function show () {
	var theObj;
	for (var i = 0; i < show.arguments.length; i++) {
		theObj = getObject(show.arguments[i]);
		theObj.display = "block";
		theObj.visibility = "visible";
	}
}

function hide () {
	var theObj;
	for (var i = 0; i < hide.arguments.length; i++) {
		theObj = getObject(hide.arguments[i]);
		theObj.display = "none";
		theObj.visibility = "hidden";
	}
}

//=================================================

// rollover function

//function for the rollover images	
	function changeImages() {
	if (document.images) {
		for(var i=0; i<changeImages.arguments.length; i+=2) {
		document.images[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
		}
	}
}
