///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if (document.images) {
	// Button One
	var buttononeoff = new Image();  // Create a variable for the 'off' state of the link 
	buttononeoff.src = "../images/menu_main_05-off.jpg";  // Path to the actual 'off' image
	var buttononeon = new Image();  // Create a variable for the 'on' state of the link
	buttononeon.src = "../images/menu_main_05-on.jpg";  // Path to the actual 'on' image
	var buttononeclick = new Image();  
	buttononeclick.src = "../images/menu_main_05-click.jpg"; 

	//Button Two
	var buttontwooff = new Image();
	buttontwooff.src = "../images/menu_main_06-off.jpg";
	var buttontwoon = new Image();
	buttontwoon.src = "../images/menu_main_06-on.jpg";
	var buttontwoclick = new Image();  
	buttontwoclick.src = "../images/team-click.jpg"; 
	
	// Button Three
	var buttonthreeoff = new Image();
	buttonthreeoff.src = "../images/menu_main_07-off.jpg";
	var buttonthreeon = new Image();
	buttonthreeon.src = "../images/menu_main_07-on.jpg";
	var buttonthreeclick = new Image();
	buttonthreeclick.src = "../images/contact_us-click.jpg";
	
	// Button Four
	var buttonfouroff = new Image();
	buttonfouroff.src = "../images/menu_main_08-off.jpg";
	var buttonfouron = new Image();
	buttonfouron.src = "../images/menu_main_08-on.jpg";
	var buttonfourclick = new Image();  
	buttonfourclick.src = "../images/products-click.jpg"; 

	// Button Five
	var buttonfiveoff = new Image();
	buttonfiveoff.src = "../images/menu_main_09-off.jpg";
	var buttonfiveon = new Image();
	buttonfiveon.src = "../images/menu_main_09-on.jpg";
	var buttonfiveclick = new Image();  
	buttonfiveclick.src = "../images/employment-click.jpg"; 
	
	// Button Six
	var buttonsixoff = new Image();
	buttonsixoff.src = "../images/menu_main_10-off.jpg";
	var buttonsixon = new Image();
	buttonsixon.src = "../images/menu_main_10-on.jpg";
	var buttonsixclick = new Image();  
	buttonsixclick.src = "../images/links-click.jpg"; 
}


var oldClick = "na";
// Creates a function for the 'on' state when the mouse is over the image
function act(imgName) {
	if (document.images && imgName != oldClick)
	document[imgName].src = eval(imgName + 'on.src');	
}

// Creates a function for the 'off' state when the mouse is not over the image
function inact(imgName) {
	if (document.images && imgName != oldClick)
	document[imgName].src = eval(imgName + 'off.src');
} 

function actb(imgName) {
	if (document.images)
	{
		//change the last click back and then proceeds to change the 
		//next click.
		if (oldClick !="na" && imgName != oldClick)
			document[oldClick].src = eval(oldClick + 'off.src');
		
		document[imgName].src = eval(imgName + 'click.src');
		oldClick = imgName;
		
			parent.frames['leftmenu'].document.getElementById("div1").style.display = 'none';	
			parent.frames['leftmenu'].document.getElementById("div2").style.display = 'none';	
			parent.frames['leftmenu'].document.getElementById("div3").style.display = 'none';	
			parent.frames['leftmenu'].document.getElementById("div4").style.display = 'none';	
			parent.frames['leftmenu'].document.getElementById("div5").style.display = 'none';
			
			for (i=1;i<=17;i++)
				parent.frames['leftmenu'].document.getElementById("img" + i).style.visibility = 'hidden';
			
		 	switch(imgName)
			{
				case 'buttonone':
					parent.frames['leftmenu'].document.getElementById("div1").style.display = 'block';	
					a = "../our_company.asp";
					break;
				case 'buttontwo':
					parent.frames['leftmenu'].document.getElementById('tr1').style.display = 'none';
					parent.frames['leftmenu'].document.getElementById("div2").style.display = 'block';	
					parent.frames['leftmenu'].document.getElementById("div3").style.display = 'none';	
					parent.frames['leftmenu'].document.getElementById("div4").style.display = 'block';
					a = "../team_solutions.asp";
					break;
				case 'buttonthree':
					a = "../contact_us.asp";
					break;
				case 'buttonfour':				
						parent.frames['leftmenu'].document.getElementById("img11").style.visibility = 'visible';
						parent.frames['leftmenu'].document.getElementById("div5").style.display = 'block';
						a = "../products/washbay.asp";
						break;
				case 'buttonfive':
					a = "../employment.asp";
					break;			
				case 'buttonsix':
					a = "../links.asp";
					break;							
			}
			
			parent.frames['mainFrame'].location.href = a;
	}
} 



