if(is_mac)
{
	cookieIsMac = new Cookie('isMac', new Date(parseInt(Date.parse(new Date())) + (60000 * 60 * 24 * 30 * 6))); // show about once every 6 months

	if (cookieIsMac.get() != "1")
	{
		cookieIsMac.set("1")
		msgWin = popup('isMacMsg', '/popups/mac_message.jsp', 400, 285, false, false);
	}
}

//warning for 4.x browsers
if((is_nav4) || (is_ie4 && ((!is_ie5up) && (!is_ie5_5up) && (!is_ie6up))))
{

	is4x = new Cookie('is4x');



	if(is4x.get() != "1")
	{
		is4x.set("1");
		msgWin = popup('is4xMsg', '/popups/4x_message.jsp', 400, 300, false, false);
	}
}


function Cookie(name, expires, domain, path, isSecure)
{

	this.name     = name;
	this.expires  = expires;
	this.domain   = domain;
	this.path     = path;
	this.isSecure = isSecure;

	this.get = function() {
		var cookieArray = document.cookie.split(";");
		var cookieName = "";
		var cookieValue = "";
		var cookieLength = 0;
		var i = 0;
		var middle = -1;
		var length = 0;

		for (i=0; i<cookieArray.length;i++)
		{
			cookieLength = cookieArray[i].length;
			if (cookieLength < 3) continue;

			middle = cookieArray[i].indexOf("=");
			if (middle == -1) continue;

			cookieName = trim(cookieArray[i].substring(0, middle));
			cookieValue = trim(cookieArray[i].substring(middle+1, cookieLength));

			if (cookieName == this.name) return unescape(cookieValue);
		}
		return "";
	}

	this.set = function(string) {
		document.cookie = this.name + "=" + escape(string) +
			((this.expires) ? "; expires=" + this.expires.toGMTString() : "") +
			((this.path) ? "; path=" + this.path : "") +
			((this.domain) ? "; domain="  + this.domain : "") +
			((this.isSecure) ? "; secure" : "");
	}

	this.del = function() {
		document.cookie = this.name + "=" +
			((this.expires) ? "; expires=Tue, 1, Jan 1980 00:00:00 UTC" : "") +
			((this.path) ? "; path=" + this.path : "") +
			((this.domain) ? "; domain=" + this.domain : "");
	}
}

function trim(strText) {
	while (strText.substring(0,1) == ' ') strText = strText.substring(1, strText.length);
	while (strText.substring(strText.length-1,strText.length) == ' ')  strText = strText.substring(0, strText.length-1);
	return strText;
}