function openPDF(fileName)
{
	// open the PDF file in a new window
	window.open(fileName,'PDF_Document','height=600,width=750,toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,copyhistory=no');
}

function openIntLink(url)
{
	// open the url in a new window
	window.open(url,'Internal_Link','height=600,width=750,toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,copyhistory=no');
}

function openExtLink(url)
{
	// open the url in a new window
	window.open(url,'External_Link','height=600,width=750,toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,copyhistory=no');
}

function openVid(url1, clip1, url2, clip2)
{
	// open the video window
	if (url2 != null && url2 != ""){
	//	var link = "vidPopUp.asp?videoName1="+ url1 +"&videoLinkText1="+ clip1 +"&videoName2="+ url2 +"&videoLinkText2="+ clip2
	//	window.open(link,'Video_Select','height=200,width=200,toolbar=0,location=1,status=0,menubar=0,scrollbars=no,resizable=no');
		window.open(eval("'vidPopUp.asp?videoName1="+ url1 +"&videoLinkText1="+ clip1 +"&videoName2="+ url2 +"&videoLinkText2="+ clip2 +"'"),'Video_Select','height=200,width=200,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,copyhistory=no');
	}else{
		window.open(eval("'vidPopUp.asp?videoName1="+ url1 +"&videoLinkText1="+ clip1 +"'"),'Video_Select','height=200,width=200,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,copyhistory=no');
	}
}

	
//__MES-------------------------------------------------------------------------------
//function will open a new window with the glossary
//		
//------------------------------------------------------------------------------------
function OpenWin(whatPage, pageName) {
	

	var bName = navigator.appName

	//if the user has IE else user has NN
	if (bName.indexOf('Netscape') == -1) {
		width=675;
		height=300;
	}else{
		width=675;
		height=300;
	}
							
  leftPos = (screen.width - width) / 2;
  topPos = (screen.height - height) / 2;
	
	params = "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0,"
    + "resizable=1," + "scrollbars=1," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0,"
		+ "screenx=" + leftPos + ","  //Netscape 4
    + "screeny=" + topPos + ","  //********
	  + "left=" + leftPos + ","     //MSIE 4
    + "top=" + topPos;           //***

					    
	var newPage = window.open(whatPage,pageName,params);
	newPage.focus();
}

function OpenWin2(whatPage, pageName, width, height) {
	
  leftPos = (screen.width - width) / 2;
  topPos = (screen.height - height) / 2;
	
	params = "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0,"
    + "resizable=1," + "scrollbars=1," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0,"
		+ "screenx=" + leftPos + ","  //Netscape 4
    + "screeny=" + topPos + ","  //********
	  + "left=" + leftPos + ","     //MSIE 4
    + "top=" + topPos;           //***

					    
	var newPage = window.open(whatPage,pageName,params);
	newPage.focus();
}


function ChangeSections(iMain,iSub,sURL) {
	//##FP--ChangeSections (MJK) 3/25/03
	//INPUT:		iMain: the index of the main section
	//					iSub: the index of the sub button in the given main section
	//					sURL: the URL to which to navigate
	//				NOTE: the URL might be a '' because all that has to happen is the NavBar needs to be updated
	//this is used when a hyperlink points to a different section; the nav bar needs to be updated...
	if (sURL.length > 0) document.location.href = sURL;
	
	if (top.frames[1].bLoaded == true) {
		if (iMain > 0) {
			if (top.frames[1]) {
				top.frames[1].ShowSubMenu(iMain);
				if (top.frames[1].oSub) top.frames[1].oSub[iMain].Actv(iSub);
			}
		}
		else {
			top.frames[1].ResetAll();
		}
	}
}

//###################################################################################################
//The following is code originally on LeftNav.asp and copied here so other pages could make use of it
//###################################################################################################

		//test for browser type
		function BrowserType() {
			//##FP--BrowserType (MJK) 3/14/03
			this.ver=navigator.appVersion
			this.agent=navigator.userAgent
			this.dom=document.getElementById?1:0
			this.opera5=this.agent.indexOf("Opera 5")>-1
			this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
			this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
			this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
			this.ie=this.ie4||this.ie5||this.ie6
			this.mac=this.agent.indexOf("Mac")>-1
			this.ns6=(this.dom && parseInt(this.ver) >= 5)?1:0; 
			this.ns4=(document.layers && !this.dom)?1:0;
			this.brwsr=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
			return this
		}

		//menu item object constructor
		function MenuItem(oDiv,sParent) {
			//##FP--MenuItem (MJK) 3/14/03
			//this creates an menu item object, stores properties and exposes methods
			sParent = (!sParent)?"":'document.'+sParent+'.';
			//element reference:
			//	ie=document.all[Top0]; ns4=Nav.document.Top0; else=document.getElementById(Top0)
			this.er = brwsr.ie4?document.all[oDiv]:brwsr.ns4?eval(sParent+'document.'+oDiv):document.getElementById(oDiv);
			//style reference:
			//	ns4=Nav.document.Top0.x; else=document.all[oDiv].style.x
			this.sr = brwsr.ns4?this.er:this.er.style;
			//element in document reference
			this.ref= brwsr.ns4?this.er.document:document;		
			//height
			this.h = (brwsr.ie||brwsr.ns6)?this.er.offsetHeight:brwsr.ns4?this.ref.height:brwsr.opera5?this.sr.pixelHeight:0;
			//position from left
			this.x = (brwsr.ns4||brwsr.opera5)?this.sr.left:this.er.offsetLeft;
			//position from top
			this.y = (brwsr.ns4||brwsr.opera5)?this.sr.top:this.er.offsetTop;
			//whether div is visible
			this.visib = bVisible;
			//3 methods to show, hide and move the div
			this.ShowIt = fShowIt;
			this.HideIt = fHideIt;
			this.MoveIt = fMoveIt;
			
			//images
			this.MsOvr = fMsOvr;
			this.Dflt = fDflt;
			this.Actv = fActv;
		}

		function bVisible() {if (!(this.sr.visibility == 'hidden' || this.sr.visibility == 'HIDDEN' || this.sr.visibility == 'hide')) return true;}
		function fShowIt() {this.sr.visibility = 'visible';}
		function fHideIt() {this.sr.visibility = 'hidden';}
		function fMoveIt(x,y) {this.x = x; this.y = y; this.sr.left = x; this.sr.top = y;}
		function fMsOvr(iIndex) {
			this.ref['Img'+iIndex].src = FImg[iIndex].src;
		}
		function fDflt(iIndex) {
			this.ref['Img'+iIndex].src = DImg[iIndex].src;
		}
		function fActv(iIndex) {
			if (AImg[iIndex]) {
				this.ref['Img'+iIndex].src = AImg[iIndex].src;
			}
		}
		

		function Initialize(iButtonCount,bMoveButtons) {
			//#FP--Initialize (MJK) 3/14/03
			// runs on load to create the objects
			var i=0;
			//here, if we don't use 'var' first, these become global variables...
			oButton = new Array();

			if (brwsr.brwsr) {
				//create the objects
				for (i=1;i<=iButtonCount;i++) {
					oButton[i] = new MenuItem('Button'+i,'');
					oButton[i].ShowIt();
				}
				if (bMoveButtons) {
					//move the objects
					for (i=2;i<=iButtonCount;i++) {
						oButton[i].MoveIt(oButton[1].x,oButton[i-1].y + oButton[i-1].h);

					}
				}
			}
		}

		function CreateImageArray(iStartingIndex,sImageNames,sExtensions) {
			//##FP--CreateImageArray (MJK) 3/19/03
			//loops through all image names and assigns array elemenets to the A, D and F arrays
			//INPUT:		index to start counting at; csv list of the image names; csv list of the extension to use
			//					the last arg required because for some buttons there is an active state, and for some not, 
			//					so we just use the flyover state for the active.
			var arrNames,arrExtensions
			var i;
			var sRoot = "images/";
			
			arrNames = sImageNames.split(',');
			arrExtensions = sExtensions.split(',');

			for (i=iStartingIndex;i<=(iStartingIndex+arrNames.length);i++) {
				DImg[i] = new Image();
				DImg[i].src = sRoot + arrNames[i-iStartingIndex] + "_btn_d.gif";
				FImg[i] = new Image();
				FImg[i].src = sRoot + arrNames[i-iStartingIndex] + "_btn_f.gif";
				AImg[i] = new Image();
				AImg[i].src = sRoot + arrNames[i-iStartingIndex] + "_btn_" + arrExtensions[i-iStartingIndex] + ".gif";
			}
		}
