Event.observe(window, 'load', function() {
	
	browserCheck();
});

	var badBrowserMessage = 'We noticed that you are using an older version of Internet Explorer. Our site works best with newer browsers and we recommend upgrading to the lastest version of Internet Explorer, Firefox or Safari.';




	
	function browserCheck() {
		
		//*** Lightbox Style Underlay for possible beefed up IE6 error message. ***///
	
		//var underdiv = new Element('div', {'id':'underlay'});
		//document.body.appendChild(underdiv);
		
		//$(underdiv).setStyle({
							 
		//	position: 'absolute',
		//	backgroundColor: '#000',
		//	opacity: 0.6,
		//	zIndex: '2000',
		//	width: '100%',
		//	top: 0,
		//	left: 0,
		//	height: document.viewport.getHeight() + 'px'
			
		//});
		
	

	var browserOk = true;

	// only support IE7 or greater
	if(Prototype.Browser.IE) {
	
		var matches = navigator.appVersion.match(/MSIE \d\.\d/);
		if(matches != null && matches.length > 0) {
		
			var version = parseFloat(matches[0].match(/\d\.\d/));
			if(version < 7) {
			
				browserOk = false;
			}
		} else {
		
			// if we got not matches, assume it's an old version
			browserOk = false;
		}
	} /*else if(navigator.userAgent.indexOf('Firefox') >= 0) {
	
		var matches = navigator.userAgent.match(/Firefox\/\d\.\d/);
		if(matches != null && matches.length > 0) {
		
			var version = parseFloat(matches[0].match(/\d\.\d/));
			
			if(version > 1) {
			
				browserOk = true;
			}
		}
	}*/
	
	if(!browserOk) {
	
		alert(badBrowserMessage);
	}
	
		
		
	
	
	}
	
