function getCookie(sName)
{
	var iStart = document.cookie.indexOf(sName + '=');
	var iLen = iStart + sName.length + 1;
	if ( !iStart && sName != document.cookie.substring(0, sName.length) ) {
		return null;
	}
	
	if ( iStart == -1 ) {
		return null;
	}
	
	var iEnd = document.cookie.indexOf(';', iLen);
	if ( iEnd == -1 ) {
		iEnd = document.cookie.length;
	}
	
	var sCookie = document.cookie.substring(iLen, iEnd);
	return unescape(sCookie);
}
function setCookie(sName, sValue)
{
	var oDate = new Date;
	oDate.setDate(oDate.getDate() + 42);
	var sCookie = sName + '=' + escape(sValue) + ';';
	sCookie += 'expires=' + oDate.toGMTString();
	document.cookie = sCookie;
	return;
}
function hideIE6Warning()
{
	setCookie('hideie6', 1);
	var oWarning = document.getElementById('ieWarningContainer');
	if ( oWarning ) {
		document.body.removeChild(oWarning);
	}
	return;
}
if ( /MSIE 6/.test(navigator.userAgent) ) {
	var hideWarning = getCookie('hideie6');
	if ( !hideWarning ) {
		var sHTML = '<div id="ieWarningContainer">';
		sHTML += '<a id="ieWarning" href="http://www.microsoft.com/windows/internet-explorer/default.aspx">';
		sHTML += '<img alt="" src="/custom/Clarity/Images/ie_logo.gif" style="margin-right:2em;" /> ';
		sHTML += 'Alert: Your browser is out of date. Please upgrade to ensure a fast, secure, and reliable Lighten Up experience. ';
		sHTML += '<img alt="Close" title="Hide this Warning" src="/custom/Clarity/Images/ie_close.gif" ';
		sHTML += 'onclick="hideIE6Warning();return(false);" style="margin-left:3em;" /></a></div>';
		document.write(sHTML);
	}
}
