// <!--
// BEGIN Script

function createCookie(name,value,days) {
	var noDays = days;
	// don't allow zero days as if client/server clocks are different cookie will get erased so set it for an hour
	if (noDays == 0) noDays = 0.042;
	var date = new Date();
	date.setTime(date.getTime()+(noDays*24*60*60*1000));
	document.cookie = name + "=" + value + "; expires=" + date.toGMTString() + "; 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 && nameEQ.length != c.length)
			return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

function browserCheck()	{
	if (!navigator.cookieEnabled)
		alert("You need to enable cookies for this site to function properly!");
	if (!document.getElementById) {
		var browser='old';
		alert("This site will only work properly with IE5+, Firefox, or Opera 6+");
	} else {
		var browser='new';
	}
}

// END Script
// -->

