function badBrowser()
{
  var $result = false;
  
	if($.browser.msie && $.browser.version <= 7)
	{
	  $result = true;
  }
	
	return $result;
}

function getBadBrowser(c_name)
{
	if (document.cookie.length>0)
	{
	c_start=document.cookie.indexOf(c_name + "=");
	if (c_start!=-1)
		{ 
		c_start=c_start + c_name.length+1; 
		c_end=document.cookie.indexOf(";",c_start);
		if (c_end==-1) c_end=document.cookie.length;
		return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return "";
}	

function setBadBrowser(c_name,value,expiredays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

if(badBrowser())
{
	$(function()
	{
		$("<div id='browserWarning'><div style='width: 960px; margin: 0 auto'><strong style='font-size: 1.1em'>Unfortunately, we are unable to fully support your web browser.</strong><br />In the interest of your online safety we ask that you kindly upgrade to <a style='color: #454545; font-weight: bold' href='http://www.microsoft.com/windows/downloads/ie/getitnow.mspx'>Internet Explorer 8</a> or alternatively switch to the more secure and faster <a style='color: #454545; font-weight: bold' href='http://getfirefox.com'>FireFox</a></div></div> ")
			.css({
				'backgroundColor': '#FCFDEE',
				'position': 'fixed',
				'top': '0',
				'width': '100%',
				'border-top': 'solid 2px #C00',
				'border-bottom': 'solid 2px #C00',
				'font-size': '0.95em',
				'line-height': '1.75em',
				'text-align': 'center',
				'padding': '0.875em 0',
				'z-index': '100'
			})
			.prependTo("body");
			
		$('body').css({'backgroundPosition': '0 64px', 'padding-top': '64px'});
	});	
}
