/*

This JavaScript code developed by Creative Element.
	http://www.creativelement.com/, send email to webmaster@creativelement.com
All images, content, and code on this site are copyright 1995 - 2009 by Creative Element.
	All rights reserved.  Any unauthorized duplication of images or content is strictly prohibited.
	(http://www.creativelement.com/).

*/

if (navigator.userAgent.indexOf ("Mozilla") != -1) {
  nav3plus = parseInt(navigator.appVersion.substring(0,1)) >= 3;
}

function hilight(imgID,imgNew) {
 if (nav3plus) {
  document.images[imgID].src = eval(imgNew + ".src");
 }
}

function takemethere() {
  return true;
}


// preload button images:
if (nav3plus) {
 button0 = new Image(107,29);
 button0.src = "pictures/addtocart.gif";
 button1 = new Image(107,29);
 button1.src = "pictures/addtocartp.gif";

 button2 = new Image(107,29);
 button2.src = "pictures/add-to-registry.gif";
 button3 = new Image(107,29);
 button3.src = "pictures/add-to-registryp.gif";

 button4 = new Image(107,29);
 button4.src = "pictures/buy-this-item.gif";
 button5 = new Image(107,29);
 button5.src = "pictures/buy-this-itemp.gif";

 button4g = new Image(107,29);
 button4g.src = "pictures/buy-this-itemg.gif";
 button5g = new Image(107,29);
 button5g.src = "pictures/buy-this-itempg.gif";
}


function resizeHotlist() {

	var allowableWidth = document.body.offsetWidth - 180;

	var numCells = document.getElementById("hotTable").getElementsByTagName('tr')[0].getElementsByTagName('td').length;

	var totalWidth = 0;

	for (i=1; i<=numCells; i=i+1) {
		thisCell = document.getElementById("hot" + i);
		totalWidth = totalWidth + thisCell.offsetWidth;

		if ((totalWidth > allowableWidth) && (i > 3)) {
			thisCell.style.display = 'none';
		} else {
			thisCell.style.display = '';
		}
	}

}
