var imgs = "'/images/27_over.gif','/images/30_over.gif','/images/32_over.gif','/images/34_over.gif','/images/36_over.gif','/images/38_over.gif'";
var grantImgs ="'/images/grant/27_grant_over.jpg','/images/grant/30_grant_over.jpg','/images/grant/32_grant_over.jpg','/images/grant/36_grant_over.jpg','/images/grant/34_grant_over.jpg'";
HM_PG_MenuWidth = 140;
HM_PG_FontFamily = "Arial,sans-serif";
HM_PG_FontSize = 9;
HM_PG_FontBold = 0;
HM_PG_FontItalic = 0;
HM_PG_FontColor = "blue";
HM_PG_FontColorOver = "white";
HM_PG_BGColor = "#DDDDDD";
HM_PG_BGColorOver = "#FFCCCC";
HM_PG_ItemPadding = 2;

HM_PG_BorderWidth = 1;
HM_PG_BorderColor = "#666666";
HM_PG_BorderStyle = "solid";
HM_PG_SeparatorSize = 1;
HM_PG_SeparatorColor = "#666666";

HM_PG_ImageSrc = "/images/HM_More_black_right.gif";
HM_PG_ImageSrcLeft = "/images/HM_More_black_right.gif";
HM_PG_ImageSrcOver = "/images/HM_More_black_right.gif";
HM_PG_ImageSrcLeftOver = "/images/HM_More_black_right.gif";

HM_PG_ImageSize = 5;
HM_PG_ImageHorizSpace = 0;
HM_PG_ImageVertSpace = 2;

HM_PG_KeepHilite = true; 
HM_PG_ClickStart = 0;
HM_PG_ClickKill = false;
HM_PG_ChildOverlap = 20;
HM_PG_ChildOffset = 10;
HM_PG_ChildPerCentOver = null;
HM_PG_TopSecondsVisible = .5;
HM_PG_StatusDisplayBuild =0;
HM_PG_StatusDisplayLink = 1;
HM_PG_UponDisplay = null;
HM_PG_UponHide = null;
HM_PG_RightToLeft = false;

HM_PG_CreateTopOnly = 1;
HM_PG_ShowLinkCursor = 1;
HM_PG_NSFontOver = true;

//HM_a_TreesToBuild = [2];

function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    // *** BROWSER VERSION ***
    this.major = parseInt(navigator.appVersion)
    this.minor = parseFloat(navigator.appVersion)

    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav2 = (this.nav && (this.major == 2))
    this.nav3 = (this.nav && (this.major == 3))
    this.nav4 = (this.nav && (this.major == 4))
	this.nav4up = this.nav && (this.major >= 4)
	this.navonly      = (this.nav && (agt.indexOf(";nav") != -1))
	this.navlessthan4 = this.nav && (this.major < 4)
	//alert("navlessthen4");

    this.ie   = (agt.indexOf("msie") != -1)
    this.ie3  = (this.ie && (this.major == 2))
	this.ieBelow4 = (this.ie && (this.major < 4));  
    this.ie4  = (this.ie && (this.major == 4))
    //this.ie5  = (this.ie  && (this.major == 5));
	this.ie5up = (this.ie  && (this.major >= 5));
    
  
    this.opera = (agt.indexOf("opera") != -1)
     
    // *** JAVASCRIPT VERSION CHECK *** 
    // Useful to workaround Nav3 bug in which Nav3 
    // loads <SCRIPT LANGUAGE="JavaScript1.2">.
    if (this.nav2 || this.ie3) this.js = 1.0
    else if (this.nav3 || this.opera) this.js = 1.1
    else if (this.nav4 || this.ie4) this.js = 1.2
    else if ((this.nav && (this.minor > 4.05)) || (this.ie && (this.major > 4))) 
         this.js = 1.2
    else this.js = 0.0 // HACK: always check for JS version with > or >=

	this.mac = (agt.indexOf("mac")!=-1)
}//end is()

var is;
is = new Is(); 

function checkFlash(){

// set the redirection pages:

	flashpage 	= "/flash1.html"
	upgradepage	= "/nonFlash.html"
	nonflashpage	= "/nonFlash.html"
	cantdetectpage	= "/nonFlash.html"
	unixpage	= "/nonFlash.html"
	macPage = "/isMac.html"
	
	// ----------------------------   NETSCAPE  ----------------------------
 	if (is.mac) 
				window.location = macPage;	
	else

	if (is.nav) {
		if (is.navlessthan4) { 
			window.location = nonflashpage;
		}
	
		if (!is.navlessthan4) {
			var flashinstalled = 0;
			var flashversion = 0;
			//MSDetect = "false";
			if (navigator.plugins && navigator.plugins.length){
				x = navigator.plugins["Shockwave Flash"];
				if (x){
					flashinstalled = 2;
					if (x.description){
						y = x.description;
						flashversion = y.charAt(y.indexOf('.')-1);
						if(flashversion >=4){
							window.location = flashpage;
						}
						else{
							window.location = nonflashpage;
						}	
					}
				}
				else{
					//flashinstalled = 1;
					window.location = nonflashpage;
				}

				if (navigator.plugins["Shockwave Flash 2.0"]){
					flashinstalled = 2;
					flashversion = 2;
					window.location = nonflashpage;
				}
			}
			else if (navigator.mimeTypes && navigator.mimeTypes.length){
				x = navigator.mimeTypes['application/x-shockwave-flash'];
				if (x && x.enabledPlugin){
					flashinstalled = 2;
				}
				else{
					//flashinstalled = 1;
					window.location = nonflashpage;
				}
			}
		}
	}	

	// ----------------------------   IE  ----------------------------
	else if (is.ie) {
		//alert("got ie");
	    if(is.ieBelow4){
			//alert("ie4up failed")
		    window.location = nonflashpage;
        }
        else
			if(!is.mac){
			//alert("is ie >= 4... not mac")
			// detect Active X
			document.write('<SCRIPT LANGUAGE=VBScript\> \n');
			document.write('on error resume next \n');
			document.write('dim Flash4Installed\n');
			document.write('dim Flash5Installed\n');
			document.write('dim PreviousFlashInstalled\n');
			document.write('dim vbflashpage\n');
			document.write('dim vbupgradepage\n');
			document.write('dim vbnonflashpage\n');
			// set redirection pages
			document.write('vbflashpage = "/flash1.html"\n');
			document.write('vbupgradepage = "/nonFlash.html"\n');
			document.write('vbnonflashpage = "/nonFlash.html"\n');
			document.write('Flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
			document.write('Flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
			document.write('if Flash4Installed OR Flash5Installed then\n');
			document.write('window.location = vbflashpage\n');
			document.write('else\n');
			document.write('PreviousFlashInstalled = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash")))\n');
			document.write('if PreviousFlashInstalled then\n');
			document.write('window.location = vbupgradepage\n');
			document.write('else\n');
			document.write('window.location = vbnonflashpage\n');
			document.write('end if\n');
			document.write('end if\n');
			document.write('</SCRIPT\> \n');
		}
		else
			window.location = macPage;
	} 
} // end checkFlash


//*********************************************************************************************************************************
//														Image Scripts

function preload() { //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=preload.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) { //v4.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);
  if(!x && document.getElementById) x=document.getElementById(n); 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);
}
