function switchLang(current, target) {
	url = window.location.href;
	//alert(url);
	//lang = url.substring(url.length, url.length-3);
	lang = url.replace("/" + current, "/" + target);
	//base = url.substring(0, url.length-3);	
	targetURL = "";
	var urlArray = url.split("/");
	for (i = 0; i < urlArray.length; i++) {
		if (urlArray[i] == current) {
			urlArray[i] = target;
		}
		targetURL = targetURL + "/" + urlArray[i];
	}
	targetURL = targetURL.substring(1, targetURL.length);
	self.location = targetURL;
}

function changeImage(name, imageURL) {
	document.getElementById(name).src = imageURL;
}
function changeCat(name) {
	// Clear the existing arrow
	currentImage = "arrow_" + currentCat;
	currentLink = "link_" + currentCat;
	imageName = "arrow_" + name;
	linkName = "link_" + name;
	changeImage(currentImage, "/app/webroot/img/common/spacer.gif");
	changeImage(imageName, "/app/webroot/img/common/red_arrow.gif");
	document.getElementById(currentLink).className = "productCat";
	document.getElementById(linkName).className = "highlightedCat";
	currentCat = name;
}