

ImageStruct = new Object();
ImageStruct["default"] = "\r\n\t\t\t<div id=\"picture\">\r\n\t\t\t\t<div id=\"mainImageOutline\" style=\"width: 250px; height: 0px;\" onclick=\"javascript:window.open(\'/_largeimage.cfm?image=DesignerPrints2.jpg\',\'popup\',\'width=600,height=600, scrollbars=yes\');\">\r\n\t\t\t\t\t<a href=\"javascript:void(0);\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<img id=\"mainImage\" src=\"/images/product//images/large_DesignerPrints2.jpg\" class=\"imgBorder\" alt=\"Designs & Patterns\" />\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<br />\r\n\t\t\t\t\t<a href=\"javascript:void(0);\"><img id=\"mainImage\" src=\"/images/retail/zoom.gif\" alt=\"Zoom\" /></a>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t</div>\t\t\r\n\t\t\t<div id=\"previews\" style=\"padding-top:270px;\">\r\n\t\t\t\r\n\t\t\t</div>\r\n\t\t\t";


fldValueStruct = new Object();
fldValueStruct["fld1array"] =  new Array();
fldValueStruct["fld1array"][0] = new Object();
fldValueStruct["fld1array"][0]["value"] = 991;
fldValueStruct["fld1array"][0]["text"] = "20.00 X 0.00 X 30.00";
fldValueStruct["fld2array"] =  new Array();
fldValueStruct["fld2array"][0] = new Object();
fldValueStruct["fld2array"][0]["value"] = 1382;
fldValueStruct["fld2array"][0]["text"] = "BABY COLLAGE";
fldValueStruct["fld2array"][1] = new Object();
fldValueStruct["fld2array"][1]["value"] = 798;
fldValueStruct["fld2array"][1]["text"] = "BABY PRINT";
fldValueStruct["fld2array"][2] = new Object();
fldValueStruct["fld2array"][2]["value"] = 799;
fldValueStruct["fld2array"][2]["text"] = "BIRD NEST PATTERN";
fldValueStruct["fld2array"][3] = new Object();
fldValueStruct["fld2array"][3]["value"] = 1452;
fldValueStruct["fld2array"][3]["text"] = "BLACK TOILE";
fldValueStruct["fld2array"][4] = new Object();
fldValueStruct["fld2array"][4]["value"] = 1378;
fldValueStruct["fld2array"][4]["text"] = "BUGS";
fldValueStruct["fld2array"][5] = new Object();
fldValueStruct["fld2array"][5]["value"] = 1389;
fldValueStruct["fld2array"][5]["text"] = "DRAGON FLIES";
fldValueStruct["fld2array"][6] = new Object();
fldValueStruct["fld2array"][6]["value"] = 1390;
fldValueStruct["fld2array"][6]["text"] = "FALLING DOTS";
fldValueStruct["fld2array"][7] = new Object();
fldValueStruct["fld2array"][7]["value"] = 821;
fldValueStruct["fld2array"][7]["text"] = "FESTIVE BALLOONS";
fldValueStruct["fld2array"][8] = new Object();
fldValueStruct["fld2array"][8]["value"] = 1393;
fldValueStruct["fld2array"][8]["text"] = "FRESCO FRUIT";
fldValueStruct["fld2array"][9] = new Object();
fldValueStruct["fld2array"][9]["value"] = 1395;
fldValueStruct["fld2array"][9]["text"] = "GOLD CHERUB";
fldValueStruct["fld2array"][10] = new Object();
fldValueStruct["fld2array"][10]["value"] = 1397;
fldValueStruct["fld2array"][10]["text"] = "GOLD LEAF";
fldValueStruct["fld2array"][11] = new Object();
fldValueStruct["fld2array"][11]["value"] = 1527;
fldValueStruct["fld2array"][11]["text"] = "GREEN GINGHAM";
fldValueStruct["fld2array"][12] = new Object();
fldValueStruct["fld2array"][12]["value"] = 1585;
fldValueStruct["fld2array"][12]["text"] = "HARVEST LEAVES";
fldValueStruct["fld2array"][13] = new Object();
fldValueStruct["fld2array"][13]["value"] = 1405;
fldValueStruct["fld2array"][13]["text"] = "LEOPARD";
fldValueStruct["fld2array"][14] = new Object();
fldValueStruct["fld2array"][14]["value"] = 1468;
fldValueStruct["fld2array"][14]["text"] = "LILAC LEAVES";
fldValueStruct["fld2array"][15] = new Object();
fldValueStruct["fld2array"][15]["value"] = 1475;
fldValueStruct["fld2array"][15]["text"] = "NEOPOLITAN STRIPE";
fldValueStruct["fld2array"][16] = new Object();
fldValueStruct["fld2array"][16]["value"] = 1476;
fldValueStruct["fld2array"][16]["text"] = "NOEL GEMSTONES";
fldValueStruct["fld2array"][17] = new Object();
fldValueStruct["fld2array"][17]["value"] = 1477;
fldValueStruct["fld2array"][17]["text"] = "PAISLEY SCROLL";
fldValueStruct["fld2array"][18] = new Object();
fldValueStruct["fld2array"][18]["value"] = 1478;
fldValueStruct["fld2array"][18]["text"] = "PARTY STREAMERS";
fldValueStruct["fld2array"][19] = new Object();
fldValueStruct["fld2array"][19]["value"] = 1482;
fldValueStruct["fld2array"][19]["text"] = "PERIDOT GEMSTONES";
fldValueStruct["fld2array"][20] = new Object();
fldValueStruct["fld2array"][20]["value"] = 1485;
fldValueStruct["fld2array"][20]["text"] = "PRESENTS";
fldValueStruct["fld2array"][21] = new Object();
fldValueStruct["fld2array"][21]["value"] = 1487;
fldValueStruct["fld2array"][21]["text"] = "PUPPY PAWS";
fldValueStruct["fld2array"][22] = new Object();
fldValueStruct["fld2array"][22]["value"] = 1528;
fldValueStruct["fld2array"][22]["text"] = "RED GINGHAM";
fldValueStruct["fld2array"][23] = new Object();
fldValueStruct["fld2array"][23]["value"] = 1491;
fldValueStruct["fld2array"][23]["text"] = "SILVER/GOLD CELEBRATION";
fldValueStruct["fld2array"][24] = new Object();
fldValueStruct["fld2array"][24]["value"] = 1411;
fldValueStruct["fld2array"][24]["text"] = "SORBET DOTS";
fldValueStruct["fld2array"][25] = new Object();
fldValueStruct["fld2array"][25]["value"] = 1494;
fldValueStruct["fld2array"][25]["text"] = "SPECKLED CELERY";
fldValueStruct["fld2array"][26] = new Object();
fldValueStruct["fld2array"][26]["value"] = 1495;
fldValueStruct["fld2array"][26]["text"] = "SPECKLED HOLIDAY";
fldValueStruct["fld2array"][27] = new Object();
fldValueStruct["fld2array"][27]["value"] = 1497;
fldValueStruct["fld2array"][27]["text"] = "SPECKLED WHITE";
fldValueStruct["fld2array"][28] = new Object();
fldValueStruct["fld2array"][28]["value"] = 797;
fldValueStruct["fld2array"][28]["text"] = "TISSUE PATTERN";


AvailableProducts = new Object();
AvailableProducts["1452_991"] = 14310;
AvailableProducts["1476_991"] = 14423;
AvailableProducts["991_1477"] = 14429;
AvailableProducts["991_1485"] = 14442;
AvailableProducts["991_1395"] = 14369;
AvailableProducts["991_1478"] = 14431;
AvailableProducts["991_1475"] = 14428;
AvailableProducts["991_1389"] = 14352;
AvailableProducts["991_1476"] = 14423;
AvailableProducts["991_1397"] = 14371;
AvailableProducts["1397_991"] = 14371;
AvailableProducts["991_1487"] = 14444;
AvailableProducts["1494_991"] = 14459;
AvailableProducts["1382_991"] = 15343;
AvailableProducts["1528_991"] = 14448;
AvailableProducts["991_1393"] = 14361;
AvailableProducts["991_1495"] = 14460;
AvailableProducts["821_991"] = 14365;
AvailableProducts["991_1482"] = 14435;
AvailableProducts["1487_991"] = 14444;
AvailableProducts["1395_991"] = 14369;
AvailableProducts["1585_991"] = 14404;
AvailableProducts["991_1528"] = 14448;
AvailableProducts["991_1494"] = 14459;
AvailableProducts["991_1585"] = 14404;
AvailableProducts["991_798"] = 14307;
AvailableProducts["1527_991"] = 14378;
AvailableProducts["1495_991"] = 14460;
AvailableProducts["1482_991"] = 14435;
AvailableProducts["1478_991"] = 14431;
AvailableProducts["1390_991"] = 14355;
AvailableProducts["991_1382"] = 15343;
AvailableProducts["991_1390"] = 14355;
AvailableProducts["991_1468"] = 14407;
AvailableProducts["991_1378"] = 14315;
AvailableProducts["991_1452"] = 14310;
AvailableProducts["991_1527"] = 14378;
AvailableProducts["1497_991"] = 14462;
AvailableProducts["991_1405"] = 14405;
AvailableProducts["991_1411"] = 14457;
AvailableProducts["1485_991"] = 14442;
AvailableProducts["991_821"] = 14365;
AvailableProducts["1491_991"] = 14453;
AvailableProducts["1378_991"] = 14315;
AvailableProducts["1389_991"] = 14352;
AvailableProducts["1405_991"] = 14405;
AvailableProducts["1393_991"] = 14361;
AvailableProducts["1411_991"] = 14457;
AvailableProducts["797_991"] = 14495;
AvailableProducts["991_1497"] = 14462;
AvailableProducts["991_797"] = 14495;
AvailableProducts["799_991"] = 14308;
AvailableProducts["991_799"] = 14308;
AvailableProducts["798_991"] = 14307;
AvailableProducts["1477_991"] = 14429;
AvailableProducts["1468_991"] = 14407;
AvailableProducts["1475_991"] = 14428;
AvailableProducts["991_1491"] = 14453;


AttributeArray = new Object();
AttributeArray["1478"] = new Object();
AttributeArray["1478"]["value"] = 1478;
AttributeArray["1478"]["text"] = "PARTY STREAMERS";
AttributeArray["1478"]["prod_id"] = "14431";
AttributeArray["1478"]["allowed"] = "991";
AttributeArray["1482"] = new Object();
AttributeArray["1482"]["value"] = 1482;
AttributeArray["1482"]["text"] = "PERIDOT GEMSTONES";
AttributeArray["1482"]["prod_id"] = "14435";
AttributeArray["1482"]["allowed"] = "991";
AttributeArray["798"] = new Object();
AttributeArray["798"]["value"] = 798;
AttributeArray["798"]["text"] = "BABY PRINT";
AttributeArray["798"]["prod_id"] = "14307";
AttributeArray["798"]["allowed"] = "991";
AttributeArray["1485"] = new Object();
AttributeArray["1485"]["value"] = 1485;
AttributeArray["1485"]["text"] = "PRESENTS";
AttributeArray["1485"]["prod_id"] = "14442";
AttributeArray["1485"]["allowed"] = "991";
AttributeArray["1494"] = new Object();
AttributeArray["1494"]["value"] = 1494;
AttributeArray["1494"]["text"] = "SPECKLED CELERY";
AttributeArray["1494"]["prod_id"] = "14459";
AttributeArray["1494"]["allowed"] = "991";
AttributeArray["1487"] = new Object();
AttributeArray["1487"]["value"] = 1487;
AttributeArray["1487"]["text"] = "PUPPY PAWS";
AttributeArray["1487"]["prod_id"] = "14444";
AttributeArray["1487"]["allowed"] = "991";
AttributeArray["797"] = new Object();
AttributeArray["797"]["value"] = 797;
AttributeArray["797"]["text"] = "TISSUE PATTERN";
AttributeArray["797"]["prod_id"] = "14495";
AttributeArray["797"]["allowed"] = "991";
AttributeArray["1395"] = new Object();
AttributeArray["1395"]["value"] = 1395;
AttributeArray["1395"]["text"] = "GOLD CHERUB";
AttributeArray["1395"]["prod_id"] = "14369";
AttributeArray["1395"]["allowed"] = "991";
AttributeArray["1476"] = new Object();
AttributeArray["1476"]["value"] = 1476;
AttributeArray["1476"]["text"] = "NOEL GEMSTONES";
AttributeArray["1476"]["prod_id"] = "14423";
AttributeArray["1476"]["allowed"] = "991";
AttributeArray["1477"] = new Object();
AttributeArray["1477"]["value"] = 1477;
AttributeArray["1477"]["text"] = "PAISLEY SCROLL";
AttributeArray["1477"]["prod_id"] = "14429";
AttributeArray["1477"]["allowed"] = "991";
AttributeArray["1452"] = new Object();
AttributeArray["1452"]["value"] = 1452;
AttributeArray["1452"]["text"] = "BLACK TOILE";
AttributeArray["1452"]["prod_id"] = "14310";
AttributeArray["1452"]["allowed"] = "991";
AttributeArray["1397"] = new Object();
AttributeArray["1397"]["value"] = 1397;
AttributeArray["1397"]["text"] = "GOLD LEAF";
AttributeArray["1397"]["prod_id"] = "14371";
AttributeArray["1397"]["allowed"] = "991";
AttributeArray["1390"] = new Object();
AttributeArray["1390"]["value"] = 1390;
AttributeArray["1390"]["text"] = "FALLING DOTS";
AttributeArray["1390"]["prod_id"] = "14355";
AttributeArray["1390"]["allowed"] = "991";
AttributeArray["1475"] = new Object();
AttributeArray["1475"]["value"] = 1475;
AttributeArray["1475"]["text"] = "NEOPOLITAN STRIPE";
AttributeArray["1475"]["prod_id"] = "14428";
AttributeArray["1475"]["allowed"] = "991";
AttributeArray["1393"] = new Object();
AttributeArray["1393"]["value"] = 1393;
AttributeArray["1393"]["text"] = "FRESCO FRUIT";
AttributeArray["1393"]["prod_id"] = "14361";
AttributeArray["1393"]["allowed"] = "991";
AttributeArray["1382"] = new Object();
AttributeArray["1382"]["value"] = 1382;
AttributeArray["1382"]["text"] = "BABY COLLAGE";
AttributeArray["1382"]["prod_id"] = "15343";
AttributeArray["1382"]["allowed"] = "991";
AttributeArray["991"] = new Object();
AttributeArray["991"]["value"] = 991;
AttributeArray["991"]["text"] = "20.00 X 0.00 X 30.00";
AttributeArray["991"]["prod_id"] = "14495,14307,14308,14365,14315,15343,14351,14352,14355,14361,14369,14371,14405,14457,14310,14407,14428,14423,14429,14431,14435,14442,14444,14453,14459,14460,14462,14378,14448,14404";
AttributeArray["991"]["allowed"] = "797,798,799,821,1378,1382,1389,1389,1390,1393,1395,1397,1405,1411,1452,1468,1475,1476,1477,1478,1482,1485,1487,1491,1494,1495,1497,1527,1528,1585";
AttributeArray["821"] = new Object();
AttributeArray["821"]["value"] = 821;
AttributeArray["821"]["text"] = "FESTIVE BALLOONS";
AttributeArray["821"]["prod_id"] = "14365";
AttributeArray["821"]["allowed"] = "991";
AttributeArray["1528"] = new Object();
AttributeArray["1528"]["value"] = 1528;
AttributeArray["1528"]["text"] = "RED GINGHAM";
AttributeArray["1528"]["prod_id"] = "14448";
AttributeArray["1528"]["allowed"] = "991";
AttributeArray["1468"] = new Object();
AttributeArray["1468"]["value"] = 1468;
AttributeArray["1468"]["text"] = "LILAC LEAVES";
AttributeArray["1468"]["prod_id"] = "14407";
AttributeArray["1468"]["allowed"] = "991";
AttributeArray["1405"] = new Object();
AttributeArray["1405"]["value"] = 1405;
AttributeArray["1405"]["text"] = "LEOPARD";
AttributeArray["1405"]["prod_id"] = "14405";
AttributeArray["1405"]["allowed"] = "991";
AttributeArray["799"] = new Object();
AttributeArray["799"]["value"] = 799;
AttributeArray["799"]["text"] = "BIRD NEST PATTERN";
AttributeArray["799"]["prod_id"] = "14308";
AttributeArray["799"]["allowed"] = "991";
AttributeArray["1527"] = new Object();
AttributeArray["1527"]["value"] = 1527;
AttributeArray["1527"]["text"] = "GREEN GINGHAM";
AttributeArray["1527"]["prod_id"] = "14378";
AttributeArray["1527"]["allowed"] = "991";
AttributeArray["1378"] = new Object();
AttributeArray["1378"]["value"] = 1378;
AttributeArray["1378"]["text"] = "BUGS";
AttributeArray["1378"]["prod_id"] = "14315";
AttributeArray["1378"]["allowed"] = "991";
AttributeArray["1497"] = new Object();
AttributeArray["1497"]["value"] = 1497;
AttributeArray["1497"]["text"] = "SPECKLED WHITE";
AttributeArray["1497"]["prod_id"] = "14462";
AttributeArray["1497"]["allowed"] = "991";
AttributeArray["1411"] = new Object();
AttributeArray["1411"]["value"] = 1411;
AttributeArray["1411"]["text"] = "SORBET DOTS";
AttributeArray["1411"]["prod_id"] = "14457";
AttributeArray["1411"]["allowed"] = "991";
AttributeArray["1495"] = new Object();
AttributeArray["1495"]["value"] = 1495;
AttributeArray["1495"]["text"] = "SPECKLED HOLIDAY";
AttributeArray["1495"]["prod_id"] = "14460";
AttributeArray["1495"]["allowed"] = "991";
AttributeArray["1389"] = new Object();
AttributeArray["1389"]["value"] = 1389;
AttributeArray["1389"]["text"] = "DRAGON FLIES";
AttributeArray["1389"]["prod_id"] = "14351,14352";
AttributeArray["1389"]["allowed"] = "991,991";
AttributeArray["1491"] = new Object();
AttributeArray["1491"]["value"] = 1491;
AttributeArray["1491"]["text"] = "SILVER/GOLD CELEBRATION";
AttributeArray["1491"]["prod_id"] = "14453";
AttributeArray["1491"]["allowed"] = "991";
AttributeArray["1585"] = new Object();
AttributeArray["1585"]["value"] = 1585;
AttributeArray["1585"]["text"] = "HARVEST LEAVES";
AttributeArray["1585"]["prod_id"] = "14404";
AttributeArray["1585"]["allowed"] = "991";


function filterAttribute(attrID,fldID,srcFld){
	var fld = document.getElementById('attributeID_'+fldID);
	attrID = srcFld.options[srcFld.selectedIndex].value;
	var valueCount = 1;
	var noValueCount = 0;
	if (attrID > 0) {
		var allowedValueList = AttributeArray[attrID]['allowed'];
		var prod_id = AttributeArray[attrID]['prod_id'];
		var allowedValueArray = allowedValueList.split(',');
		var notAllowedValueArray = new Array();
		//alert(attrID);
		//alert(allowedValueList);
	
		//alert(fld.selectedIndex)
		
		var selectedValue = '';
		var removed = false;
		if (fld.selectedIndex > 0){
			selectedValue = fld.options[fld.selectedIndex].value;
		}
		if (fld.options.length > 1) {
			removed = true;
			for(var i=fld.options.length-1;i>=1;i--){
				fld.remove(i);
			}
			
			//fldArray = eval('fld'+fldID+'Array');
			fldArray = fldValueStruct['fld'+fldID+'array']
			for(var i=0; i< fldArray.length; i++){
		
				var  currentValue = fldArray[i]['value'];
			
				for (var j = 0; j < allowedValueArray.length; j++){
					var allowedValue = allowedValueArray[j];
					//alert(currentValue+ ' - ' + allowedValue)
					if (currentValue == allowedValue || attrID == 0){
						fld.options[valueCount] = new Option(fldArray[i]['text'], fldArray[i]['value'], false, false);
						if (selectedValue == currentValue)
							fld.options[valueCount].selected = true;
							
						valueCount = valueCount + 1;
					}
					else {
						
						notAllowedValueArray[noValueCount] = currentValue;
						noValueCount = noValueCount + 1;
					}
		
				}
			}
		}
		
		for(var i=0; i< notAllowedValueArray.length; i++){
			var divID = document.getElementById('img'+notAllowedValueArray[i])
			if (divID!= null) { 
				divID.innerHTML = '<img src="/images/retail/inActive.png">';
			}
		}
		
		for(var i=0; i< allowedValueArray.length; i++){
			var divID = document.getElementById('img'+allowedValueArray[i])
			if (divID!= null) { 
				divID.innerHTML = '';
			}
		}
	}
	else {
		var selectedValue = '';
		var removed = false;
		if (fld.selectedIndex > 0){
			selectedValue = fld.options[fld.selectedIndex].value;
		}
		
		if (fld.options.length > 1) {
			removed = true;
			for(var i=fld.options.length-1;i>=1;i--){
				fld.remove(i);
			}
					
			fldArray = fldValueStruct['fld'+fldID+'array']
			//alert(fldArray.length);
			for(var i=0; i< fldArray.length; i++){
				fld.options[i+1] = new Option(fldArray[i]['text'], fldArray[i]['value'], false, false);
				if (selectedValue == currentValue)
					fld.options[i+1].selected = true;
					
				var divID = document.getElementById('img'+fldArray[i]['value']);
				if (divID!= null) { 
					divID.innerHTML = '';
				}
				
			}
		}
	}
	
	if (!removed || (fld.selectedIndex > 0 && srcFld.selectedIndex > 0 )){
		value = fld.options[fld.selectedIndex].value;
		attrID = srcFld.options[srcFld.selectedIndex].value;
		key = value+'_'+attrID;
		//alert(key);
		//alert(AvailableProducts[key]);
		getProductPrice('/index.cfm?event=shop.dspProductPrice&prod_id='+AvailableProducts[key]);
	}
	else {
		if (fld.selectedIndex == 0 && srcFld.selectedIndex == 0 )
			Spry.Utils.setInnerHTML('imageText',ImageStruct['default']);

		Spry.Utils.setInnerHTML('productPrice', '');
	}
	//alert(fldArray)
	//alert('fld'+fldID+'Array');

	//fld.options[boxLength] = new Option(Text, Value, false, false);
	
	/*for (var j = 0; j < fld.length; j++) {
		if (fld.options[j].value == attrID){
			
		}
	}
	alert(AttributeArray[attrID]['allowed']);*/
}
function selectColor(id,imgText,imgBorder){
	//alert(id);
	var imgTagText = document.getElementById(imgText).innerHTML;
	var imgBorderDiv = document.getElementById(imgBorder);
	
	if (imgTagText.indexOf('<img') >=0 )
		alert('Not available');
	else {
		//alert(imgBorderDiv.style.border);
		//imgBorderDiv.style.border = '5px'
		var fld = document.getElementById('attributeID_2');
		for(i=fld.options.length-1;i>=1;i--){
		if (fld.options[i].value == id)
			fld.options[i].selected = true;
		}
	
		filterAttribute(id,1,fld);
	}
}

	function doAdd(){
		Spry.Utils.setInnerHTML('updateResponseDiv', 'Processing.....');
		return Spry.Utils.submitForm(document.forms['frmProductDetail'], updateResponseDiv);
	}

	function doCheckStatus(sc_que_id){
		document.forms['frmCartStatus'].sc_que_id.value = sc_que_id;
		return Spry.Utils.submitForm(document.forms['frmCartStatus'], updateResponseDiv);
	}
	function updateResponseDivTest(req){
		Spry.Utils.setInnerHTML('updateResponseDiv', req.xhRequest.responseText);
	}
	
	function updateResponseDiv(req){

		var responseXML = Spry.XML.documentToObject(req.xhRequest.responseXML);
		if (responseXML.ShopCart) {
			var sc_que_id = responseXML.ShopCart['sc_que_id']._value();
			var sc_que_status_id = responseXML.ShopCart['sc_que_status_id']._value();
			var sc_que_message = responseXML.ShopCart['sc_que_message']._value();
		}
		if (sc_que_status_id == 3) { // Product added to shopping cart
			
			sc_que_message = '<h3>'+sc_que_message + '</h3>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/index.cfm?event=cart.dspView"><img src="/images/retail/cart.gif" />&nbsp;View Cart</a>';
			
			var sc_sub_total = responseXML.ShopCart['sc_sub_total']._value();

			if (document.getElementById('cartTotal') != null)
				Spry.Utils.setInnerHTML('cartTotal', '$'+sc_sub_total);

			Spry.Utils.setInnerHTML('updateResponseDiv', sc_que_message);
		}
		else if (sc_que_status_id == 1) // In Que
			doCheckStatus(sc_que_id);
		else if (sc_que_status_id == 5 ) {// Unable to add to shopping cart
			sc_que_message = '<h3> out of stock </h3>';
			Spry.Utils.setInnerHTML('updateResponseDiv', sc_que_message);
		}
	}
	
	function getProductPrice(url){
		Spry.Utils.setInnerHTML('productPrice', 'Loading...');
		Spry.Utils.setInnerHTML('updateResponseDiv', '');
		var req = Spry.Utils.loadURL("GET", url, true, processDispPriceResult);
	}
	
	function processDispPriceResult(req){
		var responseXML = Spry.XML.documentToObject(req.xhRequest.responseXML);
		
		var priceText = responseXML.product['price']._value();
		var imageText = responseXML.product['image']._value();
		//alert(responseXML);
		Spry.Utils.setInnerHTML('productPrice', priceText);
		Spry.Utils.setInnerHTML('imageText', imageText);
	}

	
	function fadeIt(ele,url){
		Spry.Utils.setInnerHTML(ele, 'Loading...');
		Spry.Utils.setInnerHTML('productPrice', '');
		Spry.Utils.setInnerHTML('updateResponseDiv', '');
		//FilterData();
		Spry.Utils.updateContent(ele,url);
	}
	
	var keyArray = new Array();
	
	
	//var fld1 = document.getElementById('attributeID_1');
	var attrFld1 = eval(document.forms['frmProductDetail'].attributeID_1);
	if (attrFld1.options.length == 2){
		attrFld1.options[0]= null;
		attrFld1.options[0].selected = true;
		
		keyArray[0] = attrFld1.options[attrFld1.selectedIndex].value;
	}
	
	else
		attrFld1.options[0].selected = true;
	
	//var fld2 = document.getElementById('attributeID_2');
	var attrFld2 = eval(document.forms['frmProductDetail'].attributeID_2);
	if (attrFld2.options.length == 2){
		attrFld2.options[0]= null;
		attrFld2.options[0].selected = true;
		
		keyArray[1] = attrFld2.options[attrFld2.selectedIndex].value;
	}
	
	else
		attrFld2.options[0].selected = true;
	
	
	//alert(keyArray.length);
	var key = '';
	for(var i=0; i < keyArray.length;i++){
		if (keyArray[i] != undefined){
			if (key.length ==0)
				key = keyArray[i];
			else
				key = key + '_' + keyArray[i];
		}
	}
	if (keyArray.length > 0 && key.indexOf('_') >0){
		getProductPrice('/index.cfm?event=shop.dspProductPrice&prod_id='+AvailableProducts[key]);
	}
	else {
		
	}
	

