function goToRelatedItem(selectTag) {
	var pageURL = document.sessionurl + '&page01=category&category01=';
	var selectValue = selectTag.options[selectTag.selectedIndex].value;
	parent.location = pageURL + selectValue;
}

function hideRelatedGoBtns() {
	//Create an array 
	var buttonClassName = "ItemRelatedItemsBtn"
	var allInputTags = new Array(); 
	var allInputTags=document.getElementsByTagName("input");
	//Cycle through the tags using a for loop
	for (i=0; i<allInputTags.length; i++) {
		//Pick out the tags with our class name
		if (allInputTags[i].className==buttonClassName) {
			allInputTags[i].style.display="none";
		}
	}
}

var isPosting = false;

function checkBuyNow() {
	//Go through all the buy now button combo boxes on this page checking if any have a selection other than 0.
	var count = 1;
	var haveItemsToAdd = false;
	var buynumCombo = document.submit["buynum" + count];

	while (buynumCombo != null) {
		if (buynumCombo.value != "") {
			haveItemsToAdd = true;
			break;
		}
		buynumCombo = document.submit["buynum" + count];
		count = count + 1;
	}
	if (haveItemsToAdd == true) {
		if (isPosting == false && event.ctrlKey == false) {
			event.returnValue = "Your selections will be lost unless you add these items to your shopping cart.";
		}
	}
}
