// ## jellyBean.js
// 	Swaps out the appropriate jellybean (preview image) for all current vehicles on the main homepage when the user rolls their mouse over the model name. 

// FUNCTION LIST:
// 	beanOn();
// 	beanOff();

// TEMPLATE(S) USED:
// 	main.html

// Sets the path and creates the timeout variable.
var jBeanPath = "images/";
var beanTimeout;

// Displays the appropriate jellybean.
function beanOn(imageName) {
	var theImage;
	if (beanTimeout) {clearTimeout(beanTimeout)};
	if (is.ie || is.ns5) theImage = eval("document.jBean");
		else theImage = eval("document.jellyBeanDiv.document.jBean");
	//alert(document.jBean.src);
	theImage.src = jBeanPath + imageName + ".gif";
	jellyBean.show();
}

// Hides the jellybean.
function beanOff() {
	beanTimeout = setTimeout("jellyBean.hide()",165);
}