function imagePop(URL)
{
	window.open(URL,'','toolbar=0,scrollbars=1,location=0,status=0,menubar=0,resizable=1,width=630,height=720');
}		
	
function imgClick(target)
{
	var oSrcImage = xx_getElementById('img' + target); // the thumb that was clicked
	var oImg = xx_getElementById('imgShot');		   // the "big" image							
	var oLink;
					
	// kludge to get NS4 to give me the first link in the page with a blank target
	if (isNS4)
	{
		for (j=0;j<document.links.length;j++)
		{
			if (document.links[j].target=='_blank')
				oLink = document.links[j];											
		}					
	}
	else
		oLink = xx_getElementById('lnkShot');		   // the "href"
								
	writeContent('lblCaption',oSrcImage.alt);		
	oImg.src = '/images/products/' + target + '.300.jpg';									
	oLink.href = '/images/products/' + target + '.600.jpg';
}
		
function variantClick(id)
{				
	var szURL = window.location.href;
	//var szURL = szURL.substring(0,(szURL.lastIndexOf('/')+1));
	szURL = szURL.substring(0,(szURL.lastIndexOf('store/')+6));
	szURL = szURL + id + '.2.htm#ordering';
	window.location.href = szURL;
}

function updatePrice(oSrc)
{																			
	var total = 0;
	var stotal = 0;
	var i = 0;
	var oForm = xx_getElementById('frmMain');				
	var oElement,arrItem,price,sprice,prodid;							
																																									
	for (i=0;i<oForm.elements.length;i++)
	{					
		if (oForm.elements[i].type.indexOf('radio')==0)
		{						
			oElement = oForm.elements[i];
			
			if (oElement.checked==true)
			{
				arrItem = oElement.value.split(':');												
				price = parseInt(arrItem[1]);
				sprice= parseInt(arrItem[2]);													
				
				if (price>0) {
					total = total + price;		// Current price
					stotal = stotal + sprice;	// Original price
				}
			}
		}					
		else
		{
			// handle select
		}
	}			
	
	var oPrice = xx_getElementById('txtPrice');		// Current price (including sale) upper text box
	var oPrice2 = xx_getElementById('txtPrice2');	// Current price (including sale) lower text box
	var oQty = xx_getElementById('txtQty');			// Upper Quantity box
	var oQty2 = xx_getElementById('txtQty2');		// Lower Quantity box
	var oSPrice = xx_getElementById('txtSPrice');		// Original MSRP price
	var oSPrice2 = xx_getElementById('txtSPrice2');	// Original MSRP price
					
	if (1==1) // ((oPrice!=null) && (oPrice2!=null) && (oQty!=null) && (oQty2!=null))
	{	
		if ((oSrc==oQty)||(oSrc==oQty2))
		{
			var qty = parseInt(oSrc.value);
			if (qty==0) qty = 1;
		
			// set prices
			oPrice.value = formatCurrency(total * qty); oPrice2.value = oPrice.value;
			if (oSPrice != null) {
				oSPrice.value = formatCurrency(stotal * qty); oSPrice2.value = oSPrice.value;
			}
		
			// set qty values
			oQty.value = oSrc.value; oQty2.value = oSrc.value;										
		}
		else
		{
			var qty = parseInt(oQty.value);
			if (qty==0) qty = 1;						
			oPrice.value = formatCurrency(total * qty); oPrice2.value = oPrice.value;
			if (oSPrice != null) {
				oSPrice.value = formatCurrency(stotal * qty); oSPrice2.value = oSPrice.value;
			}
		}
	}				
}