
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["exclusive"] = [
						{id:"7",text:"cake_blue"},
						{id:"8",text:"cake_pink"},
            {id:"9",text:"cake_purple"},
						{id:"4",text:"engagement_ring"},
						{id:"14",text:"flip_flops"},
            {id:"6",text:"high_heel_shoe"},
						{id:"1",text:"purse_pink"},
						{id:"2",text:"purse_blue"},
						{id:"3",text:"purse_grey"},
						{id:"13",text:"tea_cups"},
						{id:"10",text:"snowflakes"},
						{id:"11",text:"snowman_couple"},
            {id:"5",text:"wedding_gown"},
						{id:"12",text:"wine_bottle"},
						];
Designdb["classic"] = [
						{id:"17", text:"aqua_box"},
            {id:"30", text:"autumn_maples"},
            {id:"29", text:"autumn_tree"},
            {id:"31", text:"bamboo_gold"},
						{id:"32", text:"bamboo_silver"},
						{id:"15", text:"beach_chairs"},
            {id:"19", text:"bouquet"},
            {id:"21", text:"cake_green"},
						{id:"22", text:"cake_pink"},
            {id:"33", text:"cherry_blossom"},
            {id:"27", text:"couple_african_american"},
						{id:"28", text:"couple_caucasian"},
						{id:"18", text:"couple_on_beach"},
						{id:"16", text:"girls_night_out"},
						{id:"25", text:"just_married"},
						{id:"24", text:"martini_glasses"},
						{id:"23", text:"my_prince"},
						{id:"26", text:"two_hearts"},
            {id:"20", text:"wedding_dress"},
						];



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

