/*****************************************************
	Description:		This is the javascript page

	Date:				Tuesday, July 2, 2002

	Author:			Reed Stough
	
	Changes:		7/9/2002 - RS - Added loadImages() function.

*****************************************************/
//Task 1 - Preload images

		loadImages();

//Task 2 - declare variables

	var actualWidth;
	var newWidth;
	
function setWindow(){  //Function sets window parameters onload and onresize

	//Task 1 - determine browser type
	
			if (navigator.appName == "Netscape"){
					actualWidth = window.innerWidth;
			}
			else if (navigator.appName == "Microsoft Internet Explorer"){
					actualWidth = document.body.clientWidth;
			}
	//Task 2 - compute new width
			newWidth = ((actualWidth - 800)/2);
				
	//Task 3 - set window settings
	
			document.getElementById("leftPane").setAttribute("width", newWidth);
			document.getElementById("rightPane").setAttribute("width", newWidth);
			document.getElementById("pageHead").style.display = "block";
}
function changeMenu(objName, objAction){  //Function handles the menu bar background color changes.
	
	switch (objAction){
	
		case "Over":
			document.getElementById(objName).style.backgroundColor = "#808080";
			document.getElementById(objName).style.cursor = "hand";
			break;
			
		case "Out":
			document.getElementById(objName).style.backgroundColor = "#a0a2ce";
			break;
	
	
	}

}
function loadImages(){ //Function handles the pre load of images onto the site.
	
		imgSideBar = new Image();
		imgSideBar.src = "images/side_bar.jpg";
		
		imgProfileBar = new Image();
		imgProfileBar.src = "images/right_profile_bar.jpg";
		
		imgPress = new Image();
		imgPress.src = "images/press_release.jpg";
		
		imgPress2 = new Image();
		imgPress.src = "images/press_release_banner2.jpg";
		
		imgSolutions = new Image();
		imgSolutions.src = "images/solutions.jpg";

}
function goLink(objAd){ //Function that handles the advertisment links

		switch (objAd){
		
			case "ad1":
				document.getElementById("fraDetails").setAttribute("src", "press/press.aspx");
				break;
				
			case "ad2":
				document.getElementById("fraDetails").setAttribute("src", "press/weather_maker.aspx");
				break;
				
			case "ad3":
				document.getElementById("fraDetails").setAttribute("src", "registration/download.aspx");
				break;
			
			case "ad4":
				document.getElementById("fraDetails").setAttribute("src", "press/weather_maker.aspx");
				break;
		
		}


}
function goPage(objNum){//Function that sends users to the various navbar links

	switch (objNum){
		case 1:  //Press Navbar
			document.getElementById("fraDetails").setAttribute("src", "press/press.aspx");
			break;
		case 2:    //Projects Navbar
			document.getElementById("fraDetails").setAttribute("src", "projects/projects.aspx");
			break;
		//case 3: //Partners Navbar
		//	document.getElementById("fraDetails").setAttribute("src", "partners/partners.aspx");
		//	break;
		case 4:   //About Navbar
			document.getElementById("fraDetails").setAttribute("src", "about/aboutus.aspx");
			break;
	}


}
function openWindow(objName){
	window.open("http://www.cbcaz.com");

}
