//
// User configuration
// Customize your menu below.
//
// You may copy and use this script for free, but if you like it
// please go to http://www.wiltech.net/downloads/menuj/create.htm and donate
// just $1.
//
// Thanks!
//
// coderunner (Joseph Sullivan)
//	
var mainMenuColor="#000000";
var menuItemColor="e0e0e0";
var highlightColor="#0099cc";
var highlightTextColor="#ffffff";
var borderWidth=1;
var borderHeight=1;
var paddingWidth=3;
var paddingHeight=3;
var itemWidth=168;
var itemHeight=20;
var hAlign="left";
var vAlign="middle";
var anchorClass="menuAnchor";
var itemTagsOpen="<font class='menuAnchor' face='Arial' size='2' color='#000000'>";
var itemTagsClose="</font>";
var menuDelay=0.3; 	





//	
// Do not change anything below this line
// ######################################
//
// Revision 1.5: Added support for getElementById() compliant (modern) browsers.
//		   this fixed compatability issues with Netscape 7.1
//


var lockArray=new Array();
var clrByJump = false;

	// Added 3/27/01 JS
	// For OK Farm site
function getLock(name){
	if(lockArray[name]!=true)
		return false;
	else    return true;
}

function clearLock(name){
	lockArray[name]=false;
}

function setLock(name){
	lockArray[name]=true;
}

function clearLocks() {
	for (a=0; a<lockArray.length;a++)
		lockArray[a]=false;
}

function clearByJump() {
	// Image restore goes here
	clrByJump = true;
}


	// Variable (and "constant") declaration:
	var TYPE_NONE = 0;
	var TYPE_IE4 = 1;
	var TYPE_NS4=2;
	var TYPE_COMPLIANT=4;
	function menu (left,top) { this.childMenuOpen=-1; this.parentMenuIndex=-1; this.hasMouse=false; this.left=left; this.top=top; this.childCount=0; this.children=new Array; this.url="";}
	function menuItem (contents,url,background) { this.transparent=false; this.childMenuIndex=-1; this.background=background; this.image=""; this.html=contents; this.url=url;}
	var menus=new Array();
	var menuCount=0;

	// Browser detection:
	var type= TYPE_NONE;
	if (document.layers) type = TYPE_NS4;
	if (document.all) type=TYPE_IE4;
	if (document.getElementById) type=TYPE_COMPLIANT;


function menuOn (index) {
	
	setLock(index);	
	 
	showMenu(index);
	menus[index].hasMouse=true;

	// If this menu has a parent, turn the parent on, too:
	var parentIndex=menus[index].parentMenuIndex;
	if (parentIndex > -1 ) {
	   menus[parentIndex].childMenuOpen=index;
		showMenu(parentIndex);
//		menus[parentIndex].hasMouse=true;
	}
	
	if (index == 1) {
          event.srcElement.src = "http://www.thegardendecorstore.com/images/outdoor_decor_ro.gif";
        } else if (index == 2) {
          event.srcElement.src = "http://www.thegardendecorstore.com/images/water_features_ro.gif";
        } else if (index == 3) {
          event.srcElement.src = "http://www.thegardendecorstore.com/images/garden_structures_ro.gif";
        } else if (index == 4) {
          event.srcElement.src = "http://www.thegardendecorstore.com/images/outdoor_furniture_ro.gif";
        } else if (index == 5) {
          event.srcElement.src = "http://www.thegardendecorstore.com/images/backyard_entertaining_ro.gif";
        } else if (index == 6) {
          event.srcElement.src = "http://www.thegardendecorstore.com/images/garden_nursery_ro.gif";
        } else if (index == 7) {
          event.srcElement.src = "http://www.thegardendecorstore.com/images/garden_tools_ro.gif";
        } else if (index == 8) {
          event.srcElement.src = "http://www.thegardendecorstore.com/images/pest_control_ro.gif";
        }
}

function menuOff(index,buttonName) {

		menus[index].hasMouse=false;

		// If this menu has a child open with the mouse, don't close: 
		if ((menus[index].childMenuOpen > -1)&&(menus[menus[index].childMenuOpen].hasMouse)) return;
		
		// If this is a child menu, close the parent too if the parent doesn't have the mouse:
		if (menus[index].parentMenuIndex > -1) {
		   if (menus[menus[index].parentMenuIndex].hasMouse==false)
		   this.timer=setTimeout(("hideMenu('"+menus[index].parentMenuIndex+"')"),1000*menuDelay);
		   menus[menus[index].parentMenuIndex].childMenuOpen=-1;  // We closed the child.
		}	
		
		// If this menu has an open child that doesn't have the mouse, close them both:
//		if(menus[index].childMenuOpen > -1){
	//		if((menus[index].hasMouse==false)&&(menus[(menus[index].childMenuOpen)].hasMouse==false))	;					  		
			//	this.timer=setTimeout(("hideMenu('"+menus[index].childMenuOpen+"')"),1000*menuDelay);
		//}	
		
		this.timer=setTimeout(("hideMenu('"+index+"')"),1000*menuDelay);
}


// Shows a menu...
function showMenu(index) {

	var parentIndex=menus[index].parentMenuIndex;
	var childIndex=menus[index].childMenuOpen;
	
	if (type==TYPE_NS4) {		// For Netscape browsers
	  // Hide all menus, except 1) This menu, 2) it's parent, and 3) any open child menu.
	   for (var n=0; n<menuCount; n++) if((n!=index)&&(n!=parentIndex)&&(n!=childIndex)) {	document.layers[n].visibility="hidden"; }
	   // Show this menu.
		document.layers[index].visibility="show";
	} else if (type==TYPE_IE4) {	// For IE browsers
	  // Hide all menus, except 1) This menu, 2) it's parent, and 3) any open child menu.
 	  for (var n=0; n<menuCount; n++) if((n!=index)&&(n!=parentIndex)&&(n!=childIndex)) { document.all("menu"+n+"d").style.visibility="hidden"; }    
	   // Show this menu.
		document.all("menu"+index+"d").style.visibility="visible";
	} else if (type==TYPE_COMPLIANT) {
	  // Hide all menus, except 1) This menu, 2) it's parent, and 3) any open child menu.
 	  for (var n=0; n<menuCount; n++) if((n!=index)&&(n!=parentIndex)&&(n!=childIndex)) { document.getElementById("menu"+n+"d").style.visibility="hidden"; }    
	   // Show this menu.
		document.getElementById("menu"+index+"d").style.visibility="visible";

	}

}


// Hides a menu...
function hideMenu(index) {

	// Just leave alone if this menu still has mouse over it, or has an open child with the mouse.
	if(menus[index].hasMouse) return;	
	if(menus[index].childMenuOpen > -1) {
		if (menus[menus[index].childMenuOpen].hasMouse) return;
	}
	
	// If this window has an open child, shut it down, too:
	if (menus[index].childMenuOpen > -1){
	   hideMenu(menus[index].childMenuOpen);  // Recursive call!
	   menus[index].childMenuOpen =-1;
	}
	
	if (type==TYPE_NS4) {		// For Netscape browsers
		document.layers[index].visibility="hidden";
	} else if (type==TYPE_IE4) {	// For IE browsers
		document.all("menu"+index+"d").style.visibility="hidden";
	} else if (type==TYPE_COMPLIANT) {
		document.getElementById("menu"+index+"d").style.visibility="hidden";
	}

	if ((getLock(index) == true)&&(menus[index].parentMenuIndex==-1)){	// Clear lock for root menus only
		// Image restore goes here
		clearLock(index);
	}

    if (index == 1) {
        document.getElementById("b").src = "http://www.thegardendecorstore.com/images/outdoor_decor.gif";
        } else if (index == 2) {
        document.getElementById("c").src = "http://www.thegardendecorstore.com/images/water_features.gif";
        } else if (index == 3) {
        document.getElementById("d").src = "http://www.thegardendecorstore.com/images/garden_structures.gif";
        } else if (index == 4) {
        document.getElementById("e").src = "http://www.thegardendecorstore.com/images/outdoor_furniture.gif";
        } else if (index == 5) {
        document.getElementById("f").src = "http://www.thegardendecorstore.com/images/backyard_entertaining.gif";
        } else if (index == 6) {
        document.getElementById("g").src = "http://www.thegardendecorstore.com/images/garden_nursery.gif";
        } else if (index == 7) {
        document.getElementById("h").src = "http://www.thegardendecorstore.com/images/garden_tools.gif";
        } else if (index == 8) {
        document.getElementById("j").src = "http://www.thegardendecorstore.com/images/pest_control.gif";
    }
}

function buttonOn(index) {
    if (index == 0) {
        document.getElementById("a").src = "http://www.thegardendecorstore.com//images/home_btn_ro.gif";
        }
}

function buttonOff(index) {
    if (index == 0) {
        document.getElementById("a").src = "http://www.thegardendecorstore.com//images/home_btn.gif";
        }
}

function onMouseOverItem (index1, index2) {
		 
	// Highlight the menu:
	if (type==TYPE_NS4) {
		document.layers[index1].layers[index2].bgColor=highlightColor;
	} else if (type==TYPE_IE4) {
		document.all("menu"+index1+index2).style.background=highlightColor;
	} else if (type==TYPE_COMPLIANT){
	    	document.getElementById("menu"+index1+index2).style.background="#00FF00";
	}

	// Hide any popout (children) menus that may be visible from previously:
	if(menus[index1].childMenuOpen > -1)
			hideMenu(menus[index1].childMenuOpen);
								   
	// If this item has a popout child, show the child:
	if ((menus[index1].children[index2].childMenuIndex) > -1){			   	  	   // Do we have a child menu?
	   menus[index1].childMenuOpen=menus[index1].children[index2].childMenuIndex;  // Remember which child is open
	   showMenu(menus[index1].children[index2].childMenuIndex);					   // Open the child	  
	   }
}

function onMouseOutItem (index1, index2) {

	if(menus[index1].children[index2].transparent) itemColor="";
	else    itemColor=menuItemColor;												

	if (type==TYPE_NS4) {
		document.layers[index1].layers[index2].bgColor=menuItemColor;
	} else if (type==TYPE_IE4) {
		document.all("menu"+index1+index2).style.background=itemColor;
	} else if (type==TYPE_COMPLIANT) {
		document.getElementById("menu"+index1+index2).style.background=itemColor;
	}
}

// Draws the menus.
function drawMenus () {

addMenu(11,258);
addMenu(88,208);
addExpandableMenuItem("Garden Statuary","http://www.thegardendecorstore.com/garden_statuary.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",9);
addMenuItem("Bird Baths","http://www.thegardendecorstore.com/bird_baths.html","");
addExpandableMenuItem("Bird Houses","http://www.thegardendecorstore.com/bird_houses.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",10);
addExpandableMenuItem("Bird Feeders","http://www.thegardendecorstore.com/bird_feeders.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",11);
addMenuItem("Decorative Finials","http://www.thegardendecorstore.com/decorative_finials.html","");
addExpandableMenuItem("Garden Lighting","http://www.thegardendecorstore.com/garden_lighting.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",12);
addExpandableMenuItem("Garden Ornaments","http://www.thegardendecorstore.com/garden_ornaments.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",13);
addExpandableMenuItem("Outdoor Wall Decor","http://www.thegardendecorstore.com/outdoor_wall_decor.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",14);
addMenuItem("Garden Screens","http://www.thegardendecorstore.com/garden_screens.html","");
addMenuItem("Garden Signs","http://www.thegardendecorstore.com/garden_signs.html","");
addMenuItem("Landscape Edging","http://www.thegardendecorstore.com/landscape_edging.html","");
addMenuItem("Mailboxes","http://www.thegardendecorstore.com/mailboxes.html","");
addExpandableMenuItem("Memorial Markers","http://www.thegardendecorstore.com/memorial_markers.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",15);
addMenuItem("Outdoor Mats","http://www.thegardendecorstore.com/outdoor_mats.html","");
addExpandableMenuItem("Outdoor Planters","http://www.thegardendecorstore.com/outdoor_planters.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",16);
addMenuItem("Rain Chains","http://www.thegardendecorstore.com/rain_chains.html","");
addMenuItem("Rain Gauges","http://www.thegardendecorstore.com/rain_gauges.html","");
addMenuItem("Stepping Stones","http://www.thegardendecorstore.com/stepping_stones.html","");
addMenuItem("Weathervanes","http://www.thegardendecorstore.com/weathervanes.html","");
addExpandableMenuItem("Windchimes","http://www.thegardendecorstore.com/windchimes.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",17);
addMenu(165,208);
addMenuItem("Backyard Waterfalls","http://www.thegardendecorstore.com/backyard_waterfalls.html","");
addExpandableMenuItem("Garden Water Fountains","http://www.thegardendecorstore.com/garden_water_fountains.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",18);
addMenuItem("Pond Supplies","http://www.thegardendecorstore.com/pond_supplies.html","");
addMenu(242,208);
addMenuItem("Garden Arbors","http://www.thegardendecorstore.com/garden_arbors.html","");
addMenuItem("Garden Arches","http://www.thegardendecorstore.com/garden_arches.html","");
addMenuItem("Garden Bridges","http://www.thegardendecorstore.com/garden_bridges.html","");
addMenuItem("Garden Trellises","http://www.thegardendecorstore.com/garden_trellises.html","");
addMenuItem("Home Windmills","http://www.thegardendecorstore.com/home_windmills.html","");
addMenuItem("Outdoor Gazebos","http://www.thegardendecorstore.com/outdoor_gazebos.html","");
addMenuItem("Outdoor Playhouses","http://www.thegardendecorstore.com/outdoor_playhouses.html","");
addMenuItem("Pergolas","http://www.thegardendecorstore.com/pergolas.html","");
addMenuItem("Shade Sails","http://www.thegardendecorstore.com/shade_sails.html","");
addMenuItem("Wishing Wells","http://www.thegardendecorstore.com/wishing_wells.html","");
addMenu(319,208);
addExpandableMenuItem("Garden Swings","http://www.thegardendecorstore.com/garden_swings.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",19);
addMenuItem("Outdoor Benches","http://www.thegardendecorstore.com/outdoor_benches.html","");
addExpandableMenuItem("Outdoor Chairs","http://www.thegardendecorstore.com/outdoor_chairs.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",20);
addMenuItem("Outdoor Tables","http://www.thegardendecorstore.com/outdoor_tables.html","");
addExpandableMenuItem("Patio Furniture","http://www.thegardendecorstore.com/patio_furniture.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",21);
addMenuItem("Storage Benches","http://www.thegardendecorstore.com/storage_benches.html","");
addMenu(396,208);
addMenuItem("Outdoor Fire Pits","http://www.thegardendecorstore.com/outdoor_fire_pits.html","");
addMenuItem("Outdoor Rugs","http://www.thegardendecorstore.com/outdoor_rugs.html","");
addMenuItem("Patio Shades","http://www.thegardendecorstore.com/patio_shades.html","");
addExpandableMenuItem("Outdoor Grills","http://www.thegardendecorstore.com/outdoor_grills.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",22);
addMenu(473,208);
addMenuItem("Ferns","http://www.thegardendecorstore.com/ferns.html","");
addMenuItem("Garden Fertilizer","http://www.thegardendecorstore.com/garden_fertilizer.html","");
addExpandableMenuItem("Garden Seeds","http://www.thegardendecorstore.com/garden_seeds.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",23);
addMenuItem("Ornamental Grasses","http://www.thegardendecorstore.com/ornamental_grasses.html","");
addExpandableMenuItem("Plant Nursery","http://www.thegardendecorstore.com/plant_nursery.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",24);
addMenuItem("Shrub Plants","http://www.thegardendecorstore.com/shrub_plants.html","");
addMenuItem("Tree Nursery","http://www.thegardendecorstore.com/tree_nursery.html","");
addMenuItem("Gardening Supplies","http://www.thegardendecorstore.com/gardening_supplies.html","");
addMenuItem("Greenhouse Supplies","http://www.thegardendecorstore.com/greenhouse_supplies.html","");
addMenu(550,208);
addMenuItem("Childrens Garden Tools","http://www.thegardendecorstore.com/childrens_garden_tools.html","");
addMenuItem("Compost Bins","http://www.thegardendecorstore.com/compost_bins.html","");
addMenuItem("Garden Carts","http://www.thegardendecorstore.com/garden_carts.html","");
addMenuItem("Garden Tool Organizers","http://www.thegardendecorstore.com/garden_tool_organizers.html","");
addMenuItem("Hand Garden Tools","http://www.thegardendecorstore.com/hand_garden_tools.html","");
addExpandableMenuItem("Watering Supplies","http://www.thegardendecorstore.com/watering_supplies.html","http://www.thegardendecorstore.com/images/arrow_bg.jpg",25);
addMenu(627,208);
addMenuItem("Insecticides","http://www.thegardendecorstore.com/insecticides.html","");
addMenuItem("Animal Repellants","http://www.thegardendecorstore.com/insect_repellants.html","");
addMenu(263,208);
addMenuItem("Angel Statues","http://www.thegardendecorstore.com/angel_statues.html","");
addMenuItem("Brass Statues","http://www.thegardendecorstore.com/brass_statues.html","");
addMenuItem("Bronze Statues","http://www.thegardendecorstore.com/bronze_statues.html","");
addMenuItem("Cat Statues","http://www.thegardendecorstore.com/cat_statues.html","");
addMenuItem("Cherub Statues","http://www.thegardendecorstore.com/cherub_statues.html","");
addMenuItem("Crane Garden Statues","http://www.thegardendecorstore.com/crane_garden_statues.html","");
addMenuItem("Display Pedestals","http://www.thegardendecorstore.com/display_pedestals.html","");
addMenuItem("Dog Statues","http://www.thegardendecorstore.com/dog_statues.html","");
addMenuItem("Fairy Statues","http://www.thegardendecorstore.com/fairy_statues.html","");
addMenuItem("Frog Statues","http://www.thegardendecorstore.com/frog_statues.html","");
addMenuItem("Garden Obelisks","http://www.thegardendecorstore.com/garden_obelisks.html","");
addMenuItem("Gargoyle Statues","http://www.thegardendecorstore.com/gargoyle_statues.html","");
addMenuItem("Greek Statues","http://www.thegardendecorstore.com/greek_statues.html","");
addMenuItem("Horse Statues","http://www.thegardendecorstore.com/horse_statues.html","");
addMenuItem("Lawn Jockeys","http://www.thegardendecorstore.com/lawn_jockeys.html","");
addMenuItem("Lion Statues","http://www.thegardendecorstore.com/lion_statues.html","");
addMenuItem("Oriental Statues","http://www.thegardendecorstore.com/oriental_statues.html","");
addMenuItem("Outdoor Nativity Scene","http://www.thegardendecorstore.com/outdoor_nativity_scene.html","");
addMenuItem("Religious Statues","http://www.thegardendecorstore.com/religious_statues.html","");
addMenuItem("Roman Statues","http://www.thegardendecorstore.com/roman_statues.html","");
addMenuItem("St Francis Statues","http://www.thegardendecorstore.com/st_francis_statues.html","");
addMenuItem("Virgin Mary Statues","http://www.thegardendecorstore.com/virgin_mary_statues.html","");
addMenuItem("Yard Statues","http://www.thegardendecorstore.com/yard_statues.html","");
addMenu(263,240);
addMenuItem("Decorative Bird Houses","http://www.thegardendecorstore.com/decorative_bird_houses.html","");
addMenuItem("Church Birdhouses","http://www.thegardendecorstore.com/church_birdhouses.html","");
addMenuItem("Victorian Birdhouses","http://www.thegardendecorstore.com/victorian_birdhouses.html","");
addMenuItem("Wooden Birdhouses","http://www.thegardendecorstore.com/wooden_birdhouses.html","");
addMenuItem("Purple Martin Bird Houses","http://www.thegardendecorstore.com/purple_martin_bird_houses.html","");
addMenuItem("Birdhouse Gourds","http://www.thegardendecorstore.com/birdhouse_gourds.html","");
addMenuItem("Butterfly Houses","http://www.thegardendecorstore.com/butterfly_houses.html","");
addMenuItem("Bat Houses","http://www.thegardendecorstore.com/bat_houses.html","");
addMenu(263,256);
addMenuItem("Decorative Bird Feeders","http://www.thegardendecorstore.com/decorative_bird_feeders.html","");
addMenuItem("Hanging Bird Feeders","http://www.thegardendecorstore.com/hanging_bird_feeders.html","");
addMenuItem("Hummingbird Feeders","http://www.thegardendecorstore.com/hummingbird_feeders.html","");
addMenuItem("Squirrel Proof Bird Feeders","http://www.thegardendecorstore.com/squirrel_proof_bird_feeders.html","");
addMenuItem("Window Bird Feeders","http://www.thegardendecorstore.com/window_bird_feeders.html","");
addMenuItem("Bird Seed","http://www.thegardendecorstore.com/bird_seed.html","");
addMenu(263,288);
addMenuItem("Outdoor Candle Lanterns","http://www.thegardendecorstore.com/outdoor_candle_lanterns.html","");
addMenuItem("Lamp Posts","http://www.thegardendecorstore.com/lamp_posts.html","");
addMenuItem("Outdoor Light Fixtures","http://www.thegardendecorstore.com/outdoor_light_fixtures.html","");
addMenuItem("Lighthouse Lamps","http://www.thegardendecorstore.com/lighthouse_lamps.html","");
addMenuItem("Tiki Torches","http://www.thegardendecorstore.com/tiki_torches.html","");
addMenuItem("Outdoor Table Lamps","http://www.thegardendecorstore.com/outdoor_table_lamps.html","");
addMenuItem("Outdoor Floor Lamps","http://www.thegardendecorstore.com/outdoor_floor_lamps.html","");
addMenuItem("Camping Lanterns","http://www.thegardendecorstore.com/camping_lanterns.html","");
addMenu(263,304);
addMenuItem("Armillary Sundials","http://www.thegardendecorstore.com/armillary_sundials.html","");
addMenuItem("Fake Rocks","http://www.thegardendecorstore.com/fake_rocks.html","");
addMenuItem("Garden Bells","http://www.thegardendecorstore.com/garden_bells.html","");
addMenuItem("Garden Gazing Balls","http://www.thegardendecorstore.com/garden_gazing_balls.html","");
addMenuItem("Garden Globes","http://www.thegardendecorstore.com/garden_globes.html","");
addMenuItem("Garden Gnomes","http://www.thegardendecorstore.com/garden_gnomes.html","");
addMenuItem("Garden Stakes","http://www.thegardendecorstore.com/garden_stakes.html","");
addMenuItem("Garden Whirligigs","http://www.thegardendecorstore.com/garden_whirligigs.html","");
addMenuItem("Topiary Frames","http://www.thegardendecorstore.com/topiary_frames.html","");
addMenu(263,320);
addMenuItem("Door Knockers","http://www.thegardendecorstore.com/door_knockers.html","");
addMenuItem("Doorbells","http://www.thegardendecorstore.com/doorbells.html","");
addMenuItem("Garden Clocks","http://www.thegardendecorstore.com/garden_clocks.html","");
addMenuItem("Garden Flags","http://www.thegardendecorstore.com/garden_flags.html","");
addMenuItem("Garden Plaques","http://www.thegardendecorstore.com/garden_plaques.html","");
addMenuItem("Garden Thermometers","http://www.thegardendecorstore.com/garden_thermometers.html","");
addMenuItem("House Number Plaques","http://www.thegardendecorstore.com/house_number_plaques.html","");
addMenuItem("Outdoor Wall Art","http://www.thegardendecorstore.com/outdoor_wall_art.html","");
addMenuItem("Personalized Plaques","http://www.thegardendecorstore.com/personalized_plaques.html","");
addMenu(263,400);
addMenuItem("Memorial Plaques","http://www.thegardendecorstore.com/memorial_plaques.html","");
addMenuItem("Pet Memorial Markers","http://www.thegardendecorstore.com/pet_memorial_markers.html","");
addMenu(263,432);
addMenuItem("Garden Plant Stands","http://www.thegardendecorstore.com/garden_plant_stands.html","");
addMenuItem("Garden Urns","http://www.thegardendecorstore.com/garden_urns.html","");
addMenuItem("Hanging Planters","http://www.thegardendecorstore.com/hanging_planters.html","");
addMenuItem("Raised Planting Beds","http://www.thegardendecorstore.com/raised_planting_beds.html","");
addMenuItem("Specialty Planters","http://www.thegardendecorstore.com/specialty_planters.html","");
addMenuItem("Wall Planters","http://www.thegardendecorstore.com/wall_planters.html","");
addMenuItem("Window Planters","http://www.thegardendecorstore.com/window_planters.html","");
addMenuItem("Wooden Planters","http://www.thegardendecorstore.com/wooden_planters.html","");
addMenu(263,512);
addMenuItem("Outdoor Wind Chimes","http://www.thegardendecorstore.com/outdoor_wind_chimes.html","");
addMenuItem("Wind Bells","http://www.thegardendecorstore.com/wind_bells.html","");
addMenu(340,224);
addMenuItem("Fountain Pumps","http://www.thegardendecorstore.com/fountain_pumps.html","");
addMenuItem("Garden Fountains","http://www.thegardendecorstore.com/garden_fountains.html","");
addMenuItem("Pond Fountains","http://www.thegardendecorstore.com/pond_fountains.html","");
addMenuItem("Solar Fountains","http://www.thegardendecorstore.com/solar_fountains.html","");
addMenuItem("Wall Fountains","http://www.thegardendecorstore.com/wall_fountains.html","");
addMenuItem("Tabletop Fountains","http://www.thegardendecorstore.com/tabletop_fountains.html","");
addMenuItem("Fountain Covers","http://www.thegardendecorstore.com/fountain_covers.html","");
addMenu(494,208);
addMenuItem("Hammock Swings","http://www.thegardendecorstore.com/hammock_swings.html","");
addMenuItem("Outdoor Swings","http://www.thegardendecorstore.com/outdoor_swings.html","");
addMenuItem("Porch Swings","http://www.thegardendecorstore.com/porch_swings.html","");
addMenu(494,240);
addMenuItem("Adirondack Chairs","http://www.thegardendecorstore.com/adirondack_chairs.html","");
addMenuItem("Outdoor Glider Furniture","http://www.thegardendecorstore.com/outdoor_glider_furniture.html","");
addMenu(494,272);
addMenuItem("Outdoor Patio Furniture Sets","http://www.thegardendecorstore.com/outdoor_patio_furniture_sets.html","");
addMenuItem("Outdoor Patio Heaters","http://www.thegardendecorstore.com/outdoor_patio_heaters.html","");
addMenuItem("Patio Chairs","http://www.thegardendecorstore.com/patio_chairs.html","");
addMenuItem("Patio Furniture Covers","http://www.thegardendecorstore.com/patio_furniture_covers.html","");
addMenuItem("Patio Umbrellas","http://www.thegardendecorstore.com/patio_umbrellas.html","");
addMenu(571,256);
addMenuItem("Gas Grills","http://www.thegardendecorstore.com/gas_grills.html","");
addMenuItem("Charcoal Grills","http://www.thegardendecorstore.com/charcoal_grills.html","");
addMenuItem("Grilling Accessories","http://www.thegardendecorstore.com/grilling_accessories.html","");
addMenu(648,240);
addMenuItem("Flower Seeds","http://www.thegardendecorstore.com/flower_seeds.html","");
addMenuItem("Grass Seed","http://www.thegardendecorstore.com/grass_seed.html","");
addMenuItem("Herb Seeds","http://www.thegardendecorstore.com/herb_seeds.html","");
addMenuItem("Plant Seeds","http://www.thegardendecorstore.com/plant_seeds.html","");
addMenuItem("Vegetable Seeds","http://www.thegardendecorstore.com/vegetable_seeds.html","");
addMenu(648,272);
addMenuItem("Flowering Plants","http://www.thegardendecorstore.com/flowering_plants.html","");
addMenuItem("Fruit Plants","http://www.thegardendecorstore.com/fruit_plants.html","");
addMenuItem("Garden Plants","http://www.thegardendecorstore.com/garden_plants.html","");
addMenuItem("Ground Covers","http://www.thegardendecorstore.com/ground_covers.html","");
addMenuItem("Vegetable Plants","http://www.thegardendecorstore.com/vegetable_plants.html","");
addMenuItem("Vine Plants","http://www.thegardendecorstore.com/vine_plants.html","");
addMenu(725,288);
addMenuItem("Garden Hose Reels","http://www.thegardendecorstore.com/garden_hose_reels.html","");
addMenuItem("Garden Sprinklers","http://www.thegardendecorstore.com/garden_sprinklers.html","");
addMenuItem("Garden Water Hoses","http://www.thegardendecorstore.com/garden_water_hoses.html","");
addMenuItem("Outdoor Faucets","http://www.thegardendecorstore.com/outdoor_faucets.html","");



    // Loop through the menu items, looking for items that are parents of submenus.
	// For each one we find, set it's child menu's parentMenuIndex.
	for (var n=0; n<menuCount; n++) {
		for (var m=0; m<menus[n].childCount; m++) {
			if (menus[n].children[m].childMenuIndex > -1)
			   menus[menus[n].children[m].childMenuIndex].parentMenuIndex=n;
		}
	}
				
	if (type==TYPE_NS4) {			// Draw Netscape menus.

		for (var curMenu=0; curMenu<menuCount; curMenu++) {
		       document.writeln("<layer visibility='hidden' width='"+(itemWidth+(2*borderWidth))+"' height='"+((itemHeight+borderHeight)*(menus[curMenu].childCount)+borderHeight)+"' pagex='"+menus[curMenu].left+"' pagey='"+menus[curMenu].top+"' bgcolor='#00FF00' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");


			for (var curItem=0; curItem<menus[curMenu].childCount; curItem++) {
				document.write("<layer width='"+itemWidth+"' height='"+itemHeight+"' top='"+(borderHeight+(curItem*(itemHeight+borderHeight)))+"' left='"+borderWidth+"' bgcolor='"+menuItemColor+"'><center><table cellspacing='0' cellpadding='0' border='0' background='"+menus[curMenu].children[curItem].background+"' width='"+(itemWidth-(2*paddingWidth))+"' height='"+(itemHeight-(2*paddingHeight))+"'><tr><td align='"+hAlign+"' valign='"+vAlign+"'><a class='"+anchorClass+"' href='"+menus[curMenu].children[curItem].url+"'  onmouseover='onMouseOverItem("+curMenu+","+curItem+")' onmouseout='onMouseOutItem("+curMenu+","+curItem+")'>");
				document.write(itemTagsOpen+menus[curMenu].children[curItem].html+itemTagsClose);
				document.writeln("</a></td></tr></table></center></layer>");
			}
			document.writeln("</layer>");
		}

	} else if ((type==TYPE_IE4)||(type==TYPE_COMPLIANT)) {		// Draw IE menus.

		for (var curMenu=0; curMenu<menuCount; curMenu++) {
                  document.writeln("<div id='menu"+curMenu+"d' style='background:#00FF00;position:absolute;visibility:hidden;width:"+(itemWidth+(2*borderWidth))+";height:"+((itemHeight+borderHeight)*(menus[curMenu].childCount)+borderHeight)+";left:"+menus[curMenu].left+";top:"+menus[curMenu].top+";' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
            
			for (var curItem=0; curItem<menus[curMenu].childCount; curItem++) {
				if(menus[curMenu].children[curItem].transparent) itemColor="";
				else    itemColor=menuItemColor;												
				document.write("<div id='menu"+curMenu+""+curItem+"' style='background:"+itemColor+";position:absolute;width:"+itemWidth+";height:"+itemHeight+";top:"+(borderHeight+(curItem*(itemHeight+borderHeight)))+";left:"+borderWidth+";' bgcolor='"+menuItemColor+"'><center><table cellspacing='0' cellpadding='0' border='0' background='"+menus[curMenu].children[curItem].background+"' width='"+(itemWidth-(2*paddingWidth))+"' height='"+(itemHeight-(2*paddingHeight))+"'><tr><td align='"+hAlign+"' valign='"+vAlign+"'><a href='"+menus[curMenu].children[curItem].url+"' class='"+anchorClass+"' onmouseover='onMouseOverItem("+curMenu+","+curItem+")' onmouseout='onMouseOutItem("+curMenu+","+curItem+")'>");
				document.write(itemTagsOpen+menus[curMenu].children[curItem].html+itemTagsClose);
				document.writeln("</a></td></tr></table></center></div>");
			}
			document.writeln("</div>");
		}



	}

}


// Adds a menu to the list 
function addMenu (left,top) {
		 if(type==TYPE_IE4) 
		 		 menus[menuCount]=new menu(left,top);
		 else
		 		 menus.push(new menu(left,top));

		 menuCount++;
		 
}

// Adds a submenu item to the current menu item 
function addMenuItem (html,url,background) {
		 if (type==TYPE_IE4)
		 	menus[menuCount-1].children[(menus[menuCount-1].childCount)]=new menuItem(html,url,background);
		 else
		 	 menus[menuCount-1].children.push(new menuItem(html,url,background));

		 menus[menuCount-1].childCount++;
}

// Adds an expandable submenu item to the current menu item 
function addExpandableMenuItem (html,url,background,index) {
		 // Add the menu item:
		 addMenuItem (html,url,background);
		 // Set the item's child index:
		 menus[menuCount-1].children[(menus[menuCount-1].childCount-1)].childMenuIndex=index;
}

// Makes the previous entry transparent:
function makeTransparent() {
		 menus[menuCount-1].children[(menus[menuCount-1].childCount)-1].transparent=true;
}


function goToDirectory(inURL) {
   window.location = "http://"+inURL+".com/resources/favoritelinks.html"; 
}

function showStatus(inURL) {
   window.status="http://"+inURL+".com/resources/favoritelinks.html";
   document.all("directory").style.cursor = 'hand';
}

function hideStatus() {
   window.status=""; 
}

function mailpage()
{
  mail_str = "mailto:?subject= Check this page out: " + document.title;
  mail_str += "&body= I thought you might be interested in the " + document.title;
  mail_str += ". You can check this out at: " + location.href + "?source=EmailFriend"; 
  location.href = mail_str;
}

function bookmark(url,title)
{
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}
