/*function newColor(color){
	var prodImage = document.images["prod_agenda_img"];
	var prodThumbImage = document.images["prod_bound_img"];

	if (document.forms["addToBasketFront"]) {
		if (document.forms["addToBasketFront"].selectOptions)
			document.forms["addToBasketFront"].selectOptions.value = color;	
	}
		
	// alert('in newColor function');
	if (document.productInfo) {
		if (document.productInfo.color) {
			document.productInfo.color.value = escape(color);
		}
	}
	
	if (prodImage) 
	{
	// alert('vestImage, vestCollectionURL = '+vestCollectionURL);
		prodImage.src = "img/"  +  escape(color) + "_agenda_l.jpg";    
		if (prodThumbImage) 
		{
			prodThumbImage.src = "img/"  + escape(color) + '_bound_l.jpg';   	

		}
	}
	
	// Internet Explorer 4 or above
	if ((document.all) && document.all.color_label) {
		// alert('in ie4 or above');
		document.all.color_label.innerHTML = color;
		document.all.color_label.className = color + "_label";
		} // end if document.all is recognized
	else {
		if (document.getElementById("color_label")) {
			// Netscape 6 & IE5, access the text's ID, then use the property innerHTML
			document.getElementById("color_label").innerHTML = color;
			document.getElementById("color_label").className = color + "_label";
			} // end if getElementById is recognized
	
		}
	/*if (color == "azure" || color == "blush")
		document.getElementById("outofstocknote").style.display = "block";
	else document.getElementById("outofstocknote").style.display = "none";
	return;
}
*/ 

function clickedColor(anObj, optid, iter) {
	var color = anObj;
	if (optid == undefined) optid = "";
	if (iter == undefined) iter = "";
	var colorlist = ["fuchsia","lime","chocolate","spring-green","royal-blue","true-purple","tangerine","amethyst","tickled-pink","caribbean-sea","sterling-silver","mochaccino","karina-brown","raja-chocolate","aqua","rose","sage","crimson","storm-gray","hot-pink","bright-blue","pink-stripe","lattice-blue","dots-and-diamonds","preppy-stripes","fun-floral","mint","azure","indigo","blush","fuchsia","lilac",
						"lime","black-satin","red-satin","chocolate-satin","black","red","chocolate","espresso","leopard","marine","sapphire",
						"platinum","copper","brown","caramel","sky-blue","buttercream","sage-green","cream","ivory",
						"raspberry","grass","wave","wine","deep-ocean","pink-rose","champagne","cherry","cherry-blossom","ocean","butter",
						"emboss-gold","emboss-silver","emboss-clear","font-print","font-script","paisley-brown","vineyard-pink",
						"iris-blue","rose-pink","blue-croc","pink-croc"];
	if ((document.all) && document.all[anObj + optid + iter]) {
		// alert('in ie4 or above');
		for (var i = 0; i < colorlist.length; i++) {
			if (anObj != colorlist[i] && document.all[colorlist[i] + optid + iter])
				document.all[colorlist[i] + optid + iter].style.visibility = "hidden";
		}
		document.all[anObj + optid + iter].style.visibility = 'visible';
	} else if (document.getElementById(anObj + optid + iter)) {
		// Netscape 6 & IE5, access the text's ID, then use the property innerHTML
		// alert('getElementById');
		for (var i = 0; i < colorlist.length; i++) {
			if (anObj != colorlist[i] && document.getElementById(colorlist[i] + optid + iter))
				document.getElementById(colorlist[i] + optid + iter).style.visibility = "hidden";
		}
		document.getElementById(anObj + optid + iter).style.visibility = 'visible';
	} // end if getElementById is recognized	
	
	if ( document.getElementById('pink-donation') ) {
		if ( anObj == 'fuchsia' ) {
			// alert('make it visible');
			document.getElementById('pink-donation').style.visibility = 'visible';
		}
		else {
			// alert('make it invisible');
			document.getElementById('pink-donation').style.visibility = 'hidden';
		}
	}
	
	// Internet Explorer 4 or above
	if ((document.all) && document.all["color_label" + optid + iter]) {
		document.all["color_label" + optid + iter].innerHTML = color;
		document.all["color_label" + optid + iter].className = color + "_label";
		} // end if document.all is recognized
	else {
		if (document.getElementById("color_label" + optid + iter)) {
			document.getElementById("color_label" + optid + iter).innerHTML = color;
			document.getElementById("color_label" + optid + iter).className = color + "_label";
		}  // end if getElementById is recognized	
	}
	document.forms["addToBasket"]["selectOptions" + optid + iter].value = color;	
	// alert(anObj);
}

function prodOptionImage(imageFile) {	
	var prodPageImage = document.images["prodpage_img"];	
	if (prodPageImage) 	
		prodPageImage.src = "nr/store/images/product/"  +  imageFile;
		//if (selectStyle == "azure" || selectStyle == "blush")
			//document.getElementById("outofstocknote").style.display = "block";
		//else document.getElementById("outofstocknote").style.display = "none";
}

// popup window code
function momAgendaPopup(var1, var2, var3) {
	var myString;
	myString = "toolbar=no,location=no,directories=no,status=no,scrollbars=yes,width=" + var2 + ", height=" + var3 + ",resizable=no"
	window.open(var1,'sitewindow',myString);
}


/*
function prodColorAgenda(styleChoiceField) {
	var selectStyle = styleChoiceField.options[styleChoiceField.options.selectedIndex].value
	var prodPageAgendaImage = document.images["prodpage_agenda_img"];
	
	if (prodPageAgendaImage) 
	{
	// alert('vestImage, vestCollectionURL = '+vestCollectionURL);
		prodPageAgendaImage.src = "img/"  +  escape(selectStyle) + "_agenda_l.jpg";
		if (selectStyle == "azure" || selectStyle == "blush")
			document.getElementById("outofstocknote").style.display = "block";
		else document.getElementById("outofstocknote").style.display = "none";
	}
	return;
}

function prodColorBound(styleChoiceField) {
	var selectStyle = styleChoiceField.options[styleChoiceField.options.selectedIndex].value
	var prodPageBoundImage = document.images["prodpage_bound_img"];
	
	if (prodPageBoundImage) 
	{
	// alert('vestImage, vestCollectionURL = '+vestCollectionURL);
		prodPageBoundImage.src = "img/"  +  escape(selectStyle) + "_bound_l.jpg";    
	}
return;
}*/