function load(value) {
	if(value == "#"){
	}else{
		var ranNum = Math.random();
		var textNum = "X" + ranNum;
		var winTitle = "launchWinId" + textNum.substring(4,12) + "X";
		var newWindow = window.open(value, winTitle, "width=700, height=350, resizable, menubar, scrollbars, directories=no, status=no, toolbar=yes, location=no, left=50, top=50");
	}
}
	
function loadExternal(value) {
	message = "The Web site you are about to access is independent from Manpower, and Manpower has no responsibility or liability or control over this Web site, its business, goods, services, or content.  Your use of this Web site and your dealings with the owners or operators of this Web site are at your own risk.  Do you want to proceed?";
	accepted = confirm(message);
	if(accepted){
		if(value == "#"){
		}else{
			var ranNum = Math.random();
			var textNum = "X" + ranNum;
			var winTitle = "launchWinId" + textNum.substring(4,12) + "X";
			var newWindow = window.open(value, winTitle, "width=700, height=350, resizable, menubar, scrollbars, directories=no, status=no, toolbar=yes, location=no, left=50, top=50");
		}
	}
}

function loadRating(value) {
	if(value == "#"){
	}else{
		var ranNum = Math.random();
		var textNum = "X" + ranNum;
		var winTitle = "launchWinId" + textNum.substring(4,12) + "X";
		var newWindow = window.open(value, winTitle, "width=500, height=242,directories=no, status=no, toolbar=no, location=no");
	}
}

// Small description window open routine
function infoWindow(url){
	window.open(url, "descWin", "width=450, height=200, resizable, menubar=no, scrollbars, directories=no, status=no, toolbar=no, location=no, left=50, top=50");
}


//var intranetMenu_ShoppingURL = "/mpnet/marketingcatalog.nsf/webc?OpenView&Count=1000&Login=1";

//top menu navigation tabs

function overMenuTab(imgName,imgName2) {
  active(imgName,imgName2);
}

function outMenuTab(imgName,imgName2) {
  inactive(imgName,imgName2);
}

function active(imgName,imgName2) {
  if (document.images)
    document.images[imgName].src = eval(imgName + "_on.src");
    document.images[imgName2].src = eval(imgName2 + "_on.src");
}

function inactive(imgName,imgName2) {
  if (document.images)
    document.images[imgName].src = eval(imgName + "_off.src");
    document.images[imgName2].src = eval(imgName2 + "_off.src");
}
//var selectedImg = "selected";

left0_off = new Image();
left0_off.src = "img/tab_lft7.gif";
left0_on = new Image();
left0_on.src = "img/tab_lft7_selected.gif";

right0_off = new Image();
right0_off.src = "img/tab_rt7.gif";
right0_on = new Image();
right0_on.src = "img/tab_rt7_selected.gif";

left1_off = new Image();
left1_off.src = "img/tab_lft7.gif";
left1_on = new Image();
left1_on.src = "img/tab_lft7_selected.gif";

right1_off = new Image();
right1_off.src = "img/tab_rt7.gif";
right1_on = new Image();
right1_on.src = "img/tab_rt7_selected.gif";

left2_off = new Image();
left2_off.src = "img/tab_lft7.gif";
left2_on = new Image();
left2_on.src = "img/tab_lft7_selected.gif";

right2_off = new Image();
right2_off.src = "img/tab_rt7.gif";
right2_on = new Image();
right2_on.src = "img/tab_rt7_selected.gif";

left3_off = new Image();
left3_off.src = "img/tab_lft7.gif";
left3_on = new Image();
left3_on.src = "img/tab_lft7_selected.gif";

right3_off = new Image();
right3_off.src = "img/tab_rt7.gif";
right3_on = new Image();
right3_on.src = "img/tab_rt7_selected.gif";

left4_off = new Image();
left4_off.src = "img/tab_lft7.gif";
left4_on = new Image();
left4_on.src = "img/tab_lft7_selected.gif";

right4_off = new Image();
right4_off.src = "img/tab_rt7.gif";
right4_on = new Image();
right4_on.src = "img/tab_rt7_selected.gif";

left5_off = new Image();
left5_off.src = "img/tab_lft7.gif";
left5_on = new Image();
left5_on.src = "img/tab_lft7_selected.gif";

right5_off = new Image();
right5_off.src = "img/tab_rt7.gif";
right5_on = new Image();
right5_on.src = "img/tab_rt7_selected.gif";

left6_off = new Image();
left6_off.src = "img/tab_lft7.gif";
left6_on = new Image();
left6_on.src = "img/tab_lft7_selected.gif";

right6_off = new Image();
right6_off.src = "img/tab_rt7.gif";
right6_on = new Image();
right6_on.src = "img/tab_rt7_selected.gif";

function tabover(theSpan,selected,tabcount)
{ 
	var spanId = theSpan.id;
	
	if(selected ==1)
	{ 
		theSpan.style.backgroundColor = 'white';
		theSpan.getElementsByTagName( 'a' )[0].style.color = '#7EA190';
		
	} else { 
	
		theSpan.style.backgroundColor = 'white';
		theSpan.getElementsByTagName( 'a' )[0].style.color = '#7EA190';	
		
	}	
}
  	
//top menu navigation tabs
function tabout(theSpan,selected)
{ 
	var spanId = theSpan.id;
	
	if(selected ==1)
	{	
		theSpan.style.backgroundColor = 'white';
		theSpan.getElementsByTagName( 'a' )[0].style.color = '#7EA190';		
		
	} else {
	 
		theSpan.style.backgroundColor = '#7EA190';
		theSpan.getElementsByTagName( 'a' )[0].style.color = '#ffffff';	
	}
}

//left navigation menu
//These are called from MenuOperations.java where the dynamic menus are created
//styles for the left nav menu are also defined in .css file
function navBar( tableCellRef, hoverFlag, navStyle, selected ) { 
		
	if ( hoverFlag ) { 
		switch ( navStyle ) {  
			case 1:
				//during hover level 1
				tableCellRef.style.backgroundColor = '#878684';
				tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#ffffff';
				break;			
				//}	
			case 2:
				//during hover level 2	
				tableCellRef.style.backgroundColor = '#ffffff';
				tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#878684';
				break;			
				//}								
			case 3:
				//during hover level 3
				tableCellRef.style.backgroundColor = '#ffffff';
				tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#7EA190';
				break;
			default:
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#878684';
				}
		}
//used if menu item(s) is/are currently selected		
	} else if(selected == "Selected") { 
			//after hover off 
			switch ( navStyle ) {
				case 1:
					//after hover off level 1
					tableCellRef.style.backgroundColor = '#878684';
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#ffffff';
					break;			
				case 2:
					//after hover off level 2
					tableCellRef.style.backgroundColor = '#ffffff';
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#878684';
					break;
				case 3:
					//after hover off level 3
					tableCellRef.style.backgroundColor = '#7EA190';
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#ffffff';
					break;
				default:
					//???
					if ( document.getElementsByTagName ) {
						tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#878684';
					}
				}
				
		} else { 
		//after hover off 
		switch ( navStyle ) {
			case 1:
				//after hover off level 1
				tableCellRef.style.backgroundColor = '#7EA190';
				tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#ffffff';
				break;			
				//}				
			case 2:
				//after hover off level 2				
				tableCellRef.style.backgroundColor = '#B9B9B9';
				tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#ffffff';
				break;
				//}	
			case 3:
				//after hover off level 3
				tableCellRef.style.backgroundColor = 'ffffff';
				tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#878684';
				break;
			default:
				//???
				if ( document.getElementsByTagName ) {
					tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#878684';
				}
			}
		}
}

function navBarClick( tableCellRef, navStyle, url ) {
	navBar( tableCellRef, 0, navStyle );
	goTo( url );
}

function navBarClickExternal( tableCellRef, navStyle, url ) {
	navBar( tableCellRef, 0, navStyle );
	loadExternal( url );
}

function navBarClickNewWindow( tableCellRef, navStyle, url ) {
	navBar( tableCellRef, 0, navStyle );
	load( url );
}

function goTo( url ) {
	window.location.href = url;
}

function searchIntranet()
{
	var sForm = document.searchForm;
	var type = sForm.sType.options[sForm.sType.selectedIndex].value;
	var strSearchString = sForm.q.value;
	
	if (strSearchString == ""){
		alert("Please enter search text.");
		return false;
	}
	

}

// ADDED BY EARL FOR TABS
	function tabbedOver(theTable, selected) {
			theTable.className = 'activeTab';
			theTable.getElementsByTagName('td')[1].className = 'activeMiddle';
			theTable.getElementsByTagName('td')[3].className = 'activeBottomCell';
			theTable.getElementsByTagName('a')[0].className= 'tabLinkActive';	
	}
	
	function tabbedOut(theTable, active) {
	
		if(active == 0) // false
		{ 
			theTable.className = 'inactiveTab';
			theTable.getElementsByTagName('td')[1].className = 'inactiveMiddle';
			theTable.getElementsByTagName('td')[3].className = 'inactiveBottomCell';
			theTable.getElementsByTagName('a')[0].className= 'tabLink';
		} else {
			theTable.className = 'activeTab';
			theTable.getElementsByTagName('td')[1].className = 'activeMiddle';
			theTable.getElementsByTagName('td')[3].className = 'activeBottomCell';
			theTable.getElementsByTagName('a')[0].className= 'tabLinkActive';
		}
		
	}


