//these functions are used for clearing and restoring the default values of form fields, like the search form in the header of every page.

function clearDefault(el) {
	if (el.defaultValue==el.value) el.value = ""
}
function restoreDefault(el,formwords) {
	if (el.value=="") { el.value = formwords; }
}


//for flyout menus
function IEHoverPseudo() {

	if (document.getElementById("secondary-nav")!= null)
	{
		var navItems = document.getElementById("secondary-nav").getElementsByTagName("li");
	}
	
	if (navItems !=null)
	{
	
		for (var i=0; i<navItems.length; i++) {
				if(navItems[i].className == "menuparent") {
					navItems[i].onmouseover=function() { this.className += " over"; }
					navItems[i].onmouseout=function() { this.className = "menuparent"; }
				}
		
		}
	}

}

window.onload = IEHoverPseudo;



<!--opens and closes clamshell nav on other pages, is used here to prevent javascript errors, not being used as we have changed the include that would call this function--> 
function toggleClamShellMenu(objectID,plusMinus) {
		return;	
	}

//Universal popup
function popupStandard(url, width, height,resize,scrollbar) {

window.open(url,'newPopup','left=0,top=0,width=' + width + ',height=' + height +',toolbar=0,titlebar=0,status=0,menubar=0,location=0,directories=0,resizable=' + resize +',scrollbars=' + scrollbar);

}
	
	
	
//tabs

function turnOffEverything(){

	tab_1_ID=document.getElementById("tab_1");
	if(tab_1_ID){
		tab_1_ID.className="tab";
		
		Tab_1_content_ID=document.getElementById("Tab_1_content");
		Tab_1_content_ID.className="content_not";
	}
		
	tab_2_ID=document.getElementById("tab_2");
	if(tab_2_ID){
		tab_2_ID.className="tab";
		
		Tab_2_content_ID=document.getElementById("Tab_2_content");
		Tab_2_content_ID.className="content_not";
	}
	tab_3_ID=document.getElementById("tab_3");
	if(tab_3_ID){
		tab_3_ID.className="tab";

		Tab_3_content_ID=document.getElementById("Tab_3_content");
		Tab_3_content_ID.className="content_not";
		}
		
	tab_4_ID=document.getElementById("tab_4");
	if(tab_4_ID){
		tab_4_ID.className="tab";
			
		Tab_4_content_ID=document.getElementById("Tab_4_content");
		Tab_4_content_ID.className="content_not";
		}	


	tab_5_ID=document.getElementById("tab_5");
	if(tab_5_ID){
		tab_5_ID.className="tab";
		
		Tab_5_content_ID=document.getElementById("Tab_5_content");
		Tab_5_content_ID.className="content_not";
		}
		
		
		
	tab_6_ID=document.getElementById("tab_6");
	if(tab_6_ID){
		tab_6_ID.className="tab";
		
		Tab_6_content_ID=document.getElementById("Tab_6_content");
		Tab_6_content_ID.className="content_not";
		}
		
	}



function toggleDisplay(theTab,clickedLink) {
		turnOffEverything();
	
		clickedLink_Id=document.getElementById(clickedLink);
		clickedLink_Id.className='tab_current';
		
		theTab_Id=document.getElementById(theTab);
		theTab_Id.className='content_current';
}



function embedFlash (filename, width, height) {
document.write('<object type="application/x-shockwave-flash" data="' + filename + '" width="'+ width +'" height="'+ height +'">');
document.write('<param name="movie" value="' + filename +'" />');
document.write('<param name="wmode" value="transparent" /></object>');
}


function openFlashFile(timeLineURL) {
window.open(timeLineURL,'mywin','left=75,top=50,width=800,height=600,toolbar=0,resizable=0');
}


function openEmailPopUp(url)
{
window.open(url,"homepage",'width=445, height=500, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes')
}
function openNewWindow(url)
{
window.open(url,"homepage",'location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes')
}

function GetInnerSize () {
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	return [x,y];
}


function setWindowSize (w, h, x, y) {
	// make sure we have a final x/y value
	// pick one or the other windows value, not both
	// if (x==undefined) x = window.screenLeft || window.screenX;
	// if (y==undefined) y = window.screenTop || window.screenY;
	if (x==undefined) x = 50;
	if (y==undefined) y = 0;
	// for now, move the window to the top left
	// then resize to the maximum viewable dimension possible
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth,screen.availHeight);
	// now that we have set the browser to it's biggest possible size
	// get the inner dimensions.  the offset is the difference.
	var inner = GetInnerSize();
	w=(w > inner[0]) ? inner[0] : w;
	h=(h > inner[1]) ? inner[1] : h;
	var ox = screen.availWidth-inner[0];
	var oy = screen.availHeight-inner[1];
	// now that we have an offset value, size the browser
	// and position it
	window.resizeTo(w+ox, h+oy);
	window.moveTo(x,y);
}