<!--//
/* TOP NAVIGATION ROLLOVERS */
var topnavNames = ["mealtime", "aboutcats", "mycat", "offers", "purrfectlyfish", "dryfood", "pouchfood", "snacks", "faqs", "testimonials", "purremread", "guides", "chart", "tvad", "signup", "updateprofile", "updatecatinfo", "purremcreate"];
var maxTopnav = topnavNames.length;
var topnavOn = new Array(maxTopnav);
var topnavOff = new Array(maxTopnav);
var topnavPath = "/images/";
var topnavPrefix = "nav_";
var topnavType = ".gif";
var currTopnav = 0;
var currMainnav = 0;

if (document.images){
	for (var i = 0; i < maxTopnav; i++){
		topnavOn[i] = new Image();
		topnavOn[i].src = topnavPath + topnavPrefix + topnavNames[i] + "_over" + topnavType;
		topnavOff[i] = new Image();
		topnavOff[i].src = topnavPath + topnavPrefix + topnavNames[i] + topnavType;
	}
}
	
function light(imgNum){
	if (document.images && (imgNum != 0)){
		document.images["tnav" + imgNum].src = topnavOn[imgNum - 1].src;
	}
}
	
function dim(imgNum){
	if (document.images && (currTopnav != imgNum)){
		document.images["tnav" + imgNum].src = topnavOff[imgNum - 1].src;
	}
}

function lightCurrent(){
	light(currTopnav);
	light(currMainnav);
}

function setCurrent(imgNum){
	if (imgNum != currTopnav){
		var temp = currTopnav;
		currTopnav = imgNum;
		light(currTopnav);
		dim(temp);
	}
}

window.onload = lightCurrent;
//-->


//Cross Browser Object Retrieval
function getObjectByID(objectID){
	if (document.all!=null){
		return document.all[objectID];
	} else if (document.getElementById){
		return document.getElementById(objectID);
	}
}

function toggleDiv(divName){
	var ingredDiv = getObjectByID(divName);
	if (ingredDiv.style.display == "block"){
		ingredDiv.style.display = "none";
	} else {
		ingredDiv.style.display = "block";
	}
}

if (location.href.indexOf("/product_") != -1){
	window.onload = lightCurrentProduct;
} else {
	window.onload = lightCurrent;
}
//-->