
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["hersheys_kisses"] = [ 
 					{id:"7", text:"beach_chairs_with_heart_4210113"},
 					{id:"5", text:"black_white_4210106-BW"},
 					{id:"26", text:"couple_in_golf_cart_4210133"},
					{id:"35", text:"cross_ornate_4210144"},
 					{id:"29", text:"daisies_4210137"},
					{id:"9", text:"flip_flops_4210115"},
					{id:"1", text:"kissing_candy_4210101"},
					{id:"24", text:"kissing_golf_balls_4210131"},
					{id:"15", text:"kissing_snow_couple_4210121"},
					{id:"36", text:"las_vegas_welcome_sign_4210146"}, 
 					{id:"3", text:"lavender_4210106-L"},
 					{id:"12", text:"leaf_banner_4210118"},
					{id:"13", text:"leaf_imprint_4210119"},
					{id:"14", text:"leaves_cascading_4210120"},
					{id:"20", text:"mittens_4210126"},
					{id:"monogram", text:"monogram_circle_blue_4218007"},
					{id:"monogram", text:"monogram_circle_lavender_4218005"},
					{id:"monogram", text:"monogram_circle_pink_4218004"},
					{id:"monogram", text:"monogram_circle_sage_4218006"},
					{id:"monogram", text:"monogram_square_gray_4218003"},	 
					{id:"22", text:"pastel_polka_dots_4210129"},
					{id:"21", text:"pastel_stripes_4210128"},
					{id:"8", text:"palm_trees_with_heart_4210114"},
					{id:"31", text:"peach_roses_4210139"},
					{id:"2", text:"pink_4210106-P"},
  					{id:"6", text:"pink_roses_4210109"},
                     {id:"30", text:"red_rose_4210138"},					 
                      {id:"4", text:"sepia_4210106-S"},
					  {id:"18", text:"single_snowflake_4210124"},
					 {id:"17", text:"snow_cascading_4210123"},
					  {id:"19", text:"snow_couple_4210125"},
					  {id:"33", text:"stripes_gray_cross_4210142"},
					  {id:"34", text:"tan_cross_4210143"},
					  {id:"23", text:"three_circles_hearts_4210130"},		
					  {id:"28", text:"three_cocktail_glasses4210135"}, 
					  {id:"32", text:"two_butterflies_4210141"},
					  {id:"25", text:"two_flags_heart_shaped_4210132"},					  
					  {id:"27", text:"two_golf_balls_on_tees_4210134"},					  
					  
					  {id:"11", text:"two_leaves_4210117"},					  
					  {id:"16", text:"two_pine_cones_4210122"},					  
					  {id:"43", text:"whimsical_bride_and_groom_4210174"}, 
					  {id:"10", text:"white_flower_4210116"},
					  {id:"42", text:"winter_wedding_4218000"},
								  
					  ];
Designdb["hersheys_miniatures"] = [
					{id:"107", text:"beach_chairs_with_heart_4180110"},
					{id:"105", text:"black_white_4180106-BW"},
					{id:"138", text:"celebrating_love_shooting_stars_4180140"},
					{id:"126", text:"couple_in_golf_cart_4180133"},
					{id:"135", text:"cross_ornate_4180144"},
					{id:"129", text:"daisies_4180137"},
					{id:"109", text:"flip_flops_4180112"},
					{id:"101", text:"kissing_candy_4180101"},
					{id:"124", text:"kissing_golf_balls_4180131"},
					{id:"115", text:"kissing_snow_couple_4180121"},
					{id:"136", text:"las_vegas_welcome_sign_4180146"},
					{id:"103", text:"lavender_4180106-L"},
					{id:"112", text:"leaf_banner_4180118"},
					{id:"113", text:"leaf_imprint_4180119"},
					{id:"114", text:"leaves_cascading_4180120"},
					{id:"120", text:"mittens_4180126"},
					{id:"monogram", text:"monogram_circle_blue_4188007"},
					{id:"monogram", text:"monogram_circle_lavender_4188005"},
					{id:"monogram", text:"monogram_circle_pink_4188004"},
					{id:"monogram", text:"monogram_circle_sage_4188006"},
					{id:"monogram", text:"monogram_square_gray_4188003"},
					{id:"108", text:"palm_trees_with_heart_4180111"},
					{id:"122", text:"pastel_polka_dots_4180129"},
					{id:"121", text:"pastel_stripes_4180128"},
					
					{id:"131", text:"peach_roses_4180139"},
					{id:"102", text:"pink_4180106-P"},
					{id:"106", text:"pink_roses_4180109"},
					{id:"130", text:"red_rose_4180138"},
					{id:"104", text:"sepia_4180106-S"},
					{id:"118", text:"single_snowflake_4180124"},
					{id:"117", text:"snow_cascading_4180123"},
								  {id:"119", text:"snow_couple_4180125"},
								  {id:"133", text:"stripes_gray_cross_4180142"},
								  {id:"134", text:"tan_cross_4180143"},
								  {id:"123", text:"three_circles_hearts_4180130"},
								  {id:"128", text:"three_cocktail_glasses_4180135"}, 
								  {id:"132", text:"two_butterflies_4180141"},
								  {id:"125", text:"two_flags_heart_shaped_4180132"},
								  {id:"127", text:"two_golf_balls_on_tees_4180134"},
								  
								  {id:"111", text:"two_leaves_4180117"},
								  {id:"116", text:"two_pine_cones_4180122"},
								  {id:"137", text:"wedding_wonderland_trees_4180127"},
								  {id:"110", text:"white_flower_4180116"},
								  {id:"145", text:"whimsical_bride_and_groom_4180174"},
								  {id:"144", text:"winter_wedding_4188000"},
								  
								  
					  			  
					  			  
					   			  
         				];
Designdb["reg_chocolate_bar"] = [
 						{id:"207", text:"beach_chairs_with_heart_4160110"},
						{id:"205", text:"black_white_4160106-BW"},
						{id:"238", text:"celebrating_love_shooting_stars_4160140"},
						{id:"226", text:"couple_in_golf_cart_4160133"},
						{id:"235", text:"cross_ornate_4160144"},
						{id:"229", text:"daisies_4160137"},
						{id:"209", text:"flip_flops_4160112"},
						{id:"201", text:"kissing_candy_4160101"},
						{id:"224", text:"kissing_golf_balls_4160131"},
						{id:"215", text:"kissing_snow_couple_4160121"},
						
						{id:"236", text:"las_vegas_welcome_sign_4160146"},
						{id:"203", text:"lavender_4160106-L"},
						{id:"212", text:"leaf_banner_4160118"},
					    {id:"213", text:"leaf_imprint_4160119"},
					    {id:"214", text:"leaves_cascading_4160120"},
					    {id:"220", text:"mittens_4160126"},
						{id:"monogram", text:"monogram_circle_blue_4168007"},
						{id:"monogram", text:"monogram_circle_lavender_4168005"},
						{id:"monogram", text:"monogram_circle_pink_4168004"},
						{id:"monogram", text:"monogram_circle_sage_4168006"},
						{id:"monogram", text:"monogram_square_gray_4168003"},								
						{id:"208", text:"palm_trees_with_heart_4160111"},								 
					  	{id:"222", text:"pastel_polka_dots_4160129"},
						{id:"221", text:"pastel_stripes_4160128"},
						{id:"231", text:"peach_roses_4160139"},
						{id:"202", text:"pink_4160106-P"},
						{id:"206", text:"pink_roses_4160109"},
				 		{id:"230", text:"red_rose_4160138"},
                        {id:"204", text:"sepia_4160106-S"},
						{id:"218", text:"single_snowflake_4160124"},
					    
				  		{id:"217", text:"snow_cascading_4160123"},					    
					    {id:"219", text:"snow_couple_4160125"},
						{id:"233", text:"stripes_gray_cross_4160142"},
					    {id:"234", text:"tan_cross_4160143"},
						{id:"223", text:"three_circles_hearts_4160130"},
					    {id:"228", text:"three_cocktail_glasses_4160135"}, 	
						{id:"232", text:"two_butterflies_4160141"},						
						{id:"225", text:"two_flags_heart_shaped_4160132"},
						{id:"227", text:"two_golf_balls_on_tees_4160134"},			   	
					    {id:"211", text:"two_leaves_4160117"},
					    {id:"216", text:"two_pine_cones_4160122"},					  					  			 
					    {id:"237", text:"wedding_wonderland_trees_4160127"},
					    {id:"244", text:"whimsical_bride_and_groom_4160174"},
					    {id:"210", text:"white_flower_4160116"},
						{id:"244", text:"winter_wedding_4168000"},
					  ];

Designdb["5oz_chocolate_bar"] = [
					{id:"307", text:"beach_chairs_with_heart_4230110"},
					{id:"305", text:"black_white_4230106-BW"},
 					{id:"338", text:"celebrating_love_shooting_stars_4230140"},
					{id:"326", text:"couple_in_golf_cart_4230133"},
					{id:"335", text:"cross_ornate_4230144"},
					{id:"329", text:"daisies_4230137"},
					{id:"309", text:"flip_flops_4230112"},
 					{id:"301", text:"kissing_candy_4230101"},
					{id:"324", text:"kissing_golf_balls_4230131"},
					{id:"315", text:"kissing_snow_couple_4230121"},
					{id:"336", text:"las_vegas_welcome_sign_4230146"},
					{id:"303", text:"lavender_4230106-L"},
					{id:"312", text:"leaf_banner_4230118"},
					{id:"313", text:"leaf_imprint_4230119"},
					
					{id:"314", text:"leaves_cascading_4230120"},
					{id:"320", text:"mittens_4230126"},
					{id:"monogram", text:"monogram_circle_blue_4238007"},
					{id:"monogram", text:"monogram_circle_lavender_4238005"},
					{id:"monogram", text:"monogram_circle_pink_4238004"},
					{id:"monogram", text:"monogram_circle_sage_4238006"},
					{id:"monogram", text:"monogram_square_gray_4238003"},
					{id:"308", text:"palm_trees_with_heart_4230111"},
					{id:"322", text:"pastel_polka_dots_4230129"},
					{id:"321", text:"pastel_stripes_4230128"},
					
					{id:"331", text:"peach_roses_4230139"},
					{id:"302", text:"pink_4230106-P"},
					{id:"306", text:"pink_roses_4230109"},
					{id:"330", text:"red_rose_4230138"},
					{id:"304", text:"sepia_4230106-S"},
					{id:"318", text:"single_snowflake_4230124"},
					{id:"317", text:"snow_cascading_4230123"},
					{id:"319", text:"snow_couple_4230125"},
					{id:"333", text:"stripes_gray_cross_4230142"},
					{id:"334", text:"tan_cross_4230143"},
					{id:"328", text:"three_cocktail_glasses_4230135"}, 
					{id:"323", text:"three_circles_hearts_4230130"},
					{id:"325", text:"two_flags_heart_shaped_4230132"},
					{id:"327", text:"two_golf_balls_on_tees_4230134"},
					{id:"332", text:"two_butterflies_4230141"},
					{id:"311", text:"two_leaves_4230117"},
					{id:"316", text:"two_pine_cones_4230122"},
					{id:"337", text:"wedding_wonderland_trees_4230127"},								
					
					{id:"345", text:"whimsical_bride_and_groom_4230174"},
							  
					{id:"310", text:"white_flower_4230116"},
					{id:"344", text:"winter_wedding_4238000"},
						 ];
Designdb["gift_set"] = [
					{id:"7", text:"beach_chairs_with_heart_3100113"},
					{id:"5", text:"black_white_3100106-BW"}, 
 					{id:"26", text:"couple_in_golf_cart_3100133"},
 					{id:"35", text:"cross_ornate_3100144"},
  					{id:"29", text:"daisies_3100137"},
  					{id:"9", text:"flip_flops_3100115"},
  					{id:"1", text:"kissing_candy_3100101"},
  					{id:"24", text:"kissing_golf_balls_3100131"},
  					{id:"15", text:"kissing_snow_couple_3100121"},
  					{id:"36", text:"las_vegas_welcome_sign_3100146"}, 
  					{id:"3", text:"lavender_3100106-L"},
  					{id:"12", text:"leaf_banner_3100118"},
					{id:"14", text:"leaves_cascading_3100120"},
  					{id:"13", text:"leaf_imprint_3100119"},
  					{id:"20", text:"mittens_3100126"},
					{id:"monogram", text:"monogram_circle_blue_3108007"},
					{id:"monogram", text:"monogram_circle_lavender_3108005"},
					{id:"monogram", text:"monogram_circle_pink_3108004"},
					{id:"monogram", text:"monogram_circle_sage_3108006"},
					{id:"monogram", text:"monogram_square_gray_3108003"},
					{id:"8", text:"palm_trees_with_heart_3100114"},
					{id:"22", text:"pastel_polka_dots_3100129"},
					{id:"21", text:"pastel_stripes_3100128"},
					{id:"31", text:"peach_roses_3100139"},
					{id:"2", text:"pink_3100106-P"},
					{id:"6", text:"pink_roses_3100109"},
					{id:"30", text:"red_rose_3100138"},
					{id:"4", text:"sepia_3100106-S"},
					{id:"18", text:"single_snowflake_3100124"},
					{id:"17", text:"snow_cascading_3100123"},
					{id:"19", text:"snow_couple_3100125"},
					{id:"33", text:"stripes_gray_cross_3100142"},
					{id:"34", text:"tan_cross_3100143"},
					{id:"23", text:"three_circles_hearts_3100130"},
					{id:"28", text:"three_cocktail_glasses3100135"}, 
					{id:"32", text:"two_butterflies_3100141"},
					{id:"25", text:"two_flags_heart_shaped_3100132"},
					{id:"27", text:"two_golf_balls_on_tees_3100134"},
					
					{id:"11", text:"two_leaves_3100117"},
					{id:"16", text:"two_pine_cones_3100122"},
					{id:"43", text:"whimsical_bride_and_groom_3100174"},
					{id:"10", text:"white_flower_3100116"},
					{id:"42", text:"winter_wedding_3108000"},
 ];

function setCities(chooser) {
	var quant = chooser.options[chooser.selectedIndex].id;
if (quant == "hersheys_kisses"){

document.chocolateform.Quantity.value = 250;

}
if (quant == "hersheys_miniatures"){

document.chocolateform.Quantity.value = 100;

}
if (quant == "reg_chocolate_bar"){

document.chocolateform.Quantity.value = 30;

}
if (quant == "5oz_chocolate_bar"){

document.chocolateform.Quantity.value = 24;

}
if (quant == "gift_set"){

document.chocolateform.Quantity.value = 12;

}

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

