
var xpos
var elem
var movement

document.getElementById("goleft").onmouseover = function() {

	moveRight()

}

document.getElementById("goleft").onmouseout = function() {

	clearTimeout(movement)

}



document.getElementById("goright").onmouseover = function() {

	moveLeft()

}

document.getElementById("goright").onmouseout = function() {

	clearTimeout(movement)

}


categoryText()





function moveLeft()	{


	if (!document.getElementById) return false;

	if (!document.getElementById("menuSlide")) return false;

	elem = document.getElementById("menuSlide")

	xpos = parseInt(elem.style.left)



	if (xpos >= -570) {

		xpos = (xpos - 8)

	}

	elem.style.left = xpos + "px"

	movement = setTimeout("moveLeft()", 15)


}



function moveRight()	{


	if (!document.getElementById) return false;

	if (!document.getElementById("menuSlide")) return false;

	elem = document.getElementById("menuSlide")

	xpos = parseInt(elem.style.left)

	//alert(xpos)
	if (xpos < 0) {

		xpos = (xpos + 8)

	}

	elem.style.left = xpos + "px"

	movement = setTimeout("moveRight()", 15)


}






function categoryText() {

	if(!document.getElementsByTagName) return false;
	if(!document.getElementById) return false;
	if (!document.getElementById("menuSlide")) return false;

var productCategories = document.getElementById("menuSlide")
var productCategoryLinks = productCategories.getElementsByTagName("a");


for(i = 0; i < productCategoryLinks.length; i++) {

			productCategoryLinks[i].onmouseover = function() {

						      fadeImage(this)
				return showCategoryText(this)

			}


			productCategoryLinks[i].onmouseout = function() {

					       restoreImage(this)
				return hideCategoryText(this)

			}



		}
}


function showCategoryText(textLink)	{

	var textToDisplay = textLink.getAttribute("title");
	//var textToDisplay = textLink.getAttribute("prodRef")
	document.getElementById("productCategoryText").firstChild.nodeValue = textToDisplay;

}



function hideCategoryText(textLink) {


	document.getElementById("productCategoryText").firstChild.nodeValue = ""


}


function fadeImage(thisImage)	{


			thisImage.style.opacity = "0.6";
			thisImage.style.filter = "alpha(opacity = 60)";

}


function restoreImage(thisImage)	{


			thisImage.style.opacity = "1";
			thisImage.style.filter = "alpha(opacity = 100)";

} 