//<script language=jscript>
//Dreamweaver function that restores a rollover image to its 'off' state
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;
}

//Dreamweaver function that preloads all rollover images that were created in dreamweaver
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];}}
}

//Dreamweaver function that recursively searches all layers & frames of the document for
//an object of a specified name and returns the object if found 
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 openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}


//Dreamweaver function that turns a rollover image 'on' when the mouse points at it
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];}
}

//Creates a popup browser window out of 'PageURL'. The titlebar of the browser is filled with 
//'wName'. 'wOptions' is a string with parameters for the open method of window.
//'width=300, height=400' is an example 'wOptions' string. 
function PopUp(PageURL,wName,wOptions){
window.open(PageURL,wName,wOptions);
}


//Does the same as PupUp but also centers the popup browser vertically and horizontally
function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//Many java scripts are best run just after every item on the web page is finished loading. The onLoad 
//event of the <body> is fired at exactly that moment. In order to run java scripts from *.inc files
//at this right time, the scripts are added as needed to the 'Scripts' object. It just stores the script //as a string with any name. The function RunScripts runs all of the scripts stored in 'Scripts'.
//RunScripts will probably be called in the <body> 'onLoad' event of some webpage.
function RunScripts() {
x= new String();
for (x in Scripts){
	eval(eval("Scripts." + x));
	}
}

//Sets the focus on an input control with passed in name;
function setInputFocus(aName) {
	var oForm
	var oElement
	
	//For(iForms = 0 ; iForms = self.document.forms.length -1 ; iForms++)
	for (oForm in self.document.forms) {
		for (oElement in self.document.forms[oForm]) {
			if (oElement == aName) {
				self.document.forms[oForm].elements[oElement].focus()
			}
		}
	}
}

//The 'Scripts' object stores javascript statements as strings with any chosen name. They are executed
//by the 'RunScripts' function.

Scripts = new Object;

//This custom function spans a new pop up window with a top frame displaying the PBH header, and a bottom frame displaying the page noted in the URL - kraffay - 09/20/04


   function openExternalWindow(theURL) {
     window.open(theURL,'','resizable=1,scrollbars=yes,toolbar=0');
     }


