//
//BROWSER DETECTION
//Below is some "plug-&-play browser detection that compensates for
//browsers such as IE 3.0 and Netscape 2.0 and less that do not support Javascript or the
//image object. It also is ready for all future browser versions.
//All it does is detect the browser and then set a global variable called "roll"
//to either true or false for the image functions below or anything else.

browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion);

if (browser_name == "Netscape" && browser_version < 2.0)
	{
	roll = 'false';
	}
else if (browser_name == "Netscape" && browser_version == 2.0)
	{
	roll = 'false';
	}
else if (browser_name == "Netscape" && browser_version >= 3.0)
	{
	roll = 'true';
	}
else if (browser_name == "Microsoft Internet Explorer" && browser_version <= 2.0)
	{
	roll = 'false';
	}
else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0)
	{
	roll = 'true';
	}
else
	{
	roll = 'false';
	}

//*************************************************************************************

//IMAGE ROLLOVER FUCTIONS
//The following scripts functions alow you do execute a "single rollover".
//by that I mean when you rollover a image it changes. The other two allow you
//to rollover one image, have that one change as well as another one on the page.
//These are plug and play, there is no need to edit these.

//NOTE go to the bottom of the page to add in the images to be "pre_loaded" nito the browsers
//memory cache

//msover1 and msout1 are for the singe image rollover
//msover2 and msout2 are for the dual rollovers
//All you have to do is reference the images as noted below and your on your way.
//NOTE HTML code for futher documentation

function msover(img,ref)
	{
		if (roll == 'true')
			{
			document.images[img].src = ref;
			}
	}

function msout(img,ref)
	{
		if (roll == 'true')
			{
			document.images[img].src = ref;
			}
	}

function msover2(img1,ref1,img2,ref2)
	{
		if (roll == 'true')
			{
			document.images[img1].src = ref1;
			document.images[img2].src = ref2;
			}
	}

function msout2(img1,ref1,img2,ref2)
	{
		if (roll == 'true')
			{
			document.images[img1].src = ref1;
			document.images[img2].src = ref2;
			}
	}

function msover3(img1,ref1,img2,ref2,img3,ref3)
	{
		if (roll == 'true')
			{
			document.images[img1].src = ref1;
			document.images[img2].src = ref2;
			document.images[img3].src = ref3;
			}
	}

function msout3(img1,ref1,img2,ref2,img3,ref3)
	{
		if (roll == 'true')
			{
			document.images[img1].src = ref1;
			document.images[img2].src = ref2;
			document.images[img3].src = ref3;
			}
	}

//************************************************************************************

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];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
