// scripts by ian cavalier
   // email: imc107@psu.edu
   // website: http://www.oxygenesis.com/
   // feel free to use/modify the following scripts any way you like as
   // long as these five comment lines remain with the source code.  thanks.


// CHANGE WINDOW STATUS BAR ONMOUSEOVER
   function change(status) {
     window.status = status;
   }


// PRELOAD HIDDEN IMAGES TO CACHE
   // define imgSwap function
   function imgSwap(imgObjectName, imgObjectState) {

   // test browser compatibility
   if (navigator.appName== "Netscape" && parseInt(navigator.appVersion) >= 3) {
     imgObject = new Object();
     imgObject = imgObjectName;
     imgObject.src = imgObjectState;
     }
   }

   // define imgPreLoad function
   function imgPreLoad(i, img) {

   // test browser compatibility
   if (navigator.appName== "Netscape" && parseInt(navigator.appVersion) >= 3) {
     cacheImg[i] = new Image();
     cacheImg[i].src = img;
     }
   }

   // name images
   m1 = "menu-start-on.gif";
   m2 = "menu-about-on.gif";
   m3 = "menu-education-on.gif";
   m4 = "menu-community-on.gif";
   m5 = "menu-government-on.gif";
   m6 = "menu-law-on.gif";
   m7 = "menu-strategic-on.gif";
   m8 = "menu-creative-on.gif";

   // load images
   cacheImg = new Array();
   imgPreLoad(1,m1);
   imgPreLoad(2,m2);
   imgPreLoad(3,m3);
   imgPreLoad(4,m4);
   imgPreLoad(5,m5);
   imgPreLoad(6,m6);
   imgPreLoad(7,m7);
   imgPreLoad(8,m8);


// CHECK BROWSER VERSION TO DETERMINE IF MS FUNCTIONS WILL BE ACTIVATED
   bn = navigator.appName;
   bv = parseFloat(navigator.appVersion); 

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

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

// DEFINE SHOWN AND HIDDEN IMAGES THAT WILL APPEAR ONMOUSEOVER
   agent = navigator.userAgent
   browserversion = 1

   if (agent.indexOf("a/2",6) == -1) { 
     browserversion = 1} 
   else { 
     browserversion = 2}

   if (browserversion == 1) {

   menu_start_on = new Image(220,30);
   menu_start_on.src = "menu-start-on.gif";
   menu_start_off = new Image(220,30);
   menu_start_off.src = "menu-start-off.gif";

   menu_about_on = new Image(220,30);
   menu_about_on.src = "menu-about-on.gif";
   menu_about_off = new Image(220,30);
   menu_about_off.src = "menu-about-off.gif";

   menu_education_on = new Image(220,30);
   menu_education_on.src = "menu-education-on.gif";
   menu_education_off = new Image(220,30);
   menu_education_off.src = "menu-education-off.gif";

   menu_community_on = new Image(220,30);
   menu_community_on.src = "menu-community-on.gif";
   menu_community_off = new Image(220,30);
   menu_community_off.src = "menu-community-off.gif";

   menu_government_on = new Image(220,30);
   menu_government_on.src = "menu-government-on.gif";
   menu_government_off = new Image(220,30);
   menu_government_off.src = "menu-government-off.gif";

   menu_law_on = new Image(220,30);
   menu_law_on.src = "menu-law-on.gif";
   menu_law_off = new Image(220,30);
   menu_law_off.src = "menu-law-off.gif";

   menu_strategic_on = new Image(220,30);
   menu_strategic_on.src = "menu-strategic-on.gif";
   menu_strategic_off = new Image(220,30);
   menu_strategic_off.src = "menu-strategic-off.gif";

   menu_creative_on = new Image(220,30);
   menu_creative_on.src = "menu-creative-on.gif";
   menu_creative_off = new Image(220,30);
   menu_creative_off.src = "menu-creative-off.gif";
   }

   function viewReplace(imgDocID,imgObjName) { 
     if (browserversion == 1) {
       document.images[imgDocID].src = eval(imgObjName + ".src")
     }
   }
