
function showDescSimple(button, show, relImage) {
	var buttonName = button.id.toString()
	var id = getLastNums(buttonName)
	var box = document.getElementById("rolloverbox" + id)
	
	if (show) {
		box.style.backgroundImage = "none"
		box.innerHTML = ""
		box.innerHTML = blurbs[id]
	} else {
		box.style.backgroundImage = "url(images/redesign/" + relImage + id + ".gif)"
		box.innerHTML = ""
	}
}

function showDescComplex(button, show, relImage) {
	var buttonName = button.id.toString()
	var id = getLastNums(buttonName)
	var box = document.getElementById("rolloverbox" + id)
	var src
	
	if (show) {
		box.style.backgroundImage = "none"
		box.innerHTML = blurbs[id]
	} else {
		indexName = relImage.substring(relImage.lastIndexOf("/") + 1)
		indexName += id + ".gif"
		src = swapImages[indexName].src
		box.style.backgroundImage = "url(" + src + ")"
		box.innerHTML = ""
	}
}

function getLastNums(str){
	// ADDED 11/4/03 to compensate for double-digit product type ids!
	// - Chris
	
	// loop through string in reverse
	var newStr = "";
	var theChar = "";
	
	for(var i=str.length-1; i>=0; i--){
		theChar = str.charAt(i);
		
		if(!isNaN(theChar)){
			// rebuilt filo instead of lifo until isNAN = 1
			newStr = theChar + newStr;
		}else{
			return newStr;
		}
	}
	
	return newStr;
}

try {
	if(swapImages) {
		showDesc = showDescComplex
	} 
} catch (e) {
	showDesc = showDescSimple
}