

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=DYNA SATIN.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_DYNA SATIN.jpg\" class=\"imgBorder\" alt=\"Dyna Satin Ribbon\" />\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"] = 943;
fldValueStruct["fld1array"][0]["text"] = "0.38 X 0.00 X 100.00";
fldValueStruct["fld1array"][1] = new Object();
fldValueStruct["fld1array"][1]["value"] = 944;
fldValueStruct["fld1array"][1]["text"] = "0.63 X 0.00 X 100.00";
fldValueStruct["fld1array"][2] = new Object();
fldValueStruct["fld1array"][2]["value"] = 945;
fldValueStruct["fld1array"][2]["text"] = "0.88 X 0.00 X 100.00";
fldValueStruct["fld1array"][3] = new Object();
fldValueStruct["fld1array"][3]["value"] = 1135;
fldValueStruct["fld1array"][3]["text"] = "9.00 X 9.00 X 2.75";
fldValueStruct["fld2array"] =  new Array();
fldValueStruct["fld2array"][0] = new Object();
fldValueStruct["fld2array"][0]["value"] = 453;
fldValueStruct["fld2array"][0]["text"] = "ANTIQUE GOLD";
fldValueStruct["fld2array"][1] = new Object();
fldValueStruct["fld2array"][1]["value"] = 265;
fldValueStruct["fld2array"][1]["text"] = "BEAUTY";
fldValueStruct["fld2array"][2] = new Object();
fldValueStruct["fld2array"][2]["value"] = 1506;
fldValueStruct["fld2array"][2]["text"] = "BLACK";
fldValueStruct["fld2array"][3] = new Object();
fldValueStruct["fld2array"][3]["value"] = 220;
fldValueStruct["fld2array"][3]["text"] = "BLACK GLOSS ";
fldValueStruct["fld2array"][4] = new Object();
fldValueStruct["fld2array"][4]["value"] = 454;
fldValueStruct["fld2array"][4]["text"] = "BLUE";
fldValueStruct["fld2array"][5] = new Object();
fldValueStruct["fld2array"][5]["value"] = 1447;
fldValueStruct["fld2array"][5]["text"] = "BURGUNDY";
fldValueStruct["fld2array"][6] = new Object();
fldValueStruct["fld2array"][6]["value"] = 455;
fldValueStruct["fld2array"][6]["text"] = "CHAMPAGNE";
fldValueStruct["fld2array"][7] = new Object();
fldValueStruct["fld2array"][7]["value"] = 1361;
fldValueStruct["fld2array"][7]["text"] = "CHOCOLATE";
fldValueStruct["fld2array"][8] = new Object();
fldValueStruct["fld2array"][8]["value"] = 402;
fldValueStruct["fld2array"][8]["text"] = "CITRUS";
fldValueStruct["fld2array"][9] = new Object();
fldValueStruct["fld2array"][9]["value"] = 456;
fldValueStruct["fld2array"][9]["text"] = "COPPER";
fldValueStruct["fld2array"][10] = new Object();
fldValueStruct["fld2array"][10]["value"] = 465;
fldValueStruct["fld2array"][10]["text"] = "CYCLAMEN";
fldValueStruct["fld2array"][11] = new Object();
fldValueStruct["fld2array"][11]["value"] = 457;
fldValueStruct["fld2array"][11]["text"] = "EGGSHELL";
fldValueStruct["fld2array"][12] = new Object();
fldValueStruct["fld2array"][12]["value"] = 266;
fldValueStruct["fld2array"][12]["text"] = "EMERALD GREEN";
fldValueStruct["fld2array"][13] = new Object();
fldValueStruct["fld2array"][13]["value"] = 458;
fldValueStruct["fld2array"][13]["text"] = "FRENCH BLUE";
fldValueStruct["fld2array"][14] = new Object();
fldValueStruct["fld2array"][14]["value"] = 267;
fldValueStruct["fld2array"][14]["text"] = "GOLD";
fldValueStruct["fld2array"][15] = new Object();
fldValueStruct["fld2array"][15]["value"] = 355;
fldValueStruct["fld2array"][15]["text"] = "HOLIDAY GREEN";
fldValueStruct["fld2array"][16] = new Object();
fldValueStruct["fld2array"][16]["value"] = 235;
fldValueStruct["fld2array"][16]["text"] = "HUNTER GREEN";
fldValueStruct["fld2array"][17] = new Object();
fldValueStruct["fld2array"][17]["value"] = 1442;
fldValueStruct["fld2array"][17]["text"] = "IVORY";
fldValueStruct["fld2array"][18] = new Object();
fldValueStruct["fld2array"][18]["value"] = 1509;
fldValueStruct["fld2array"][18]["text"] = "LAVENDER";
fldValueStruct["fld2array"][19] = new Object();
fldValueStruct["fld2array"][19]["value"] = 466;
fldValueStruct["fld2array"][19]["text"] = "MADAME RED";
fldValueStruct["fld2array"][20] = new Object();
fldValueStruct["fld2array"][20]["value"] = 459;
fldValueStruct["fld2array"][20]["text"] = "MAIZE";
fldValueStruct["fld2array"][21] = new Object();
fldValueStruct["fld2array"][21]["value"] = 306;
fldValueStruct["fld2array"][21]["text"] = "MAUVE";
fldValueStruct["fld2array"][22] = new Object();
fldValueStruct["fld2array"][22]["value"] = 409;
fldValueStruct["fld2array"][22]["text"] = "MINT";
fldValueStruct["fld2array"][23] = new Object();
fldValueStruct["fld2array"][23]["value"] = 460;
fldValueStruct["fld2array"][23]["text"] = "MOSS";
fldValueStruct["fld2array"][24] = new Object();
fldValueStruct["fld2array"][24]["value"] = 1430;
fldValueStruct["fld2array"][24]["text"] = "NAVY";
fldValueStruct["fld2array"][25] = new Object();
fldValueStruct["fld2array"][25]["value"] = 215;
fldValueStruct["fld2array"][25]["text"] = "ORANGE";
fldValueStruct["fld2array"][26] = new Object();
fldValueStruct["fld2array"][26]["value"] = 1538;
fldValueStruct["fld2array"][26]["text"] = "PEACH";
fldValueStruct["fld2array"][27] = new Object();
fldValueStruct["fld2array"][27]["value"] = 1511;
fldValueStruct["fld2array"][27]["text"] = "PINK";
fldValueStruct["fld2array"][28] = new Object();
fldValueStruct["fld2array"][28]["value"] = 237;
fldValueStruct["fld2array"][28]["text"] = "PLUM";
fldValueStruct["fld2array"][29] = new Object();
fldValueStruct["fld2array"][29]["value"] = 271;
fldValueStruct["fld2array"][29]["text"] = "PURPLE";
fldValueStruct["fld2array"][30] = new Object();
fldValueStruct["fld2array"][30]["value"] = 1512;
fldValueStruct["fld2array"][30]["text"] = "RED";
fldValueStruct["fld2array"][31] = new Object();
fldValueStruct["fld2array"][31]["value"] = 1651;
fldValueStruct["fld2array"][31]["text"] = "red";
fldValueStruct["fld2array"][32] = new Object();
fldValueStruct["fld2array"][32]["value"] = 307;
fldValueStruct["fld2array"][32]["text"] = "ROYAL BLUE";
fldValueStruct["fld2array"][33] = new Object();
fldValueStruct["fld2array"][33]["value"] = 461;
fldValueStruct["fld2array"][33]["text"] = "RUST";
fldValueStruct["fld2array"][34] = new Object();
fldValueStruct["fld2array"][34]["value"] = 1423;
fldValueStruct["fld2array"][34]["text"] = "SAGE";
fldValueStruct["fld2array"][35] = new Object();
fldValueStruct["fld2array"][35]["value"] = 462;
fldValueStruct["fld2array"][35]["text"] = "SCARLET RED";
fldValueStruct["fld2array"][36] = new Object();
fldValueStruct["fld2array"][36]["value"] = 360;
fldValueStruct["fld2array"][36]["text"] = "SHOCKING PINK";
fldValueStruct["fld2array"][37] = new Object();
fldValueStruct["fld2array"][37]["value"] = 319;
fldValueStruct["fld2array"][37]["text"] = "SILVER";
fldValueStruct["fld2array"][38] = new Object();
fldValueStruct["fld2array"][38]["value"] = 463;
fldValueStruct["fld2array"][38]["text"] = "SUN";
fldValueStruct["fld2array"][39] = new Object();
fldValueStruct["fld2array"][39]["value"] = 238;
fldValueStruct["fld2array"][39]["text"] = "TEAL";
fldValueStruct["fld2array"][40] = new Object();
fldValueStruct["fld2array"][40]["value"] = 464;
fldValueStruct["fld2array"][40]["text"] = "VIOLET";
fldValueStruct["fld2array"][41] = new Object();
fldValueStruct["fld2array"][41]["value"] = 141;
fldValueStruct["fld2array"][41]["text"] = "WHITE";
fldValueStruct["fld2array"][42] = new Object();
fldValueStruct["fld2array"][42]["value"] = 308;
fldValueStruct["fld2array"][42]["text"] = "WINE";
fldValueStruct["fld2array"][43] = new Object();
fldValueStruct["fld2array"][43]["value"] = 248;
fldValueStruct["fld2array"][43]["text"] = "YELLOW";


AvailableProducts = new Object();
AvailableProducts["360_943"] = 2037;
AvailableProducts["943_409"] = 2032;
AvailableProducts["453_944"] = 2041;
AvailableProducts["220_1135"] = 2034;
AvailableProducts["944_457"] = 2051;
AvailableProducts["409_943"] = 2032;
AvailableProducts["943_402"] = 2023;
AvailableProducts["453_945"] = 2081;
AvailableProducts["1506_945"] = 2083;
AvailableProducts["945_1509"] = 2097;
AvailableProducts["465_945"] = 2089;
AvailableProducts["945_319"] = 2114;
AvailableProducts["1511_945"] = 2105;
AvailableProducts["461_945"] = 2109;
AvailableProducts["943_458"] = 2027;
AvailableProducts["944_267"] = 2054;
AvailableProducts["943_465"] = 2025;
AvailableProducts["462_945"] = 2112;
AvailableProducts["944_266"] = 2052;
AvailableProducts["1512_945"] = 2108;
AvailableProducts["945_454"] = 2084;
AvailableProducts["944_238"] = 2077;
AvailableProducts["1509_945"] = 2097;
AvailableProducts["944_306"] = 2062;
AvailableProducts["945_1538"] = 2098;
AvailableProducts["945_465"] = 2089;
AvailableProducts["945_235"] = 2095;
AvailableProducts["944_465"] = 2050;
AvailableProducts["235_943"] = 2029;
AvailableProducts["944_462"] = 2073;
AvailableProducts["1506_944"] = 2043;
AvailableProducts["455_945"] = 2086;
AvailableProducts["1512_943"] = 2036;
AvailableProducts["944_459"] = 2061;
AvailableProducts["1423_944"] = 2072;
AvailableProducts["944_215"] = 2066;
AvailableProducts["1430_944"] = 2065;
AvailableProducts["945_238"] = 2116;
AvailableProducts["944_456"] = 2049;
AvailableProducts["1442_944"] = 2057;
AvailableProducts["943_248"] = 2040;
AvailableProducts["267_944"] = 2054;
AvailableProducts["458_943"] = 2027;
AvailableProducts["1361_944"] = 2047;
AvailableProducts["945_1442"] = 2096;
AvailableProducts["945_456"] = 2088;
AvailableProducts["943_235"] = 2029;
AvailableProducts["944_409"] = 2063;
AvailableProducts["943_141"] = 2039;
AvailableProducts["945_460"] = 2103;
AvailableProducts["943_319"] = 2038;
AvailableProducts["1447_945"] = 2085;
AvailableProducts["944_464"] = 2078;
AvailableProducts["945_266"] = 2091;
AvailableProducts["945_360"] = 2113;
AvailableProducts["271_944"] = 2069;
AvailableProducts["945_461"] = 2109;
AvailableProducts["945_402"] = 2087;
AvailableProducts["1442_945"] = 2096;
AvailableProducts["945_453"] = 2081;
AvailableProducts["945_457"] = 2090;
AvailableProducts["265_944"] = 2042;
AvailableProducts["945_355"] = 2094;
AvailableProducts["355_943"] = 2028;
AvailableProducts["945_466"] = 2099;
AvailableProducts["266_944"] = 2052;
AvailableProducts["944_453"] = 2041;
AvailableProducts["319_944"] = 2075;
AvailableProducts["238_944"] = 2077;
AvailableProducts["945_306"] = 2101;
AvailableProducts["944_455"] = 15008;
AvailableProducts["944_308"] = 2080;
AvailableProducts["454_945"] = 2084;
AvailableProducts["459_945"] = 2100;
AvailableProducts["1447_943"] = 2021;
AvailableProducts["943_355"] = 2028;
AvailableProducts["458_945"] = 2092;
AvailableProducts["215_944"] = 2066;
AvailableProducts["944_271"] = 2069;
AvailableProducts["466_945"] = 2099;
AvailableProducts["943_360"] = 2037;
AvailableProducts["945_409"] = 2102;
AvailableProducts["945_459"] = 2100;
AvailableProducts["465_943"] = 2025;
AvailableProducts["141_944"] = 2079;
AvailableProducts["355_945"] = 2094;
AvailableProducts["402_944"] = 2048;
AvailableProducts["1511_944"] = 2067;
AvailableProducts["944_461"] = 2070;
AvailableProducts["1361_943"] = 2022;
AvailableProducts["237_944"] = 2068;
AvailableProducts["307_945"] = 2110;
AvailableProducts["306_945"] = 2101;
AvailableProducts["945_462"] = 2112;
AvailableProducts["463_944"] = 2076;
AvailableProducts["454_943"] = 2020;
AvailableProducts["307_944"] = 2071;
AvailableProducts["945_307"] = 2110;
AvailableProducts["456_945"] = 2088;
AvailableProducts["454_944"] = 2044;
AvailableProducts["306_944"] = 2062;
AvailableProducts["1509_943"] = 2030;
AvailableProducts["457_944"] = 2051;
AvailableProducts["1506_943"] = 2019;
AvailableProducts["945_1511"] = 2105;
AvailableProducts["235_944"] = 2056;
AvailableProducts["944_466"] = 2060;
AvailableProducts["945_1423"] = 2111;
AvailableProducts["453_943"] = 2018;
AvailableProducts["944_265"] = 2042;
AvailableProducts["944_1538"] = 2059;
AvailableProducts["945_215"] = 2104;
AvailableProducts["944_1511"] = 2067;
AvailableProducts["460_945"] = 2103;
AvailableProducts["944_1506"] = 2043;
AvailableProducts["945_237"] = 2106;
AvailableProducts["402_943"] = 2023;
AvailableProducts["944_235"] = 2056;
AvailableProducts["409_944"] = 2063;
AvailableProducts["319_945"] = 2114;
AvailableProducts["459_944"] = 2061;
AvailableProducts["944_463"] = 2076;
AvailableProducts["402_945"] = 2087;
AvailableProducts["1135_220"] = 2034;
AvailableProducts["1538_945"] = 2098;
AvailableProducts["944_355"] = 2055;
AvailableProducts["944_141"] = 2079;
AvailableProducts["1509_944"] = 2058;
AvailableProducts["944_319"] = 2075;
AvailableProducts["944_1442"] = 2057;
AvailableProducts["943_1509"] = 2030;
AvailableProducts["945_1506"] = 2083;
AvailableProducts["945_1447"] = 2085;
AvailableProducts["945_267"] = 2093;
AvailableProducts["945_265"] = 2082;
AvailableProducts["267_945"] = 2093;
AvailableProducts["945_458"] = 2092;
AvailableProducts["945_1512"] = 2108;
AvailableProducts["943_271"] = 2035;
AvailableProducts["944_402"] = 2048;
AvailableProducts["945_271"] = 2107;
AvailableProducts["944_307"] = 2071;
AvailableProducts["944_237"] = 2068;
AvailableProducts["943_453"] = 2018;
AvailableProducts["945_455"] = 2086;
AvailableProducts["271_943"] = 2035;
AvailableProducts["463_945"] = 2115;
AvailableProducts["455_944"] = 15008;
AvailableProducts["462_944"] = 2073;
AvailableProducts["461_944"] = 2070;
AvailableProducts["456_944"] = 2049;
AvailableProducts["944_1423"] = 2072;
AvailableProducts["944_1430"] = 2065;
AvailableProducts["944_1509"] = 2058;
AvailableProducts["466_944"] = 2060;
AvailableProducts["944_1361"] = 2047;
AvailableProducts["409_945"] = 2102;
AvailableProducts["944_1447"] = 2045;
AvailableProducts["464_944"] = 2078;
AvailableProducts["943_1361"] = 2022;
AvailableProducts["1538_944"] = 2059;
AvailableProducts["943_1447"] = 2021;
AvailableProducts["943_1506"] = 2019;
AvailableProducts["943_1512"] = 2036;
AvailableProducts["944_458"] = 2053;
AvailableProducts["458_944"] = 2053;
AvailableProducts["1423_945"] = 2111;
AvailableProducts["271_945"] = 2107;
AvailableProducts["457_945"] = 2090;
AvailableProducts["215_945"] = 2104;
AvailableProducts["945_463"] = 2115;
AvailableProducts["141_943"] = 2039;
AvailableProducts["235_945"] = 2095;
AvailableProducts["944_454"] = 2044;
AvailableProducts["237_945"] = 2106;
AvailableProducts["248_943"] = 2040;
AvailableProducts["319_943"] = 2038;
AvailableProducts["238_945"] = 2116;
AvailableProducts["1447_944"] = 2045;
AvailableProducts["308_944"] = 2080;
AvailableProducts["465_944"] = 2050;
AvailableProducts["355_944"] = 2055;
AvailableProducts["943_454"] = 2020;
AvailableProducts["266_945"] = 2091;
AvailableProducts["265_945"] = 2082;
AvailableProducts["360_945"] = 2113;


AttributeArray = new Object();
AttributeArray["465"] = new Object();
AttributeArray["465"]["value"] = 465;
AttributeArray["465"]["text"] = "CYCLAMEN";
AttributeArray["465"]["prod_id"] = "2025,2050,2089";
AttributeArray["465"]["allowed"] = "943,944,945";
AttributeArray["402"] = new Object();
AttributeArray["402"]["value"] = 402;
AttributeArray["402"]["text"] = "CITRUS";
AttributeArray["402"]["prod_id"] = "2023,2048,2087";
AttributeArray["402"]["allowed"] = "943,944,945";
AttributeArray["1135"] = new Object();
AttributeArray["1135"]["value"] = 1135;
AttributeArray["1135"]["text"] = "9.00 X 9.00 X 2.75";
AttributeArray["1135"]["prod_id"] = "2034";
AttributeArray["1135"]["allowed"] = "220";
AttributeArray["215"] = new Object();
AttributeArray["215"]["value"] = 215;
AttributeArray["215"]["text"] = "ORANGE";
AttributeArray["215"]["prod_id"] = "2066,2104";
AttributeArray["215"]["allowed"] = "944,945";
AttributeArray["944"] = new Object();
AttributeArray["944"]["value"] = 944;
AttributeArray["944"]["text"] = "0.63 X 0.00 X 100.00";
AttributeArray["944"]["prod_id"] = "2079,2066,2056,2068,2077,2042,2052,2054,2069,2062,2071,2080,2075,2055,2048,2063,2041,2044,2046,15008,2049,2051,2053,2061,2070,2073,2076,2078,2050,2060,2047,2072,2065,2057,2045,2043,2058,2067,2059";
AttributeArray["944"]["allowed"] = "141,215,235,237,238,265,266,267,271,306,307,308,319,355,402,409,453,454,455,455,456,457,458,459,461,462,463,464,465,466,1361,1423,1430,1442,1447,1506,1509,1511,1538";
AttributeArray["266"] = new Object();
AttributeArray["266"]["value"] = 266;
AttributeArray["266"]["text"] = "EMERALD GREEN";
AttributeArray["266"]["prod_id"] = "2052,2091";
AttributeArray["266"]["allowed"] = "944,945";
AttributeArray["355"] = new Object();
AttributeArray["355"]["value"] = 355;
AttributeArray["355"]["text"] = "HOLIDAY GREEN";
AttributeArray["355"]["prod_id"] = "2028,2055,2094";
AttributeArray["355"]["allowed"] = "943,944,945";
AttributeArray["454"] = new Object();
AttributeArray["454"]["value"] = 454;
AttributeArray["454"]["text"] = "BLUE";
AttributeArray["454"]["prod_id"] = "2020,2044,2084";
AttributeArray["454"]["allowed"] = "943,944,945";
AttributeArray["459"] = new Object();
AttributeArray["459"]["value"] = 459;
AttributeArray["459"]["text"] = "MAIZE";
AttributeArray["459"]["prod_id"] = "2061,2100";
AttributeArray["459"]["allowed"] = "944,945";
AttributeArray["307"] = new Object();
AttributeArray["307"]["value"] = 307;
AttributeArray["307"]["text"] = "ROYAL BLUE";
AttributeArray["307"]["prod_id"] = "2071,2110";
AttributeArray["307"]["allowed"] = "944,945";
AttributeArray["455"] = new Object();
AttributeArray["455"]["value"] = 455;
AttributeArray["455"]["text"] = "CHAMPAGNE";
AttributeArray["455"]["prod_id"] = "2046,15008,2086";
AttributeArray["455"]["allowed"] = "944,944,945";
AttributeArray["943"] = new Object();
AttributeArray["943"]["value"] = 943;
AttributeArray["943"]["text"] = "0.38 X 0.00 X 100.00";
AttributeArray["943"]["prod_id"] = "2039,2029,2040,2035,2038,2028,2037,2023,2032,2018,2020,2027,2025,2022,2021,2019,2030,2036";
AttributeArray["943"]["allowed"] = "141,235,248,271,319,355,360,402,409,453,454,458,465,1361,1447,1506,1509,1512";
AttributeArray["220"] = new Object();
AttributeArray["220"]["value"] = 220;
AttributeArray["220"]["text"] = "BLACK GLOSS ";
AttributeArray["220"]["prod_id"] = "2034";
AttributeArray["220"]["allowed"] = "1135";
AttributeArray["453"] = new Object();
AttributeArray["453"]["value"] = 453;
AttributeArray["453"]["text"] = "ANTIQUE GOLD";
AttributeArray["453"]["prod_id"] = "2018,2041,2081";
AttributeArray["453"]["allowed"] = "943,944,945";
AttributeArray["1442"] = new Object();
AttributeArray["1442"]["value"] = 1442;
AttributeArray["1442"]["text"] = "IVORY";
AttributeArray["1442"]["prod_id"] = "2057,2096";
AttributeArray["1442"]["allowed"] = "944,945";
AttributeArray["235"] = new Object();
AttributeArray["235"]["value"] = 235;
AttributeArray["235"]["text"] = "HUNTER GREEN";
AttributeArray["235"]["prod_id"] = "2029,2056,2095";
AttributeArray["235"]["allowed"] = "943,944,945";
AttributeArray["456"] = new Object();
AttributeArray["456"]["value"] = 456;
AttributeArray["456"]["text"] = "COPPER";
AttributeArray["456"]["prod_id"] = "2049,2088";
AttributeArray["456"]["allowed"] = "944,945";
AttributeArray["457"] = new Object();
AttributeArray["457"]["value"] = 457;
AttributeArray["457"]["text"] = "EGGSHELL";
AttributeArray["457"]["prod_id"] = "2051,2090";
AttributeArray["457"]["allowed"] = "944,945";
AttributeArray["238"] = new Object();
AttributeArray["238"]["value"] = 238;
AttributeArray["238"]["text"] = "TEAL";
AttributeArray["238"]["prod_id"] = "2077,2116";
AttributeArray["238"]["allowed"] = "944,945";
AttributeArray["141"] = new Object();
AttributeArray["141"]["value"] = 141;
AttributeArray["141"]["text"] = "WHITE";
AttributeArray["141"]["prod_id"] = "2039,2079";
AttributeArray["141"]["allowed"] = "943,944";
AttributeArray["462"] = new Object();
AttributeArray["462"]["value"] = 462;
AttributeArray["462"]["text"] = "SCARLET RED";
AttributeArray["462"]["prod_id"] = "2073,2112";
AttributeArray["462"]["allowed"] = "944,945";
AttributeArray["409"] = new Object();
AttributeArray["409"]["value"] = 409;
AttributeArray["409"]["text"] = "MINT";
AttributeArray["409"]["prod_id"] = "2032,2063,2102";
AttributeArray["409"]["allowed"] = "943,944,945";
AttributeArray["1423"] = new Object();
AttributeArray["1423"]["value"] = 1423;
AttributeArray["1423"]["text"] = "SAGE";
AttributeArray["1423"]["prod_id"] = "2072,2111";
AttributeArray["1423"]["allowed"] = "944,945";
AttributeArray["308"] = new Object();
AttributeArray["308"]["value"] = 308;
AttributeArray["308"]["text"] = "WINE";
AttributeArray["308"]["prod_id"] = "2080";
AttributeArray["308"]["allowed"] = "944";
AttributeArray["271"] = new Object();
AttributeArray["271"]["value"] = 271;
AttributeArray["271"]["text"] = "PURPLE";
AttributeArray["271"]["prod_id"] = "2035,2069,2107";
AttributeArray["271"]["allowed"] = "943,944,945";
AttributeArray["463"] = new Object();
AttributeArray["463"]["value"] = 463;
AttributeArray["463"]["text"] = "SUN";
AttributeArray["463"]["prod_id"] = "2076,2115";
AttributeArray["463"]["allowed"] = "944,945";
AttributeArray["267"] = new Object();
AttributeArray["267"]["value"] = 267;
AttributeArray["267"]["text"] = "GOLD";
AttributeArray["267"]["prod_id"] = "2054,2093";
AttributeArray["267"]["allowed"] = "944,945";
AttributeArray["248"] = new Object();
AttributeArray["248"]["value"] = 248;
AttributeArray["248"]["text"] = "YELLOW";
AttributeArray["248"]["prod_id"] = "2040";
AttributeArray["248"]["allowed"] = "943";
AttributeArray["458"] = new Object();
AttributeArray["458"]["value"] = 458;
AttributeArray["458"]["text"] = "FRENCH BLUE";
AttributeArray["458"]["prod_id"] = "2027,2053,2092";
AttributeArray["458"]["allowed"] = "943,944,945";
AttributeArray["360"] = new Object();
AttributeArray["360"]["value"] = 360;
AttributeArray["360"]["text"] = "SHOCKING PINK";
AttributeArray["360"]["prod_id"] = "2037,2113";
AttributeArray["360"]["allowed"] = "943,945";
AttributeArray["306"] = new Object();
AttributeArray["306"]["value"] = 306;
AttributeArray["306"]["text"] = "MAUVE";
AttributeArray["306"]["prod_id"] = "2062,2101";
AttributeArray["306"]["allowed"] = "944,945";
AttributeArray["1538"] = new Object();
AttributeArray["1538"]["value"] = 1538;
AttributeArray["1538"]["text"] = "PEACH";
AttributeArray["1538"]["prod_id"] = "2059,2098";
AttributeArray["1538"]["allowed"] = "944,945";
AttributeArray["319"] = new Object();
AttributeArray["319"]["value"] = 319;
AttributeArray["319"]["text"] = "SILVER";
AttributeArray["319"]["prod_id"] = "2038,2075,2114";
AttributeArray["319"]["allowed"] = "943,944,945";
AttributeArray["1509"] = new Object();
AttributeArray["1509"]["value"] = 1509;
AttributeArray["1509"]["text"] = "LAVENDER";
AttributeArray["1509"]["prod_id"] = "2030,2058,2097";
AttributeArray["1509"]["allowed"] = "943,944,945";
AttributeArray["1447"] = new Object();
AttributeArray["1447"]["value"] = 1447;
AttributeArray["1447"]["text"] = "BURGUNDY";
AttributeArray["1447"]["prod_id"] = "2021,2045,2085";
AttributeArray["1447"]["allowed"] = "943,944,945";
AttributeArray["945"] = new Object();
AttributeArray["945"]["value"] = 945;
AttributeArray["945"]["text"] = "0.88 X 0.00 X 100.00";
AttributeArray["945"]["prod_id"] = "2104,2095,2106,2116,2082,2091,2093,2107,2101,2110,2114,2094,2113,2087,2102,2081,2084,2086,2088,2090,2092,2100,2103,2109,2112,2115,2089,2099,2111,2096,2085,2083,2097,2105,2108,2098";
AttributeArray["945"]["allowed"] = "215,235,237,238,265,266,267,271,306,307,319,355,360,402,409,453,454,455,456,457,458,459,460,461,462,463,465,466,1423,1442,1447,1506,1509,1511,1512,1538";
AttributeArray["1506"] = new Object();
AttributeArray["1506"]["value"] = 1506;
AttributeArray["1506"]["text"] = "BLACK";
AttributeArray["1506"]["prod_id"] = "2019,2043,2083";
AttributeArray["1506"]["allowed"] = "943,944,945";
AttributeArray["1651"] = new Object();
AttributeArray["1651"]["value"] = 1651;
AttributeArray["1651"]["text"] = "red";
AttributeArray["1512"] = new Object();
AttributeArray["1512"]["value"] = 1512;
AttributeArray["1512"]["text"] = "RED";
AttributeArray["1512"]["prod_id"] = "2036,2108";
AttributeArray["1512"]["allowed"] = "943,945";
AttributeArray["1430"] = new Object();
AttributeArray["1430"]["value"] = 1430;
AttributeArray["1430"]["text"] = "NAVY";
AttributeArray["1430"]["prod_id"] = "2065";
AttributeArray["1430"]["allowed"] = "944";
AttributeArray["265"] = new Object();
AttributeArray["265"]["value"] = 265;
AttributeArray["265"]["text"] = "BEAUTY";
AttributeArray["265"]["prod_id"] = "2042,2082";
AttributeArray["265"]["allowed"] = "944,945";
AttributeArray["1511"] = new Object();
AttributeArray["1511"]["value"] = 1511;
AttributeArray["1511"]["text"] = "PINK";
AttributeArray["1511"]["prod_id"] = "2067,2105";
AttributeArray["1511"]["allowed"] = "944,945";
AttributeArray["237"] = new Object();
AttributeArray["237"]["value"] = 237;
AttributeArray["237"]["text"] = "PLUM";
AttributeArray["237"]["prod_id"] = "2068,2106";
AttributeArray["237"]["allowed"] = "944,945";
AttributeArray["466"] = new Object();
AttributeArray["466"]["value"] = 466;
AttributeArray["466"]["text"] = "MADAME RED";
AttributeArray["466"]["prod_id"] = "2060,2099";
AttributeArray["466"]["allowed"] = "944,945";
AttributeArray["461"] = new Object();
AttributeArray["461"]["value"] = 461;
AttributeArray["461"]["text"] = "RUST";
AttributeArray["461"]["prod_id"] = "2070,2109";
AttributeArray["461"]["allowed"] = "944,945";
AttributeArray["460"] = new Object();
AttributeArray["460"]["value"] = 460;
AttributeArray["460"]["text"] = "MOSS";
AttributeArray["460"]["prod_id"] = "2103";
AttributeArray["460"]["allowed"] = "945";
AttributeArray["1361"] = new Object();
AttributeArray["1361"]["value"] = 1361;
AttributeArray["1361"]["text"] = "CHOCOLATE";
AttributeArray["1361"]["prod_id"] = "2022,2047";
AttributeArray["1361"]["allowed"] = "943,944";
AttributeArray["464"] = new Object();
AttributeArray["464"]["value"] = 464;
AttributeArray["464"]["text"] = "VIOLET";
AttributeArray["464"]["prod_id"] = "2078";
AttributeArray["464"]["allowed"] = "944";


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 {
		
	}
	

