// List images here to preload
counter = 0;
preload = new Array;
preload[counter++] = "/images/menu_about_hover.gif";
preload[counter++] = "/images/menu_approach_hover.gif";
preload[counter++] = "/images/menu_solutions_hover.gif";
preload[counter++] = "/images/menu_leadership_hover.gif";
preload[counter++] = "/images/menu_career_hover.gif";
preload[counter++] = "/images/menu_contact_hover.gif";

for(var a=0; a<preload.length; a++) {
    temp = new Image;
    temp.src = preload[a];
}

///////////////////////////////////////////////////////////////////////////////////

function swapImage(which, instate) {
    if(document.images) {
        which = eval("document."+which);
        directory = "/images/"
        preName = "menu_";
        instate == "on" ? state="_hover" : state="";
		
		//Need to check if this image represents the current section
		//	so that we don't lose the sectional highlighting
		
		
		if (instate == "sel") {
			state="_sel"
		}
		if (instate == "on") {
			state="_hover"
		}
		if (instate == "off") {
			state=""
		}
		
        postName = ".gif";
        which.src = directory+preName+which.name+state+postName; 
    }
}

///////////////////////////////////////////////////////////////////////////////////

function openDir(dirLink)   {
        var myWin = window.open(dirLink,"newWindow","scroll=yes,status=yes,width=725,height=490,scrollbars=yes,resizable");
	}	

///////////////////////////////////////////////////////////////////////////////////	
	
function openTour(dirLink)   {
        var tourWindow = window.open(dirLink,"tourWindow","scroll=no,status=no,width=600,height=450,scrollbars=no,resizable=no");
	}
	
////////////////////////////////////////////////////////////////////////////////////////////////////////
//  Function: Page_Submit() 
// Arguments: none
//   Returns: Page Submission
// Objective: Each page has a Validate_Page function within it, if that returns true, the page is 
//                        submitted
////////////////////////////////////////////////////////////////////////////////////////////////////////        
function Page_Submit(){
        if (Validate_Page()){
                document.forms[0].submit();
        }
}

///////////////////////////////////////////////////////////////////////////////////	

function launch(newURL, newName, newFeatures) {
  	var remote = open(newURL, newName, newFeatures);
  	if (remote.opener == null)
    		remote.opener = window;
  		return remote;
}  

///////////////////////////////////////////////////////////////////////////////////	

function TEPLDSPopup() {
 var url='/TEPLDS_preview_08.asp';
 launch(url,
                    "TEPLDSPopup",
                    "height=700,width=950,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=1,status=0,titlebar=0,toolbar=0,scrollbars=1,z-lock=0");
} 