function badBrowser(){
	if($.browser.msie && parseInt($.browser.version) <= 6){ return true;}	
	return false;
}
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() && getBadBrowser('browserWarning') != 'seen' ){
	$(function(){
		$("<div id='browserWarning'><p><strong>Warning! This browser will compromise what little integrity there is of the internet!</strong> Please switch to any of the following alternative web browsers to restore it to some form of normality. Take your pick from the sensible choices of: <a href='http://getfirefox.com'>FireFox</a>, <a href='http://www.opera.com/'>Opera</a> or <a href='http://www.apple.com/safari/'>Safari</a>. If you must insist on struggling with Microsoft bloatware, at least upgrade to the latest version of <a href='http://www.microsoft.com/windows/downloads/ie/getitnow.mspx'>Internet Explorer</a> to make my web development life easier, if not your own...</p><p>[<a href='#' id='warningClose'>Ignore well informed advice...</a>]</p></div>")
			.css({
				backgroundColor: '#fcfdde',
				'width': '100%',
				'border-top': 'solid 1px #000',
				'border-bottom': 'solid 1px #000',
				'text-align': 'left',
				padding:'5px 0px 5px 0px'
			})
			.prependTo("body");
		
		$('#warningClose').click(function(){
			setBadBrowser('browserWarning','seen');
			$('#browserWarning').slideUp('slow');
			return false;
		});
	});	
}
