
// convert all characters to lowercase to simplify testing 
var agt=navigator.userAgent.toLowerCase(); 

// *** BROWSER VERSION ***
// Only specific versions of IE needed for now 
// Note: On IE5, these return 4, so use is_ie5up to detect IE5. 
var is_major = parseInt(navigator.appVersion); 
var is_minor = parseFloat(navigator.appVersion); 

var is_ie   = (agt.indexOf("msie") != -1); 
var is_ie3  = (is_ie && (is_major < 4)); 
var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
var is_ie4up  = (is_ie  && (is_major >= 4)); 
var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
var is_ie5up  = (is_ie  && !is_ie3 && !is_ie4);
 
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
			&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
			&& (agt.indexOf('webtv')==-1)); 
var is_nav4 = (is_nav && (is_major == 4)); 
var is_nav4up = (is_nav && (is_major >= 4)); 
var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || 
						  (agt.indexOf("; nav") != -1)) ); 
var is_nav5 = (is_nav && (is_major == 5)); 
var is_nav5up = (is_nav && (is_major >= 5)); 

var is_dom = (document.getElementById);

// A netscape bug makes layers lose their css positioning when the browser is
// resized. check if that's happened here, if it has, reload the document to
// fix the the page layout.

var current_width;
var current_height;
var start_width;
var start_height;

// Set "onresize" handler to window resize bug fix function


if (is_nav4)
{
   getlayerDimensions();
   window.captureEvents(Event.RESIZE);
   window.onresize=fixNav4CSS;
}


function fixNav4CSS(evt) 
{
	current_width = window.innerWidth;
	current_height = window.innerHeight;
	if (current_width != start_width || current_height != start_height)
	{
		location.reload();
	}
}
function getlayerDimensions()
{
	if (is_nav4)
	{
		start_width = window.innerWidth;
		start_height = window.innerHeight;
	}
}
