
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["chapel"] = [{id:"1", text:"pink"},
                      {id:"2", text:"sage"},];
Designdb["fancy"] = [{id:"3", text:"blossom"},
						{id:"4", text:"grass"},];
Designdb["fall"] = [{id:"5", text:"sage"},                 		
                    		{id:"6", text:"willow"},];
Designdb["scroll"] = [{id:"7", text:"foam"},
                          {id:"8", text:"leaf"},];
Designdb["dottie"] = [{id:"9", text:"celery"},
                      {id:"10", text:"tangerine"},
                      {id:"11", text:"papaya"},];
Designdb["pineapple"] = [{id:"12", text:"lime"},
                      {id:"13", text:"aqua"},
						{id:"14", text:"hot_pink"},];
Designdb["tropics"] = [{id:"15", text:"pink"},
                      {id:"16", text:"orange"},
                      {id:"17", text:"blue"},];
Designdb["floral"] = [{id:"18", text:"sage"},
					  {id:"19", text:"periwinkle"},];
Designdb["snowflake"] = [{id:"20", text:"lavender"},
						 {id:"21", text:"pink"},];
Designdb["winter"] = [{id:"22", text:"default_color"},           
						];
Designdb["vineyard"] = [{id:"23", text:"sage"},                 
						{id:"24", text:"purple"},
						{id:"41", text:"cocoa"},
						{id:"42", text:"maize"},];
Designdb["flower"] = [{id:"25", text:"pink"},
						{id:"26", text:"purple"},
						{id:"51", text:"pool"},                 
						{id:"52", text:"sage"},];
Designdb["flourish"] = [{id:"27", text:"baby_blue"},           
						{id:"28", text:"blossom"},];
Designdb["baroque"] = [{id:"29", text:"baby_blue"},
                      {id:"30", text:"foam"},           
					    {id:"31", text:"blossom"},                      
						];
Designdb["blossom"] = [{id:"32", text:"baby_blue"},
                      {id:"33", text:"sage"},
                      {id:"34", text:"pool"},
                      {id:"35", text:"blossom"},
                      ];
Designdb["stripe"] = [{id:"36", text:"celery"},
                      {id:"37", text:"tangerine"},           
						{id:"38", text:"papaya"},];
Designdb["tree"] = [{id:"39", text:"sage"},
						{id:"40", text:"butter"},];
Designdb["argyle"] = [{id:"43", text:"pink"},                 
						{id:"44", text:"apple"},
						{id:"45", text:"plum"},
						{id:"46", text:"midnight"},
						{id:"46", text:"pumpkin"},
						];
Designdb["lolly"] = [{id:"47", text:"dusk"},                 
						{id:"48", text:"moss"},
						{id:"49", text:"twilight"},
						{id:"50", text:"pink"},];


function setCities(chooser) {
    var newElem;
    var where = (navigator.appName == "Microsoft Internet Explorer") ? -1 : null;
    var AttributeValueChooser = document.getElementById('AttributeValue[2]');
    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 = "";
    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);
        }
    }
}
**********/

