<!--

// The syntax for using these functions in an HTML document are as follows:
//
// <a href="#" onMouseOver="imgOn('img2')" onMouseOut="imgOff('img2')">
// <img src="file.gif" name="img2" width="60" height="60" border="0"></a>

var loaded=0;


//set an array for the to turn on the appropriate nav button				
var webSections = new Array();
		
webSections[0] = "store";  //pet_foods
webSections[1] = "store/dog_treats.php"; //dog_treats
webSections[2] = "spec_offers"; // cat litter
webSections[3] = "about_us";
webSections[4] = "contact_us";

var currentPage = '';

// loop through the section array to identify the subscript of the section we're in                
for (i=0; i < webSections.length; i++) {
                
	if ((webSections[i] == section) || (section=="pet_foods") || (section=="dog_treats") || (section=="spec_offers")) {
	i++;
		if (section=="pet_foods") {
			currentPage = "img1";
		} else if (section=="dog_treats") {
			currentPage = "img2";
		} else if (section=="spec_offers") {
			currentPage = "img3";
		} else {
			currentPage = "img" + i;
		}
	}
}

var subSections = new Array();
		
subSections[5] = "faq";
subSections[6] = "locator";
subSections[7] = "prod_search";
subSections[8] = "your_acct";

var currentSub = '';

// loop through the section array to identify the subscript of the section we're in                
for (x=5; x < (subSections.length); x++) {
                
	if (subSections[x] == sub) {
		x++;
		currentSub = "img" + x;
			
	}
}

if ((is_nav3up) || (is_ie4up)) br = "good";

else br = "bad";


if (br == "good") {
			img1on = new Image(); img1on.src = "/images/nav_pet_foods_on.gif";
	        img1off = new Image(); img1off.src = "/images/nav_pet_foods_off.gif";
			img2on = new Image(); img2on.src = "/images/nav_dog_treats_on.gif";
	        img2off = new Image(); img2off.src = "/images/nav_dog_treats_off.gif";
			img3on = new Image(); img3on.src = "/images/nav_spec_offers_on.gif";
	        img3off = new Image(); img3off.src = "/images/nav_spec_offers_off.gif";
			img4on = new Image(); img4on.src = "/images/nav_about_us_on.gif";
	        img4off = new Image(); img4off.src = "/images/nav_about_us_off.gif";  
	        img5on = new Image(); img5on.src = "/images/nav_contact_us_on.gif";
	        img5off = new Image(); img5off.src = "/images/nav_contact_us_off.gif";
	       
	        img6on = new Image(); img6on.src = "/images/vnav_faq_on.gif";
	        img6off = new Image(); img6off.src = "/images/vnav_faq_off.gif";
			img7on = new Image(); img7on.src = "/images/vnav_locator_on.gif";
	        img7off = new Image(); img7off.src = "/images/vnav_locator_off.gif";  
	        img8on = new Image(); img8on.src = "/images/vnav_prod_search_on.gif";
	        img8off = new Image(); img8off.src = "/images/vnav_prod_search_off.gif";
			img9on = new Image(); img9on.src = "/images/vnav_your_acct_on.gif";
	        img9off = new Image(); img9off.src = "/images/vnav_your_acct_off.gif";
}



function imgOn(imgName) {
        if (br == "good") {
                document[imgName].src = eval(imgName + "on.src");
                //document.hold.src = eval(imgName + "hold.src");
                
                //window.status = eval(imgName + "copy");
       			
       }

}

function imgOff(imgName) {
        if (br == "good") {
                
                if ((imgName == currentPage) || (imgName == currentSub)) {
                	document[imgName].src = eval(imgName + "on.src");
	            } else { 
	            	document[imgName].src = eval(imgName + "off.src");
	            }
  				     
        
        }

}
var isMinNS4 = document.layers
var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1
var dom=document.getElementById&&!ie&&navigator.userAgent.indexOf("Opera")==-1

//-----------------------------------------------------------------------------
// Layer visibility.
//-----------------------------------------------------------------------------

//if (dom) { alert('DOM'); }

function hideLayer(layer) {
	
  if (isMinNS4) {
  
    document.layers[layer].visibility = "hide";
  
	}
	  
  if (ie||dom) {
  
  	elm = document.getElementById(layer);
	elm.style.visibility = "hidden";
	}
}

function showLayer(layer) {
	//alert('showLayer' + layer);
	beginHide();
	

  if (isMinNS4) {
  	//alert('showLayer' + layer);
    document.layers[layer].visibility = "show";
    
    }
    
  if (ie||dom) {
  
	elm = document.getElementById(layer);
	elm.style.visibility = "visible";
	}

}

function beginHide() {

		var allMenuLayers = Array('layer1','layer2','layer3','layer4','layer5','layer6','layer7','layer8','layer9','layer10','layer11','layer12');
//alert('YO');
		for (var i=0; i<allMenuLayers.length; i++) {
			
			
			
			if (isMinNS4) {
				//alert('ON');
				document.layers[allMenuLayers[i]].visibility="hide";
				//alert('ON');
			} 
			
			if (ie||dom) {
			
			elm = document.getElementById(allMenuLayers[i]);
			elm.style.visibility = "hidden";
			}
		
		}
	}



//	custMER, random subnav function
subnav_text_array = new Array();
subnav_text_array[0] = '<b>Did You Know?</b><br>Merrick Donates a bag of dog food to every adopted dog at the Humane Society of Amarillo Texas.';
subnav_text_array[1] = '<b>"The more people I meet the more I like my dog."</b><br>- Unknown';
subnav_text_array[2] = '<b>Did You Know?</b><br>The first living creature to orbit the Earth was a dog. "Laika" was aboard the Soviet Union\'s Sputnik II November 3rd, 1957.';
subnav_text_array[3] = '<b>"What counts is not necessarily the size of the dog in the fight, it\'s the size of the fight in the dog."</b><br>- Dwight D. Eisenhower';
subnav_text_array[4] = '<b>Did You Know?</b><br>All of Merrick\'s Rawhide is made in America with real Texas Beef Hide.';
subnav_text_array[5] = '<b>"Whoever said you can\'t buy happiness forgot little puppies."</b><br>- Gene Hill';
subnav_text_array[6] = '<b>"When you feel dog tired at night, it may be because you growled all day long."</b><br>- Unknown';
subnav_text_array[7] = '<b>"Whoever said you can\'t buy happiness forgot little puppies."</b><br>- Gene Hill';
subnav_text_array[8] = '<b>"Did you ever walk into a room and forget why you walked in? I think that is how dogs spend their lives."</b><br>- Sue Murphy';
subnav_text_array[9] = '<b>"The dog wags his tail, not for you, but for your bread."</b><br>- Portuguese Proverb';
subnav_text_array[10] = '<b>"Some days you\'re the dog, some days you\'re the hydrant."</b><br>- Unknown';
subnav_text_array[11] = '<b>"Dogs are getting bigger, according to a leading dog manufacturer."</b><br>- Leo Rosten';
subnav_text_array[12] = '<b>"Every dog must have its day."</b><br>- Jonathan Swift';
subnav_text_array[13] = '<b>"To err is human to forgive, canine."</b><br>- Unknown';
subnav_text_array[14] = '<b>"To his dog, every man is king; hence the constant popularity of dogs."</b><br>- Aldus Huxley';
subnav_text_array[15] = '<b>"Things that upset a Terrier may pass virtually unnoticed by a Great Dane."</b><br>- Smiley Blaxton';
subnav_text_array[16] = '<b>"Scratch a dog and you\'ll find a permanent job."</b><br>- Franklin P. Jones';
subnav_text_array[17] = '<b>"Children and dogs are as necessary to the welfare of the country as Wall Street and the railroads."</b><br>- Harry S. Truman';
subnav_text_array[18] = '<b>"If you wish a dog to follow you, feed him."</b><br>- Unknown';
subnav_text_array[19] = '<b>"When old dogs bark, it\'s time to watch out."</b><br>- Unknown';
subnav_text_array[20] = '<b>"The nose of the bulldog has been slanted backwards so that he can breathe without letting go."</b><br>- Winston Churchill';
subnav_text_array[21] = '<b>"A dog is the only thing on earth that love you more than you love yourself."</b><br>- Unknown';
subnav_text_array[22] = '<b>"No man can be condemned for owning a dog. As long as he has a dog, he has a friend; and the poorer he gets, the better friend he has."</b><br>- Will Rogers';
subnav_text_array[23] = '<b>"I wonder if other dogs think poodles are members of a weird religious cult."</b><br>- Rita Rudner';
subnav_text_array[24] = '<b>Did You Know?</b><br>Rin Tin Tin was the nation\'s first dog movie star. He first appeared on the silver screen in 1925.';
subnav_text_array[25] = '<b>Did You Know?</b><br>President Washington had 36 dogs on his estate in Mount Vernon. He is also known as the founding breeder of the American Foxhound.';
subnav_text_array[26] = '<b>Did You Know?</b><br>That the first story written about Lassie was in 1938, but it wasn\'t until 1954, when the t.v. show first was released.';
subnav_text_array[27] = '<b>Did You Know?</b><br>FDR\'s dog "Winks" sneaked into the White House cafeteria and ate 18 plates of bacon & eggs.';
subnav_text_array[28] = '<b>Did You Know?</b><br>The world\'s oldest dog lived to be 29 years old and was an Australian Cattle dog named Blueu.';
function ShowSubNavText() {
	return subnav_text_array[ Math.floor( Math.random() * subnav_text_array.length ) ];
}
//-->
