
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
var Designdb = new Object()
Designdb["CE_strips"] = [{id:"131", text:"blue"},
  {id:"2", text:"green"},
  {id:"3", text:"peach"},
  {id:"4", text:"pink"},
  {id:"1", text:"purple"}];
Designdb["CE_swash"] = [{id:"9", text:"black"},
  {id:"5", text:"blue"},
  {id:"6", text:"green"},
  {id:"7", text:"purple"},
  {id:"8", text:"red"}];
Designdb["CE_artnouveau"] = [{id:"10", text:"black"},
  {id:"135", text:"blue"},
  {id:"13", text:"burgundy"},
  {id:"11", text:"green"},
  {id:"12", text:"purple"}];
Designdb["NW_silhouette_bird"] = [{id:"15", text:"brown"},
  {id:"22", text:"lavender"},
  {id:"14", text:"light_blue"},
  {id:"16", text:"lime"},
  {id:"19", text:"orange"},
  {id:"20", text:"pink"},
  {id:"21", text:"red"},
  {id:"17", text:"sage"},
  {id:"18", text:"turquoise"}];
Designdb["NW_silhouette_btrfly"] = [{id:"24", text:"brown"},
  {id:"30", text:"lavender"},
  {id:"23", text:"light_blue"},
  {id:"25", text:"lime"},
  {id:"28", text:"orange"},
  {id:"29", text:"pink"},
  {id:"31", text:"red"},                
  {id:"26", text:"sage"},
  {id:"27", text:"turquoise"}];
Designdb["NW_silhouette_feather"] = [{id:"33", text:"brown"},
  {id:"39", text:"lavender"},
  {id:"32", text:"light_blue"},
  {id:"34", text:"lime"},
  {id:"37", text:"orange"},
  {id:"38", text:"pink"},
  {id:"40", text:"red"},           
  {id:"35", text:"sage"},                      
  {id:"36", text:"turquoise"}];
Designdb["NW_silhouette_fern"] = [
  {id:"42", text:"brown"},
  {id:"48", text:"lavender"},
  {id:"41", text:"light_blue"},
  {id:"43", text:"lime"},
  {id:"46", text:"orange"},
  {id:"47", text:"pink"},
  {id:"49", text:"red"},
  {id:"44", text:"sage"},                      
  {id:"45", text:"turquoise"}];
Designdb["NW_seasonal_stripes"] = [{id:"52", text:"fall"},
  {id:"51", text:"spring"},
  {id:"50", text:"summer"},
  {id:"53", text:"winter"}];                      
Designdb["NW_burst_monogram"] = [
  {id:"65", text:"brown"},
  {id:"54", text:"celadon"},
  {id:"57", text:"cocoa"},
  {id:"59", text:"coral"},
  {id:"60", text:"light_blue"},
  {id:"63", text:"mustard"},
  {id:"62", text:"pink"},
  {id:"58", text:"purple"},
  {id:"61", text:"red"},
  {id:"64", text:"sage"},
  {id:"56", text:"teal"},
  {id:"55", text:"turquoise"}
];
Designdb["NW_orchids"] = [
  {id:"66", text:"lime_cocoa"},
  {id:"67", text:"lime_white"},
  {id:"68", text:"pink_cocoa"},
  {id:"69", text:"pink_white"}
];
Designdb["NW_blossom"] = [
  {id:"71", text:"blue"},
  {id:"70", text:"pink"},
  {id:"73", text:"red"},
  {id:"72", text:"water"},
  {id:"74", text:"yellow"}
];
Designdb["SH_tropic"] = [
  {id:"76", text:"lavender"},
  {id:"75", text:"orange"}
];
Designdb["NW_luv_birds"] = [
  {id:"78", text:"blue"},
  {id:"81", text:"gold"},
  {id:"79", text:"orange"},
  {id:"80", text:"purple"}, 
  {id:"77", text:"red"}
];
Designdb["NW_island_shell"] = [
  {id:"82", text:"aqua"},
  {id:"84", text:"sand"},
  {id:"83", text:"yellow"}
];
Designdb["NW_island_starfish"] = [
  {id:"85", text:"aqua"},
  {id:"86", text:"blue"},
  {id:"87", text:"white"}
];
Designdb["NW_island_sun"] = [
  {id:"88", text:"aqua"},
  {id:"89", text:"blue"},
  {id:"90", text:"white"}
];
Designdb["NW_cherry_blossom"] = [
  {id:"97", text:"brown"},
  {id:"93", text:"lavender"},
  {id:"96", text:"lime"},
  {id:"92", text:"pink"},
  {id:"98", text:"red"},
  {id:"94", text:"sage"},
  {id:"91", text:"turquoise"}
];
Designdb["EC_fantasy_flower"] = [
  {id:"104", text:"blue_green"},
  {id:"107", text:"celadon"},
  {id:"106", text:"light_blue"},
  {id:"105", text:"lilac"},
  {id:"102", text:"pink"},
  {id:"101", text:"royal_blue"},
  {id:"103", text:"seafoam"},
  {id:"100", text:"violet"},
  {id:"99", text:"yellow"}
];                     
Designdb["EC_juice_it"] = [
  {id:"108", text:"black"},
  {id:"112", text:"celadon"},
  {id:"111", text:"light_blue"},
  {id:"114", text:"pink"},
  {id:"115", text:"plum"},
  {id:"109", text:"royal_blue"},
  {id:"110", text:"sage"},
  {id:"116", text:"white"},
  {id:"113", text:"yellow"}
];                     
Designdb["EC_monogram"] = [
  {id:"119", text:"green"}, 
  {id:"121", text:"light_blue"},
  {id:"122", text:"light_pink"},
  {id:"123", text:"light_yellow"},
  {id:"120", text:"medium_blue"},
  {id:"124", text:"pink"},
  {id:"117", text:"royal_blue"},
  {id:"125", text:"violet"}
];                     
Designdb["SH_luv_birds"] = [
  {id:"127", text:"blue"},
  {id:"132", text:"gold"},
  {id:"128", text:"orange"},                      
  {id:"129", text:"purple"},
  {id:"126", text:"red"}
];
Designdb["SH_blossom"] =  [
  {id:"137", text:"blue"},
  {id:"136", text:"pink"},
  {id:"139", text:"red"},
  {id:"138", text:"water"},
  {id:"140", text:"yellow"}
];
Designdb["NW_tropic"] = [
  {id:"142", text:"lavender"},
  {id:"141", text:"orange"}
];
function setCities(chooser) {
    var newElem;
    var where = (navigator.appName == "Microsoft Internet Explorer") ? -1 : null;
    var AttributeValueChooser = document.getElementById('2_color');
    while (AttributeValueChooser.options.length) {
        AttributeValueChooser.remove(0);
    }
    var choice = chooser.options[chooser.selectedIndex].id;
    var db = Designdb[choice];
    newElem = document.createElement("option");
    newElem.text = "choose a color";
    newElem.id = "";
    newElem.value = "0";
    AttributeValueChooser.add(newElem, where);
    if (choice != "") {
        for (var i = 0; i < db.length; i++) {
            newElem = document.createElement("option");
            newElem.text = db[i].text;
            newElem.id = db[i].id;
            AttributeValueChooser.add(newElem, where);
        }
    }
}

/**********
  DOM LEVEL 0 ALTERNATE
 **********
function setCities(chooser) {
    var AttributeValueChooser = chooser.form.elements["AttributeValue"];
    // empty previous settings
    AttributeValueChooser.options.length = 0;
    // get chosen id to act as index to Designdb hash table
    var choice = chooser.options[chooser.selectedIndex].id;
    var db = Designdb[choice];
    // insert default first item
    AttributeValueChooser.options[0] = new Option("Choose a AttributeValue:", "", true, false);
    if (choice != "") {
        // loop through array of the hash table entry, and populate options
        for (var i = 0; i < db.length; i++) {
            AttributeValueChooser.options[i + 1] = new Option(db[i].text, db[i].id);
        }
    }
}
**********/

