

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=SATINACETATE.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_SATINACETATE.jpg\" class=\"imgBorder\" alt=\"Satin Acetate 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"] = 1035;
fldValueStruct["fld1array"][3]["text"] = "1.38 X 0.00 X 100.00";
fldValueStruct["fld2array"] =  new Array();
fldValueStruct["fld2array"][0] = new Object();
fldValueStruct["fld2array"][0]["value"] = 346;
fldValueStruct["fld2array"][0]["text"] = "AZALEA";
fldValueStruct["fld2array"][1] = new Object();
fldValueStruct["fld2array"][1]["value"] = 1506;
fldValueStruct["fld2array"][1]["text"] = "BLACK";
fldValueStruct["fld2array"][2] = new Object();
fldValueStruct["fld2array"][2]["value"] = 454;
fldValueStruct["fld2array"][2]["text"] = "BLUE";
fldValueStruct["fld2array"][3] = new Object();
fldValueStruct["fld2array"][3]["value"] = 1447;
fldValueStruct["fld2array"][3]["text"] = "BURGUNDY";
fldValueStruct["fld2array"][4] = new Object();
fldValueStruct["fld2array"][4]["value"] = 400;
fldValueStruct["fld2array"][4]["text"] = "CELADON";
fldValueStruct["fld2array"][5] = new Object();
fldValueStruct["fld2array"][5]["value"] = 457;
fldValueStruct["fld2array"][5]["text"] = "EGGSHELL";
fldValueStruct["fld2array"][6] = new Object();
fldValueStruct["fld2array"][6]["value"] = 592;
fldValueStruct["fld2array"][6]["text"] = "FUSCHIA";
fldValueStruct["fld2array"][7] = new Object();
fldValueStruct["fld2array"][7]["value"] = 355;
fldValueStruct["fld2array"][7]["text"] = "HOLIDAY GREEN";
fldValueStruct["fld2array"][8] = new Object();
fldValueStruct["fld2array"][8]["value"] = 1581;
fldValueStruct["fld2array"][8]["text"] = "HOLIDAY RED";
fldValueStruct["fld2array"][9] = new Object();
fldValueStruct["fld2array"][9]["value"] = 1442;
fldValueStruct["fld2array"][9]["text"] = "IVORY";
fldValueStruct["fld2array"][10] = new Object();
fldValueStruct["fld2array"][10]["value"] = 303;
fldValueStruct["fld2array"][10]["text"] = "JADE";
fldValueStruct["fld2array"][11] = new Object();
fldValueStruct["fld2array"][11]["value"] = 358;
fldValueStruct["fld2array"][11]["text"] = "MAGENTA";
fldValueStruct["fld2array"][12] = new Object();
fldValueStruct["fld2array"][12]["value"] = 306;
fldValueStruct["fld2array"][12]["text"] = "MAUVE";
fldValueStruct["fld2array"][13] = new Object();
fldValueStruct["fld2array"][13]["value"] = 409;
fldValueStruct["fld2array"][13]["text"] = "MINT";
fldValueStruct["fld2array"][14] = new Object();
fldValueStruct["fld2array"][14]["value"] = 1430;
fldValueStruct["fld2array"][14]["text"] = "NAVY";
fldValueStruct["fld2array"][15] = new Object();
fldValueStruct["fld2array"][15]["value"] = 781;
fldValueStruct["fld2array"][15]["text"] = "NEW SEAFOAM";
fldValueStruct["fld2array"][16] = new Object();
fldValueStruct["fld2array"][16]["value"] = 782;
fldValueStruct["fld2array"][16]["text"] = "OLD GOLD";
fldValueStruct["fld2array"][17] = new Object();
fldValueStruct["fld2array"][17]["value"] = 1511;
fldValueStruct["fld2array"][17]["text"] = "PINK";
fldValueStruct["fld2array"][18] = new Object();
fldValueStruct["fld2array"][18]["value"] = 237;
fldValueStruct["fld2array"][18]["text"] = "PLUM";
fldValueStruct["fld2array"][19] = new Object();
fldValueStruct["fld2array"][19]["value"] = 784;
fldValueStruct["fld2array"][19]["text"] = "PRIMROSE";
fldValueStruct["fld2array"][20] = new Object();
fldValueStruct["fld2array"][20]["value"] = 271;
fldValueStruct["fld2array"][20]["text"] = "PURPLE";
fldValueStruct["fld2array"][21] = new Object();
fldValueStruct["fld2array"][21]["value"] = 1512;
fldValueStruct["fld2array"][21]["text"] = "RED";
fldValueStruct["fld2array"][22] = new Object();
fldValueStruct["fld2array"][22]["value"] = 1651;
fldValueStruct["fld2array"][22]["text"] = "red";
fldValueStruct["fld2array"][23] = new Object();
fldValueStruct["fld2array"][23]["value"] = 307;
fldValueStruct["fld2array"][23]["text"] = "ROYAL BLUE";
fldValueStruct["fld2array"][24] = new Object();
fldValueStruct["fld2array"][24]["value"] = 360;
fldValueStruct["fld2array"][24]["text"] = "SHOCKING PINK";
fldValueStruct["fld2array"][25] = new Object();
fldValueStruct["fld2array"][25]["value"] = 783;
fldValueStruct["fld2array"][25]["text"] = "SILVER GREY";
fldValueStruct["fld2array"][26] = new Object();
fldValueStruct["fld2array"][26]["value"] = 463;
fldValueStruct["fld2array"][26]["text"] = "SUN";
fldValueStruct["fld2array"][27] = new Object();
fldValueStruct["fld2array"][27]["value"] = 785;
fldValueStruct["fld2array"][27]["text"] = "SURFSIDE";
fldValueStruct["fld2array"][28] = new Object();
fldValueStruct["fld2array"][28]["value"] = 238;
fldValueStruct["fld2array"][28]["text"] = "TEAL";
fldValueStruct["fld2array"][29] = new Object();
fldValueStruct["fld2array"][29]["value"] = 141;
fldValueStruct["fld2array"][29]["text"] = "WHITE";
fldValueStruct["fld2array"][30] = new Object();
fldValueStruct["fld2array"][30]["value"] = 787;
fldValueStruct["fld2array"][30]["text"] = "WILLIAMSBURG BLUE";


AvailableProducts = new Object();
AvailableProducts["360_943"] = 14138;
AvailableProducts["943_463"] = 14139;
AvailableProducts["1035_463"] = 14102;
AvailableProducts["944_358"] = 14162;
AvailableProducts["943_303"] = 14122;
AvailableProducts["1035_781"] = 14090;
AvailableProducts["303_1035"] = 14085;
AvailableProducts["945_360"] = 14215;
AvailableProducts["943_400"] = 14110;
AvailableProducts["1511_944"] = 14170;
AvailableProducts["943_238"] = 14141;
AvailableProducts["944_400"] = 14147;
AvailableProducts["781_945"] = 14203;
AvailableProducts["943_141"] = 14142;
AvailableProducts["237_1035"] = 14095;
AvailableProducts["944_454"] = 14145;
AvailableProducts["1511_945"] = 14208;
AvailableProducts["943_360"] = 14138;
AvailableProducts["945_781"] = 14203;
AvailableProducts["944_781"] = 14165;
AvailableProducts["1035_1512"] = 14081;
AvailableProducts["1035_782"] = 14091;
AvailableProducts["306_1035"] = 14086;
AvailableProducts["303_945"] = 14198;
AvailableProducts["1035_141"] = 14105;
AvailableProducts["945_400"] = 14186;
AvailableProducts["944_355"] = 14154;
AvailableProducts["358_944"] = 14162;
AvailableProducts["409_1035"] = 14088;
AvailableProducts["945_358"] = 14200;
AvailableProducts["944_141"] = 14181;
AvailableProducts["1506_943"] = 14107;
AvailableProducts["1035_592"] = 14079;
AvailableProducts["782_944"] = 14166;
AvailableProducts["1512_943"] = 14118;
AvailableProducts["785_1035"] = 14103;
AvailableProducts["1035_346"] = 14070;
AvailableProducts["1035_237"] = 14095;
AvailableProducts["1035_303"] = 14085;
AvailableProducts["944_463"] = 14178;
AvailableProducts["785_944"] = 14179;
AvailableProducts["1035_271"] = 14098;
AvailableProducts["1430_944"] = 14164;
AvailableProducts["1035_355"] = 14080;
AvailableProducts["945_271"] = 14212;
AvailableProducts["944_307"] = 14176;
AvailableProducts["1442_943"] = 14121;
AvailableProducts["592_1035"] = 14079;
AvailableProducts["781_943"] = 14127;
AvailableProducts["943_592"] = 14116;
AvailableProducts["346_1035"] = 14070;
AvailableProducts["454_1035"] = 14072;
AvailableProducts["945_1447"] = 14185;
AvailableProducts["1035_783"] = 14096;
AvailableProducts["945_783"] = 14210;
AvailableProducts["943_237"] = 14132;
AvailableProducts["1035_454"] = 14072;
AvailableProducts["943_346"] = 14106;
AvailableProducts["944_592"] = 14153;
AvailableProducts["943_781"] = 14127;
AvailableProducts["945_785"] = 14217;
AvailableProducts["943_271"] = 14135;
AvailableProducts["943_307"] = 14137;
AvailableProducts["238_1035"] = 14104;
AvailableProducts["944_457"] = 14150;
AvailableProducts["945_238"] = 14218;
AvailableProducts["355_1035"] = 14080;
AvailableProducts["945_307"] = 14214;
AvailableProducts["1442_945"] = 14197;
AvailableProducts["784_945"] = 14211;
AvailableProducts["1512_945"] = 14194;
AvailableProducts["945_787"] = 14220;
AvailableProducts["945_463"] = 14216;
AvailableProducts["1035_360"] = 14101;
AvailableProducts["1447_945"] = 14185;
AvailableProducts["784_1035"] = 14097;
AvailableProducts["945_454"] = 14184;
AvailableProducts["945_784"] = 14211;
AvailableProducts["1035_457"] = 14077;
AvailableProducts["943_783"] = 14133;
AvailableProducts["1035_1442"] = 14084;
AvailableProducts["945_409"] = 14201;
AvailableProducts["355_945"] = 14193;
AvailableProducts["1506_1035"] = 14071;
AvailableProducts["346_945"] = 14182;
AvailableProducts["944_360"] = 14177;
AvailableProducts["360_944"] = 14177;
AvailableProducts["271_944"] = 14174;
AvailableProducts["1430_945"] = 14202;
AvailableProducts["238_945"] = 14218;
AvailableProducts["945_457"] = 14190;
AvailableProducts["944_271"] = 14174;
AvailableProducts["592_945"] = 14192;
AvailableProducts["1430_1035"] = 14089;
AvailableProducts["1447_944"] = 14146;
AvailableProducts["943_409"] = 14125;
AvailableProducts["943_784"] = 14134;
AvailableProducts["303_944"] = 14159;
AvailableProducts["782_1035"] = 14091;
AvailableProducts["358_943"] = 14124;
AvailableProducts["400_943"] = 14110;
AvailableProducts["944_783"] = 14172;
AvailableProducts["1035_400"] = 14074;
AvailableProducts["943_782"] = 14128;
AvailableProducts["945_592"] = 14192;
AvailableProducts["1035_1506"] = 14071;
AvailableProducts["783_945"] = 14210;
AvailableProducts["945_1430"] = 14202;
AvailableProducts["141_943"] = 14142;
AvailableProducts["784_944"] = 14173;
AvailableProducts["1512_944"] = 14155;
AvailableProducts["1035_785"] = 14103;
AvailableProducts["944_346"] = 14143;
AvailableProducts["457_943"] = 14113;
AvailableProducts["237_945"] = 14209;
AvailableProducts["307_945"] = 14214;
AvailableProducts["306_945"] = 14199;
AvailableProducts["457_1035"] = 14077;
AvailableProducts["463_943"] = 14139;
AvailableProducts["454_944"] = 14145;
AvailableProducts["307_943"] = 14137;
AvailableProducts["945_237"] = 14209;
AvailableProducts["782_943"] = 14128;
AvailableProducts["454_943"] = 14108;
AvailableProducts["306_944"] = 14161;
AvailableProducts["1506_944"] = 14144;
AvailableProducts["457_945"] = 14190;
AvailableProducts["1506_945"] = 14183;
AvailableProducts["945_1512"] = 14194;
AvailableProducts["237_943"] = 14132;
AvailableProducts["783_943"] = 14133;
AvailableProducts["944_782"] = 14166;
AvailableProducts["409_943"] = 14125;
AvailableProducts["1512_1035"] = 14081;
AvailableProducts["944_238"] = 14180;
AvailableProducts["945_141"] = 14219;
AvailableProducts["944_1511"] = 14170;
AvailableProducts["945_1442"] = 14197;
AvailableProducts["400_945"] = 14186;
AvailableProducts["944_237"] = 14171;
AvailableProducts["409_945"] = 14201;
AvailableProducts["1447_943"] = 14109;
AvailableProducts["1035_307"] = 14100;
AvailableProducts["1035_784"] = 14097;
AvailableProducts["463_945"] = 14216;
AvailableProducts["944_306"] = 14161;
AvailableProducts["945_303"] = 14198;
AvailableProducts["592_943"] = 14116;
AvailableProducts["944_409"] = 14163;
AvailableProducts["1447_1035"] = 14073;
AvailableProducts["943_358"] = 14124;
AvailableProducts["943_1447"] = 14109;
AvailableProducts["943_1512"] = 14118;
AvailableProducts["781_944"] = 14165;
AvailableProducts["944_1442"] = 14158;
AvailableProducts["943_1506"] = 14107;
AvailableProducts["1035_1430"] = 14089;
AvailableProducts["945_1506"] = 14183;
AvailableProducts["271_1035"] = 14098;
AvailableProducts["141_944"] = 14181;
AvailableProducts["360_1035"] = 14101;
AvailableProducts["945_346"] = 14182;
AvailableProducts["1035_409"] = 14088;
AvailableProducts["1035_1511"] = 14094;
AvailableProducts["945_306"] = 14199;
AvailableProducts["355_944"] = 14154;
AvailableProducts["346_944"] = 14143;
AvailableProducts["307_1035"] = 14100;
AvailableProducts["1035_1447"] = 14073;
AvailableProducts["783_944"] = 14172;
AvailableProducts["141_1035"] = 14105;
AvailableProducts["943_355"] = 14117;
AvailableProducts["783_1035"] = 14096;
AvailableProducts["944_303"] = 14159;
AvailableProducts["358_1035"] = 14087;
AvailableProducts["1442_1035"] = 14084;
AvailableProducts["945_355"] = 14193;
AvailableProducts["944_784"] = 14173;
AvailableProducts["1511_1035"] = 14094;
AvailableProducts["400_1035"] = 14074;
AvailableProducts["944_785"] = 14179;
AvailableProducts["943_306"] = 14123;
AvailableProducts["945_782"] = 14204;
AvailableProducts["271_943"] = 14135;
AvailableProducts["238_944"] = 14180;
AvailableProducts["463_1035"] = 14102;
AvailableProducts["463_944"] = 14178;
AvailableProducts["454_945"] = 14184;
AvailableProducts["457_944"] = 14150;
AvailableProducts["944_1430"] = 14164;
AvailableProducts["944_1506"] = 14144;
AvailableProducts["944_1512"] = 14155;
AvailableProducts["787_945"] = 14220;
AvailableProducts["409_944"] = 14163;
AvailableProducts["944_1447"] = 14146;
AvailableProducts["945_1511"] = 14208;
AvailableProducts["1430_943"] = 14126;
AvailableProducts["943_1442"] = 14121;
AvailableProducts["943_1430"] = 14126;
AvailableProducts["943_454"] = 14108;
AvailableProducts["943_1511"] = 14131;
AvailableProducts["782_945"] = 14204;
AvailableProducts["1035_238"] = 14104;
AvailableProducts["1035_306"] = 14086;
AvailableProducts["400_944"] = 14147;
AvailableProducts["1511_943"] = 14131;
AvailableProducts["303_943"] = 14122;
AvailableProducts["358_945"] = 14200;
AvailableProducts["781_1035"] = 14090;
AvailableProducts["141_945"] = 14219;
AvailableProducts["307_944"] = 14176;
AvailableProducts["306_943"] = 14123;
AvailableProducts["237_944"] = 14171;
AvailableProducts["1035_358"] = 14087;
AvailableProducts["784_943"] = 14134;
AvailableProducts["785_945"] = 14217;
AvailableProducts["271_945"] = 14212;
AvailableProducts["238_943"] = 14141;
AvailableProducts["1442_944"] = 14158;
AvailableProducts["592_944"] = 14153;
AvailableProducts["355_943"] = 14117;
AvailableProducts["943_457"] = 14113;
AvailableProducts["346_943"] = 14106;
AvailableProducts["360_945"] = 14215;


AttributeArray = new Object();
AttributeArray["355"] = new Object();
AttributeArray["355"]["value"] = 355;
AttributeArray["355"]["text"] = "HOLIDAY GREEN";
AttributeArray["355"]["prod_id"] = "14117,14154,14193,14080";
AttributeArray["355"]["allowed"] = "943,944,945,1035";
AttributeArray["1035"] = new Object();
AttributeArray["1035"]["value"] = 1035;
AttributeArray["1035"]["text"] = "1.38 X 0.00 X 100.00";
AttributeArray["1035"]["prod_id"] = "14105,14095,14104,14098,14085,14086,14100,14070,14080,14087,14101,14074,14088,14072,14077,14102,14079,14090,14091,14096,14097,14103,14089,14084,14073,14071,14094,14081";
AttributeArray["1035"]["allowed"] = "141,237,238,271,303,306,307,346,355,358,360,400,409,454,457,463,592,781,782,783,784,785,1430,1442,1447,1506,1511,1512";
AttributeArray["945"] = new Object();
AttributeArray["945"]["value"] = 945;
AttributeArray["945"]["text"] = "0.88 X 0.00 X 100.00";
AttributeArray["945"]["prod_id"] = "14219,14209,14218,14212,14198,14199,14214,14182,14193,14200,14215,14186,14201,14184,14190,14216,14192,14203,14204,14210,14211,14217,14220,14202,14197,14185,14183,14208,14194";
AttributeArray["945"]["allowed"] = "141,237,238,271,303,306,307,346,355,358,360,400,409,454,457,463,592,781,782,783,784,785,787,1430,1442,1447,1506,1511,1512";
AttributeArray["1581"] = new Object();
AttributeArray["1581"]["value"] = 1581;
AttributeArray["1581"]["text"] = "HOLIDAY RED";
AttributeArray["781"] = new Object();
AttributeArray["781"]["value"] = 781;
AttributeArray["781"]["text"] = "NEW SEAFOAM";
AttributeArray["781"]["prod_id"] = "14127,14165,14203,14090";
AttributeArray["781"]["allowed"] = "943,944,945,1035";
AttributeArray["944"] = new Object();
AttributeArray["944"]["value"] = 944;
AttributeArray["944"]["text"] = "0.63 X 0.00 X 100.00";
AttributeArray["944"]["prod_id"] = "14181,14171,14180,14174,14159,14161,14176,14143,14154,14162,14177,14147,14163,14145,14150,14178,14153,14165,14166,14172,14173,14179,14164,14158,14146,14144,14170,14155";
AttributeArray["944"]["allowed"] = "141,237,238,271,303,306,307,346,355,358,360,400,409,454,457,463,592,781,782,783,784,785,1430,1442,1447,1506,1511,1512";
AttributeArray["409"] = new Object();
AttributeArray["409"]["value"] = 409;
AttributeArray["409"]["text"] = "MINT";
AttributeArray["409"]["prod_id"] = "14125,14163,14201,14088";
AttributeArray["409"]["allowed"] = "943,944,945,1035";
AttributeArray["787"] = new Object();
AttributeArray["787"]["value"] = 787;
AttributeArray["787"]["text"] = "WILLIAMSBURG BLUE";
AttributeArray["787"]["prod_id"] = "14220";
AttributeArray["787"]["allowed"] = "945";
AttributeArray["592"] = new Object();
AttributeArray["592"]["value"] = 592;
AttributeArray["592"]["text"] = "FUSCHIA";
AttributeArray["592"]["prod_id"] = "14116,14153,14192,14079";
AttributeArray["592"]["allowed"] = "943,944,945,1035";
AttributeArray["360"] = new Object();
AttributeArray["360"]["value"] = 360;
AttributeArray["360"]["text"] = "SHOCKING PINK";
AttributeArray["360"]["prod_id"] = "14138,14177,14215,14101";
AttributeArray["360"]["allowed"] = "943,944,945,1035";
AttributeArray["271"] = new Object();
AttributeArray["271"]["value"] = 271;
AttributeArray["271"]["text"] = "PURPLE";
AttributeArray["271"]["prod_id"] = "14135,14174,14212,14098";
AttributeArray["271"]["allowed"] = "943,944,945,1035";
AttributeArray["943"] = new Object();
AttributeArray["943"]["value"] = 943;
AttributeArray["943"]["text"] = "0.38 X 0.00 X 100.00";
AttributeArray["943"]["prod_id"] = "14142,14132,14141,14135,14122,14123,14137,14106,14117,14124,14138,14110,14125,14108,14113,14139,14116,14127,14128,14133,14134,14126,14121,14109,14107,14131,14118";
AttributeArray["943"]["allowed"] = "141,237,238,271,303,306,307,346,355,358,360,400,409,454,457,463,592,781,782,783,784,1430,1442,1447,1506,1511,1512";
AttributeArray["454"] = new Object();
AttributeArray["454"]["value"] = 454;
AttributeArray["454"]["text"] = "BLUE";
AttributeArray["454"]["prod_id"] = "14108,14145,14184,14072";
AttributeArray["454"]["allowed"] = "943,944,945,1035";
AttributeArray["783"] = new Object();
AttributeArray["783"]["value"] = 783;
AttributeArray["783"]["text"] = "SILVER GREY";
AttributeArray["783"]["prod_id"] = "14133,14172,14210,14096";
AttributeArray["783"]["allowed"] = "943,944,945,1035";
AttributeArray["784"] = new Object();
AttributeArray["784"]["value"] = 784;
AttributeArray["784"]["text"] = "PRIMROSE";
AttributeArray["784"]["prod_id"] = "14134,14173,14211,14097";
AttributeArray["784"]["allowed"] = "943,944,945,1035";
AttributeArray["358"] = new Object();
AttributeArray["358"]["value"] = 358;
AttributeArray["358"]["text"] = "MAGENTA";
AttributeArray["358"]["prod_id"] = "14124,14162,14200,14087";
AttributeArray["358"]["allowed"] = "943,944,945,1035";
AttributeArray["1442"] = new Object();
AttributeArray["1442"]["value"] = 1442;
AttributeArray["1442"]["text"] = "IVORY";
AttributeArray["1442"]["prod_id"] = "14121,14158,14197,14084";
AttributeArray["1442"]["allowed"] = "943,944,945,1035";
AttributeArray["237"] = new Object();
AttributeArray["237"]["value"] = 237;
AttributeArray["237"]["text"] = "PLUM";
AttributeArray["237"]["prod_id"] = "14132,14171,14209,14095";
AttributeArray["237"]["allowed"] = "943,944,945,1035";
AttributeArray["785"] = new Object();
AttributeArray["785"]["value"] = 785;
AttributeArray["785"]["text"] = "SURFSIDE";
AttributeArray["785"]["prod_id"] = "14179,14217,14103";
AttributeArray["785"]["allowed"] = "944,945,1035";
AttributeArray["1506"] = new Object();
AttributeArray["1506"]["value"] = 1506;
AttributeArray["1506"]["text"] = "BLACK";
AttributeArray["1506"]["prod_id"] = "14107,14144,14183,14071";
AttributeArray["1506"]["allowed"] = "943,944,945,1035";
AttributeArray["1447"] = new Object();
AttributeArray["1447"]["value"] = 1447;
AttributeArray["1447"]["text"] = "BURGUNDY";
AttributeArray["1447"]["prod_id"] = "14109,14146,14185,14073";
AttributeArray["1447"]["allowed"] = "943,944,945,1035";
AttributeArray["306"] = new Object();
AttributeArray["306"]["value"] = 306;
AttributeArray["306"]["text"] = "MAUVE";
AttributeArray["306"]["prod_id"] = "14123,14161,14199,14086";
AttributeArray["306"]["allowed"] = "943,944,945,1035";
AttributeArray["457"] = new Object();
AttributeArray["457"]["value"] = 457;
AttributeArray["457"]["text"] = "EGGSHELL";
AttributeArray["457"]["prod_id"] = "14113,14150,14190,14077";
AttributeArray["457"]["allowed"] = "943,944,945,1035";
AttributeArray["346"] = new Object();
AttributeArray["346"]["value"] = 346;
AttributeArray["346"]["text"] = "AZALEA";
AttributeArray["346"]["prod_id"] = "14106,14143,14182,14070";
AttributeArray["346"]["allowed"] = "943,944,945,1035";
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"] = "14118,14155,14194,14081";
AttributeArray["1512"]["allowed"] = "943,944,945,1035";
AttributeArray["400"] = new Object();
AttributeArray["400"]["value"] = 400;
AttributeArray["400"]["text"] = "CELADON";
AttributeArray["400"]["prod_id"] = "14110,14147,14186,14074";
AttributeArray["400"]["allowed"] = "943,944,945,1035";
AttributeArray["1511"] = new Object();
AttributeArray["1511"]["value"] = 1511;
AttributeArray["1511"]["text"] = "PINK";
AttributeArray["1511"]["prod_id"] = "14131,14170,14208,14094";
AttributeArray["1511"]["allowed"] = "943,944,945,1035";
AttributeArray["1430"] = new Object();
AttributeArray["1430"]["value"] = 1430;
AttributeArray["1430"]["text"] = "NAVY";
AttributeArray["1430"]["prod_id"] = "14126,14164,14202,14089";
AttributeArray["1430"]["allowed"] = "943,944,945,1035";
AttributeArray["303"] = new Object();
AttributeArray["303"]["value"] = 303;
AttributeArray["303"]["text"] = "JADE";
AttributeArray["303"]["prod_id"] = "14122,14159,14198,14085";
AttributeArray["303"]["allowed"] = "943,944,945,1035";
AttributeArray["141"] = new Object();
AttributeArray["141"]["value"] = 141;
AttributeArray["141"]["text"] = "WHITE";
AttributeArray["141"]["prod_id"] = "14142,14181,14219,14105";
AttributeArray["141"]["allowed"] = "943,944,945,1035";
AttributeArray["307"] = new Object();
AttributeArray["307"]["value"] = 307;
AttributeArray["307"]["text"] = "ROYAL BLUE";
AttributeArray["307"]["prod_id"] = "14137,14176,14214,14100";
AttributeArray["307"]["allowed"] = "943,944,945,1035";
AttributeArray["463"] = new Object();
AttributeArray["463"]["value"] = 463;
AttributeArray["463"]["text"] = "SUN";
AttributeArray["463"]["prod_id"] = "14139,14178,14216,14102";
AttributeArray["463"]["allowed"] = "943,944,945,1035";
AttributeArray["238"] = new Object();
AttributeArray["238"]["value"] = 238;
AttributeArray["238"]["text"] = "TEAL";
AttributeArray["238"]["prod_id"] = "14141,14180,14218,14104";
AttributeArray["238"]["allowed"] = "943,944,945,1035";
AttributeArray["782"] = new Object();
AttributeArray["782"]["value"] = 782;
AttributeArray["782"]["text"] = "OLD GOLD";
AttributeArray["782"]["prod_id"] = "14128,14166,14204,14091";
AttributeArray["782"]["allowed"] = "943,944,945,1035";


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 {
		
	}
	

