//di_navigation.js file

if (document.images){
    rollOvers = 1;
} else {
    rollOvers = 0;
}

function cacheNavImg()
{
	if (document.images)
	{
	//home button is Selected, so need both other buttons

	btn_Home = new Image(100,25);
	btn_Home.src = base + "btn_HomeBlk.gif";
	
	btn_HomeHilite = new Image(100,25);
	btn_HomeHilite.src = base + "btn_HomeRed.gif";
	
	btn_HomeSelRed = new Image(100,25);
	btn_HomeSelRed.src = base + "btn_HomeRedSel.gif";
	
	//other buttons load normally as black, so need only red ones
	btn_Services = new Image(100,25);
	btn_Services.src = base + "btn_ServicesRed.gif";
	
	btn_Portfolio = new Image(100,25);
	btn_Portfolio.src = base + "btn_PortfolioRed.gif";
	
	btn_Jobs = new Image(100,25);
	btn_Jobs.src = base + "btn_JobsRed.gif";
	
	btn_ContactUs = new Image(100,25);
	btn_ContactUs.src = base + "btn_ContactUsRed.gif";
	
	btn_SiteMap = new Image(100,25);
	btn_SiteMap.src = base + "btn_SiteMapRed.gif";
	
	//non buttonbar buttons
	btn_startLogo_red = new Image(81,19);
	btn_startLogo_red.src = base + "btn_startLogo_red.gif";
	
	btn_stopLogo_blk = new Image(81,19);
	btn_stopLogo_blk.src = base + "btn_stopLogo_blk.gif";
	
	btn_stopLogo_red = new Image(81,19);
	btn_stopLogo_red.src = base + "btn_stopLogo_red.gif";
	
	anim_logo = new Image(75,19);
	anim_logo.src = "images/DI_anim_logo.gif";	
		
	}//end if	
}

function imageOn(imgName, pgName){ 
	var btnMsg = "Click a button.";
	//alert("Image Name: " + imgName);
		 
	if (imgName == "logoPrompt")
	{	
		if (logoOn == true)
		{
			document[imgName].src = base + "btn_stopLogo_red.gif"
		}
		else 
		{
			document[imgName].src = base + "btn_startLogo_red.gif"
		}
	}
	else
	{
		document[imgName].src = base + "btn_" + imgName + "Red.gif";
	}
	
	if (imgName == pgName)
	{
		document[imgName].src = base + "btn_" + imgName + "RedSel.gif";
	}
	
	
	 if (imgName == "Home") btnMsg = "Click Home to return to the first page of this site.";
	 if (imgName == "Services") btnMsg = "Click Services to learn more about what we do.";
	 if (imgName == "Portfolio") btnMsg = "Click Portfolio to see samples of our work.";
	 if (imgName == "Jobs") btnMsg = "Click Jobs to learn about current employment opportunities.";
	 if (imgName == "ContactUs") btnMsg = "Click Contact Us to send us a message.";
	 if (imgName == "SiteMap") btnMsg = "Click Site Map to see an overview of this site.";
	 if (imgName == "logoPrompt") btnMsg = "Click the logo to animate it or to stop animation.";
	 
	 window.status = btnMsg;
}

function imageOff ( imgName, pgName ){
	// alert("Image Name: " + imgName + ", Section Name: " + sectionName);
	
	if (imgName == "logoPrompt")
	{
		if (logoOn == true){
		document[imgName].src = base + "btn_stopLogo_blk.gif"
		}
		else {
		document[imgName].src = base + "btn_startLogo_blk.gif"
		}
	}
	else 
	{
		document[imgName].src = base + "btn_" + imgName + "Blk.gif";
	}	
	
	if (imgName == pgName) 
	{
		document[imgName].src = base + "btn_" + imgName + "Sel.gif";
	}
	
	if (imgName == sectionName)
	{
		document[imgName].src = base + "btn_" + imgName + "Sel.gif";
	}
	
	btnMsg = ""
	window.status = btnMsg;	
} 

function clickOnLogo() 
{
	if (logoOn == true){
		document["logo"].src = "images/DI_logo_still.gif";
		document["logoPrompt"].src = "images/buttons/btn_startLogo_blk.gif";
		logoOn = false;
	}
	else {
			document["logo"].src = "images/DI_anim_logo.gif";
			document["logoPrompt"].src = "images/buttons/btn_stopLogo_blk.gif";
			logoOn = true;
	}
	//switch logo from stopped static image to animated gif
}