//universal browser sniffer

var agt=navigator.userAgent.toLowerCase(); // convert all characters to lowercase to simplify testing

this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);

this.nav  = ((agt.indexOf('mozilla')!=-1));

this.nav4 = (this.nav && (this.major == 4));
this.nav4up = (this.nav && (this.major >= 4));
this.navonly      = (this.nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) );
this.nav6 = (this.nav && (this.major == 5));
this.nav6up = (this.nav && (this.major >= 5));
this.gecko = (agt.indexOf('gecko') != -1);

this.ie     = ((agt.indexOf("msie") != -1));
this.ie4    = (this.ie && (this.major == 4) && (agt.indexOf("msie 4")!=-1) );
this.ie4up  = (this.ie  && (this.major >= 4));
this.ie5    = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) );
this.ie5_5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.5") !=-1));
this.ie5up  = (this.ie  && !this.ie3 && !this.ie4);
this.ie5_5up =(this.ie && !this.ie3 && !this.ie4 && !this.ie5);
this.ie6    = (this.ie && (this.major == 4) && (agt.indexOf("msie 6.")!=-1) );
this.ie6up  = (this.ie  && !this.ie3 && !this.ie4 && !this.ie5 && !this.ie5_5);

this.opera = (agt.indexOf("opera") != -1);
this.opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
this.opera5up = (this.opera && !this.opera2 && !this.opera3 && !this.opera4);

//OS detect
this.win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
this.mac    = (agt.indexOf("mac")!=-1);

//sniffer ends


//Resize script for browsers with resize bugs

function browsResize()	{
if(window.innerWidth != 796 || window.innerWidth != 1020){
window.location.reload();
//return false;	
	}
}


//popup maker

function popsOn(Url,Nehm,Feetchus)	{
		window.open(Url,Nehm,Feetchus);
}

//Dreamweaver code to preload rollovers...
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//image rollovers

if (document.images)	{

menu01_off = new Image();
menu01_off.src = "../images/menu01_off.gif";
menu01_on = new Image();
menu01_on.src = "../images/menu01_on.gif";

	menu02_off = new Image();
	menu02_off.src = "../images/menu02_off.gif";
	menu02_on = new Image();
	menu02_on.src = "../images/menu02_on.gif";

menu03_off = new Image();
menu03_off.src = "../images/menu03_off.gif";
menu03_on = new Image();
menu03_on.src = "../images/menu03_on.gif";

	menu04_off = new Image();
	menu04_off.src = "../images/menu04_off.gif";
	menu04_on = new Image();
	menu04_on.src = "../images/menu04_on.gif";

menu05_off = new Image();
menu05_off.src = "../images/menu05_off.gif";
menu05_on = new Image();
menu05_on.src = "../images/menu05_on.gif";

	menu06_off = new Image();
	menu06_off.src = "../images/menu06_off.gif";
	menu06_on = new Image();
	menu06_on.src = "../images/menu06_on.gif";
}

function rollOn(imageName)	{
 document.images[imageName].src = eval(imageName+"_on.src");
 }
 	 function rollOff(imageName)	{
	  document.images[imageName].src = eval(imageName+"_off.src");
  }
//end


d=document.all;
		function Fade(alf)	{
	if (this.ie5up && !isMacIE)	{
d(alf).style.cursor = "default";
}
	else if(this.nav6up || isMacIE)
	{	document.getElementById(alf).style.cursor = "default";				
		}		
}
		function unFade(alf,f)	{
	if(this.ie5up && !isMacIE)	{
d(alf).style.cursor = "hand";
}else if(this.nav6up || isMacIE)
	{	document.getElementById(alf).style.cursor = "pointer";
		}
}


function click(e) {
if (document.layers) {
if (e.which == 3) {
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
