
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()
var Designdb = new Object()

Designdb["wedding"] = [
{id:"74", text:"blue_broadway"},
{id:"62", text:"christmas"},
{id:"63", text:"fall_leaves"},
{id:"75", text:"framed"},
{id:"64", text:"goblet"},
{id:"73", text:"initial"},
{id:"65", text:"label_bubbles"},
{id:"76", text:"lily"},
{id:"67", text:"love_honor"},
{id:"77", text:"love_squared"},
{id:"66", text:"red_rose"},
{id:"79", text:"roses"},
{id:"68", text:"sage"},
{id:"69", text:"shells"},
{id:"78", text:"simply_red_wine"},
{id:"70", text:"tropical"},
{id:"71", text:"vintage"},
{id:"72", text:"white_rose"}
];
            
Designdb["birthday"] = [
{id:"15", text:"candles"},
{id:"16", text:"perfectly_pink"},
{id:"17", text:"triumph"},
{id:"18", text:"vision_test"}
];

Designdb["graduation"] = [
{id:"82", text:"adventurous"},
{id:"83", text:"black_red"},
{id:"84", text:"blue_sky"}
];

Designdb["retirement"] = [
{id:"58", text:"canyon"},
{id:"59", text:"gold_leaf"}
];

Designdb["holiday"] = [
{id:"59", text:"christmas_elements"},
{id:"59", text:"christmas_tree"},
{id:"59", text:"country_road"},
{id:"59", text:"festival_of_lights"},
{id:"59", text:"gold_snow"},
{id:"59", text:"grapevine_wreath"},
{id:"59", text:"hanukkah"},
{id:"59", text:"holly"},
{id:"59", text:"joy"},
{id:"57", text:"mothers_day"},
{id:"58", text:"mothers_day_flowers"},
{id:"59", text:"new_years_reserve"},
{id:"59", text:"rustic"},
{id:"59", text:"snowflake"},
{id:"59", text:"star"},
{id:"59", text:"thanksgiving_turkey"}
];
            
Designdb["corporate"] = [
{id:"29", text:"antique_sky"},
{id:"32", text:"by_the_sea"},
{id:"30", text:"falling_leaves"},
{id:"31", text:"skyline"}
];

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

