//
// 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 == 0) {
	  event.srcElement.src = "http://www.home-n-gifts.com/images/home_furn_btn_ro.gif";
	}
	 else if (index == 1) {
	  event.srcElement.src = "http://www.home-n-gifts.com/images/home_decor_btn_ro.gif";
	} else if (index == 2) {
	  event.srcElement.src = "http://www.home-n-gifts.com/images/gifts_btn_ro.gif";
	} else if (index == 3) {
	  event.srcElement.src = "http://www.home-n-gifts.com/images/garden_decor_btn_ro.gif";
	} else if (index == 4) {
	  event.srcElement.src = "http://www.home-n-gifts.com/images/figurines_btn_ro.gif";
	} else if (index == 5) {
	  event.srcElement.src = "http://www.home-n-gifts.com/images/aromatherapy_btn_ro.gif";
	} else if (index == 6) {
	  event.srcElement.src = "http://www.home-n-gifts.com/images/kitchenware_btn_ro.gif";
	} else if (index == 7) {
	  event.srcElement.src = "http://www.home-n-gifts.com/images/collectibles_btn_ro.gif";
	} else if (index == 8) {
	  event.srcElement.src = "http://www.home-n-gifts.com/images/jewelry_btn_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 == 0) {
        document.getElementById("a").src = "http://www.home-n-gifts.com/images/home_furn_btn.gif";
	} else if (index == 1) {
        document.getElementById("b").src = "http://www.home-n-gifts.com/images/home_decor_btn.gif";
	} else if (index == 2) {
        document.getElementById("c").src = "http://www.home-n-gifts.com/images/gifts_btn.gif";
   	} else if (index == 3) {
        document.getElementById("d").src = "http://www.home-n-gifts.com/images/garden_decor_btn.gif";
	} else if (index == 4) {
        document.getElementById("e").src = "http://www.home-n-gifts.com/images/figurines_btn.gif";
	} else if (index == 5) {
        document.getElementById("f").src = "http://www.home-n-gifts.com/images/aromatherapy_btn.gif";
	} else if (index == 6) {
        document.getElementById("g").src = "http://www.home-n-gifts.com/images/kitchenware_btn.gif";
	} else if (index == 7) {
        document.getElementById("h").src = "http://www.home-n-gifts.com/images/collectibles_btn.gif";
	} else if (index == 8) {
        document.getElementById("j").src = "http://www.home-n-gifts.com/images/jewelry_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){
	    if (index1 == 0) {
	    	document.getElementById("menu"+index1+index2).style.background="#cc3333";
	    } else if (index1 == 1) {
	    	document.getElementById("menu"+index1+index2).style.background="#b2b2b2";
	    } else if (index1 == 2) {
	    	document.getElementById("menu"+index1+index2).style.background="#d200d5";
	    } else if (index1 == 3) {
	    	document.getElementById("menu"+index1+index2).style.background="#00ae04";
	    } else if (index1 == 4) {
	    	document.getElementById("menu"+index1+index2).style.background="#927241";
	    } else if (index1 == 5) {
	    	document.getElementById("menu"+index1+index2).style.background="#7c3384";
	    } else if (index1 == 6) {
	    	document.getElementById("menu"+index1+index2).style.background="#66cc33";
	    } else if (index1 == 7) {
	    	document.getElementById("menu"+index1+index2).style.background="#ff8000";
	    } else if (index1 == 8) {
	    	document.getElementById("menu"+index1+index2).style.background="#00c6c6";
	    } else if (index1 == 9) {       //animal figurines
	    	document.getElementById("menu"+index1+index2).style.background="#927241";
	    } else if (index1 == 10) {      //aquatic figurines
	    	document.getElementById("menu"+index1+index2).style.background="#927241";
	    } else if (index1 == 11) {      //bird figurines
	    	document.getElementById("menu"+index1+index2).style.background="#927241";
	    } else if (index1 == 12) {
	    	document.getElementById("menu"+index1+index2).style.background="#cc3333";
	    } else if (index1 == 13) {
	    	document.getElementById("menu"+index1+index2).style.background="#cc3333";
	    } else if (index1 == 14) {
	    	document.getElementById("menu"+index1+index2).style.background="#cc3333";
	    } else if (index1 == 15) {
	    	document.getElementById("menu"+index1+index2).style.background="#cc3333";
	    } else if (index1 == 16) {
	    	document.getElementById("menu"+index1+index2).style.background="#cc3333";
	    } else if (index1 == 17) {
	    	document.getElementById("menu"+index1+index2).style.background="#cc3333";
	    } else if (index1 == 18) {
	    	document.getElementById("menu"+index1+index2).style.background="#00ae04";
	    } else if (index1 == 19) {
	    	document.getElementById("menu"+index1+index2).style.background="#7c3384";
	    } else if (index1 == 20) {
	    	document.getElementById("menu"+index1+index2).style.background="#7c3384";
	    } else if (index1 == 21) {
	    	document.getElementById("menu"+index1+index2).style.background="#66cc33";
	    } else if (index1 == 22) {
	    	document.getElementById("menu"+index1+index2).style.background="#66cc33";
	    } else if (index1 == 23) {
	    	document.getElementById("menu"+index1+index2).style.background="#b2b2b2";
	    } else if (index1 == 24) {
	    	document.getElementById("menu"+index1+index2).style.background="#b2b2b2";
	    } else if (index1 == 25) {
	    	document.getElementById("menu"+index1+index2).style.background="#b2b2b2";
	    } else if (index1 == 26) {
	    	document.getElementById("menu"+index1+index2).style.background="#b2b2b2";
	    } else if (index1 == 27) {
	    	document.getElementById("menu"+index1+index2).style.background="#b2b2b2";
	    } else if (index1 == 28) {
	    	document.getElementById("menu"+index1+index2).style.background="#b2b2b2";
	    } else if (index1 == 29) {
	    	document.getElementById("menu"+index1+index2).style.background="#b2b2b2";
       }
	}

	// 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,163);
addExpandableMenuItem("Cabinets","http://www.home-n-gifts.com/cabinets.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",12);
addExpandableMenuItem("Clocks","http://www.home-n-gifts.com/clocks.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",13);
addMenuItem("Fireplace Screens","http://www.home-n-gifts.com/fireplace_screens.html","");
addMenuItem("Foot Stools","http://www.home-n-gifts.com/foot_stools.html","");
addExpandableMenuItem("Home Lighting","http://www.home-n-gifts.com/home_lighting.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",14);
addExpandableMenuItem("Lamps","http://www.home-n-gifts.com/lamps.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",15);
addExpandableMenuItem("Racks","http://www.home-n-gifts.com/racks.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",16);
addMenuItem("Room Divider Screens","http://www.home-n-gifts.com/room_divider_screens.html","");
addExpandableMenuItem("Shelves","http://www.home-n-gifts.com/shelves.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",17);
addMenuItem("Tables","http://www.home-n-gifts.com/tables.html","");
addMenuItem("Wall Mirrors","http://www.home-n-gifts.com/wall_mirrors.html","");
addMenuItem("Wine Racks","http://www.home-n-gifts.com/wine_racks.html","");
addMenu(88,163);
addExpandableMenuItem("Home Decor Ideas","http://www.home-n-gifts.com/home_decor_ideas.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",29);
addExpandableMenuItem("Room Decor","http://www.home-n-gifts.com/room_decor.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",23);
addExpandableMenuItem("Linens and Things","http://www.home-n-gifts.com/linens_and_things.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",24);
addExpandableMenuItem("Wall Decor","http://www.home-n-gifts.com/wall_decor.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",27);
addMenuItem("Bookends","http://www.home-n-gifts.com/bookends.html","");
addMenuItem("Compotes","http://www.home-n-gifts.com/compotes.html","");
addMenuItem("Decorative Plates","http://www.home-n-gifts.com/decorative_plates.html","");
addMenuItem("Desk Accessories","http://www.home-n-gifts.com/desk_accessories.html","");
addExpandableMenuItem("Picture Frames","http://www.home-n-gifts.com/picture_frames.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",28);
addExpandableMenuItem("Vases","http://www.home-n-gifts.com/vases.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",25);
addExpandableMenuItem("Christmas Decorations","http://www.home-n-gifts.com/christmas_decorations.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",26);
addMenuItem("Easter Decorations","http://www.home-n-gifts.com/easter_decorations.html","");
addMenuItem("Halloween Decorations","http://www.home-n-gifts.com/halloween_decorations.html","");
addMenuItem("Desktop Fountains","http://www.home-n-gifts.com/indoor_fountains.html","");
addMenu(165,163);
addMenuItem("Birthday Gifts","http://www.home-n-gifts.com/birthday_gifts.html","");
addMenuItem("Christmas Gifts","http://www.home-n-gifts.com/christmas_gifts.html","");
addMenuItem("Father's Day Gifts","http://www.home-n-gifts.com/fathers_day_gifts.html","");
addMenuItem("Mother's Day Gifts","http://www.home-n-gifts.com/mothers_day_gifts.html","");
addMenuItem("Graduation Gifts","http://www.home-n-gifts.com/graduation_gifts.html","");
addMenuItem("Valentines Day Gifts","http://www.home-n-gifts.com/valentines_day_gifts.html","");
addMenuItem("Wedding Gifts","http://www.home-n-gifts.com/wedding_gifts.html","");
addMenuItem("Gifts For Him","http://www.home-n-gifts.com/gifts_for_him.html","");
addMenuItem("Gifts For Her","http://www.home-n-gifts.com/gifts_for_her.html","");
addMenuItem("Baby Gifts","http://www.home-n-gifts.com/baby_gifts.html","");
addMenuItem("Gifts For Boys","http://www.home-n-gifts.com/gifts_for_boys.html","");
addMenuItem("Gifts For Girls","http://www.home-n-gifts.com/gifts_for_girls.html","");
addMenuItem("Corporate Gifts","http://www.home-n-gifts.com/corporate_gifts.html","");
addMenuItem("Christian Gifts","http://www.home-n-gifts.com/christian_gifts.html","");
addMenuItem("Bath and Body","http://www.home-n-gifts.com/bath_and_body.html","");
addMenuItem("Pet Lover Gifts","http://www.home-n-gifts.com/pet_lover_gifts.html","");
addMenuItem("Games","http://www.home-n-gifts.com/games.html","");
addMenuItem("Toys","http://www.home-n-gifts.com/toys.html","");
addMenuItem("Golf Gifts","http://www.home-n-gifts.com/golf_gifts.html","");
addMenuItem("Artificial Flowers","http://www.home-n-gifts.com/artificial_flowers.html","");
addMenuItem("Carrying Cases","http://www.home-n-gifts.com/carrying_cases.html","");
addMenuItem("Clothing","http://www.home-n-gifts.com/clothing.html","");
addMenu(242,163);
addMenuItem("Bird Baths","http://www.home-n-gifts.com/bird_baths.html","");
addMenuItem("Bird Feeders","http://www.home-n-gifts.com/bird_feeders.html","");
addMenuItem("Bird Houses","http://www.home-n-gifts.com/bird_houses.html","");
addMenuItem("Butterfly Garden","http://www.home-n-gifts.com/butterfly_garden.html","");
addMenuItem("Candle Lanterns","http://www.home-n-gifts.com/candle_lanterns.html","");
addMenuItem("Garden Angels","http://www.home-n-gifts.com/garden_angels.html","");
addMenuItem("Garden Furniture","http://www.home-n-gifts.com/garden_furniture.html","");
addMenuItem("Garden Plaques","http://www.home-n-gifts.com/garden_plaques.html","");
addMenuItem("Garden Sculptures","http://www.home-n-gifts.com/garden_sculptures.html","");
addMenuItem("Lawn Ornaments","http://www.home-n-gifts.com/lawn_ornaments.html","");
addMenuItem("Plant Stands","http://www.home-n-gifts.com/plant_stands.html","");
addMenuItem("Planters","http://www.home-n-gifts.com/planters.html","");
addMenuItem("Suncatchers","http://www.home-n-gifts.com/suncatchers.html","");
addExpandableMenuItem("Water Fountains","http://www.home-n-gifts.com/water_fountains.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",18);
addMenuItem("Welcome Signs","http://www.home-n-gifts.com/welcome_signs.html","");
addMenuItem("Wind Chimes","http://www.home-n-gifts.com/wind_chimes.html","");
addMenuItem("Wind Twirlers","http://www.home-n-gifts.com/wind_twirlers.html","");
addMenu(319,163);
addMenuItem("African Figurines","http://www.home-n-gifts.com/african_figurines.html","");
addMenuItem("African American Figurines","http://www.home-n-gifts.com/african_american_figurines.html","");
addMenuItem("Angel Figurines","http://www.home-n-gifts.com/angel_figurines.html","");
addExpandableMenuItem("Animal Figurines","http://www.home-n-gifts.com/animal_figurines.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",9);
addExpandableMenuItem("Aquatic Figurines","http://www.home-n-gifts.com/aquatic_figurines.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",10);
addExpandableMenuItem("Bird Figurines","http://www.home-n-gifts.com/bird_figurines.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",11);
addMenuItem("Butterfly Figurines","http://www.home-n-gifts.com/butterfly_figurines.html","");
addMenuItem("Chinese Figurines","http://www.home-n-gifts.com/chinese_figurines.html","");
addMenuItem("Christmas Figurines","http://www.home-n-gifts.com/christmas_figurines.html","");
addMenuItem("Dragon Figurines","http://www.home-n-gifts.com/dragon_figurines.html","");
addMenuItem("Fairy Figurines","http://www.home-n-gifts.com/fairy_figurines.html","");
addMenuItem("Frosted Glass Figurines","http://www.home-n-gifts.com/frosted_glass_figurines.html","");
addMenuItem("Glass Figurines","http://www.home-n-gifts.com/glass_figurines.html","");
addMenuItem("Liberty Bronze Figurines","http://www.home-n-gifts.com/liberty_bronze_figurines.html","");
addMenuItem("Lighthouse Figurines","http://www.home-n-gifts.com/lighthouse_figurines.html","");
addMenuItem("Miniature Figurines","http://www.home-n-gifts.com/miniature_figurines.html","");
addMenuItem("Patchwork Figurines","http://www.home-n-gifts.com/patchwork_figurines.html","");
addMenuItem("Porcelain Figurines","http://www.home-n-gifts.com/porcelain_figurines.html","");
addMenuItem("Religious Figurines","http://www.home-n-gifts.com/religious_figurines.html","");
addMenuItem("Sports Figurines","http://www.home-n-gifts.com/sports_figurines.html","");
addMenuItem("Spun Glass Figurines","http://www.home-n-gifts.com/spun_glass_figurines.html","");
addMenuItem("Unicorn Figurines","http://www.home-n-gifts.com/unicorn_figurines.html","");
addMenuItem("Western Figurines","http://www.home-n-gifts.com/western_figurines.html","");
addMenu(396,163);
addExpandableMenuItem("Candles","http://www.home-n-gifts.com/candles.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",19);
addExpandableMenuItem("Candle Holders","http://www.home-n-gifts.com/candle_holders.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",20);
addMenuItem("Candle Lamps","http://www.home-n-gifts.com/candle_lamps.html","");
addMenuItem("Candle Lanterns","http://www.home-n-gifts.com/candle_lanterns.html","");
addMenuItem("Essential Oils","http://www.home-n-gifts.com/essential_oils.html","");
addMenuItem("Incense","http://www.home-n-gifts.com/incense.html","");
addMenuItem("Incense Burners","http://www.home-n-gifts.com/incense_burners.html","");
addMenuItem("Oil Burners","http://www.home-n-gifts.com/oil_burners.html","");
addMenuItem("Oil Lamps","http://www.home-n-gifts.com/oil_lamps.html","");
addMenuItem("Potpourri","http://www.home-n-gifts.com/potpourri.html","");
addMenu(473,163);
addExpandableMenuItem("Dinnerware Sets","http://www.home-n-gifts.com/dinnerware_sets.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",21);
addExpandableMenuItem("Kitchen Aids","http://www.home-n-gifts.com/kitchen_aids.html","http://www.home-n-gifts.com/images/arrow_bg.jpg",22);
addMenuItem("Kitchen Decor","http://www.home-n-gifts.com/kitchen_decor.html","");
addMenu(550,163);
addMenuItem("Angel Gifts & Collectibles","http://www.home-n-gifts.com/angel_gifts.html","");
addMenuItem("Classic Wheels","http://www.home-n-gifts.com/classic_wheels.html","");
addMenuItem("Cork Sculptures","http://www.home-n-gifts.com/cork_sculptures.html","");
addMenuItem("Daggers","http://www.home-n-gifts.com/daggers.html","");
addMenuItem("Dolphin Gifts & Collectibles","http://www.home-n-gifts.com/dolphin_gifts.html","");
addMenuItem("Eagle Decor & Collectibles","http://www.home-n-gifts.com/eagle_decor.html","");
addMenuItem("Elephant Collectibles & Decor","http://www.home-n-gifts.com/elephant_collectibles.html","");
addMenuItem("John Deere Collectibles","http://www.home-n-gifts.com/john_deere_collectibles.html","");
addMenuItem("Lighthouse Collectibles & Gifts","http://www.home-n-gifts.com/lighthouse_collectibles.html","");
addMenuItem("Model Ships","http://www.home-n-gifts.com/model_ships.html","");
addMenuItem("Musical Carousels","http://www.home-n-gifts.com/musical_carousels.html","");
addMenuItem("Nascar Collectibles","http://www.home-n-gifts.com/nascar_collectibles.html","");
addMenuItem("NFL Merchandise","http://www.home-n-gifts.com/nfl_merchandise.html","");
addMenuItem("Pocket Knives","http://www.home-n-gifts.com/pocket_knives.html","");
addMenuItem("Porcelain Dolls","http://www.home-n-gifts.com/porcelain_dolls.html","");
addMenuItem("Snow Globes","http://www.home-n-gifts.com/snow_globes.html","");
addMenuItem("Star Wars Collectibles","http://www.home-n-gifts.com/star_wars_collectibles.html","");
addMenuItem("Swords","http://www.home-n-gifts.com/swords.html","");
addMenu(627,163);
addMenuItem("Bracelets & Anklets","http://www.home-n-gifts.com/bracelets.html","");
addMenuItem("Charms","http://www.home-n-gifts.com/charms.html","");
addMenuItem("Earrings","http://www.home-n-gifts.com/earrings.html","");
addMenuItem("Necklaces","http://www.home-n-gifts.com/necklaces.html","");
addMenuItem("Pins","http://www.home-n-gifts.com/pins.html","");
addMenuItem("Rings","http://www.home-n-gifts.com/rings.html","");
addMenuItem("Toe Rings","http://www.home-n-gifts.com/toe_rings.html","");
addMenuItem("Men's Watches","http://www.home-n-gifts.com/mens_watches.html","");
addMenuItem("Women's Watches","http://www.home-n-gifts.com/womens_watches.html","");
addMenuItem("Jewelry Boxes","http://www.home-n-gifts.com/jewelry_boxes.html","");
addMenuItem("Trinket Boxes","http://www.home-n-gifts.com/trinket_boxes.html","");
addMenu(496,227);
addMenuItem("Bear Figurines","http://www.home-n-gifts.com/bear_figurines.html","");
addMenuItem("Cat Figurines","http://www.home-n-gifts.com/cat_figurines.html","");
addMenuItem("Cow Figurines","http://www.home-n-gifts.com/cow_figurines.html","");
addMenuItem("Dog Figurines","http://www.home-n-gifts.com/dog_figurines.html","");
addMenuItem("Elephant Figurines","http://www.home-n-gifts.com/elephant_figurines.html","");
addMenuItem("Giraffe Figurines","http://www.home-n-gifts.com/giraffe_figurines.html","");
addMenuItem("Horse Figurines","http://www.home-n-gifts.com/horse_figurines.html","");
addMenuItem("Leopard Figurines","http://www.home-n-gifts.com/leopard_figurines.html","");
addMenuItem("Lion Figurines","http://www.home-n-gifts.com/lion_figurines.html","");
addMenuItem("Monkey Figurines","http://www.home-n-gifts.com/monkey_figurines.html","");
addMenuItem("Pig Figurines","http://www.home-n-gifts.com/pig_figurines.html","");
addMenuItem("Tiger Figurines","http://www.home-n-gifts.com/tiger_figurines.html","");
addMenuItem("Wildlife Figurines","http://www.home-n-gifts.com/wildlife_figurines.html","");
addMenuItem("Wolf Figurines","http://www.home-n-gifts.com/wolf_figurines.html","");
addMenu(496,243);
addMenuItem("Dolphin Figurines","http://www.home-n-gifts.com/dolphin_figurines.html","");
addMenuItem("Fish Figurines","http://www.home-n-gifts.com/fish_figurines.html","");
addMenuItem("Frog Figurines","http://www.home-n-gifts.com/frog_figurines.html","");
addMenuItem("Turtle Figurines","http://www.home-n-gifts.com/turtle_figurines.html","");
addMenu(496,259);
addMenuItem("Cardinal Figurines","http://www.home-n-gifts.com/cardinal_figurines.html","");
addMenuItem("Dove Figurines","http://www.home-n-gifts.com/dove_figurines.html","");
addMenuItem("Eagle Figurines","http://www.home-n-gifts.com/eagle_figurines.html","");
addMenuItem("Hummingbird Figurines","http://www.home-n-gifts.com/hummingbird_figurines.html","");
addMenuItem("Owl Figurines","http://www.home-n-gifts.com/owl_figurines.html","");
addMenuItem("Rooster Figurines","http://www.home-n-gifts.com/rooster_figurines.html","");
addMenuItem("Swan Figurines","http://www.home-n-gifts.com/swan_figurines.html","");
addMenu(188,163);
addMenuItem("Bathroom Cabinets","http://www.home-n-gifts.com/bathroom_cabinets.html","");
addMenuItem("Corner Cabinets","http://www.home-n-gifts.com/corner_cabinets.html","");
addMenuItem("Curio Cabinets","http://www.home-n-gifts.com/curio_cabinets.html","");
addMenuItem("Display Cabinets","http://www.home-n-gifts.com/display_cabinets.html","");
addMenuItem("Media Cabinets","http://www.home-n-gifts.com/media_cabinets.html","");
addMenuItem("Storage Cabinets","http://www.home-n-gifts.com/storage_cabinets.html","");
addMenuItem("Wall Cabinets","http://www.home-n-gifts.com/wall_cabinets.html","");
addMenu(188,179);
addMenuItem("Antique Clocks","http://www.home-n-gifts.com/antique_clocks.html","");
addMenuItem("Desktop Clocks","http://www.home-n-gifts.com/desktop_clocks.html","");
addMenuItem("Kitchen Clocks","http://www.home-n-gifts.com/kitchen_clocks.html","");
addMenuItem("Mantle Clocks","http://www.home-n-gifts.com/mantle_clocks.html","");
addMenuItem("Nautical Clocks","http://www.home-n-gifts.com/nautical_clocks.html","");
addMenuItem("Novelty Clocks","http://www.home-n-gifts.com/novelty_clocks.html","");
addMenuItem("Patriotic Clocks","http://www.home-n-gifts.com/patriotic_clocks.html","");
addMenuItem("Wall Clocks","http://www.home-n-gifts.com/wall_clocks.html","");
addMenu(188,227);
addMenuItem("Christmas Lights","http://www.home-n-gifts.com/christmas_lights.html","");
addMenuItem("LED Lights","http://www.home-n-gifts.com/led_lights.html","");
addMenuItem("Night Lights","http://www.home-n-gifts.com/night_lights.html","");
addMenuItem("Solar Lights","http://www.home-n-gifts.com/solar_lights.html","");
addMenu(188,243);
addMenuItem("Buffet Lamps","http://www.home-n-gifts.com/buffet_lamps.html","");
addMenuItem("Candle Lamps","http://www.home-n-gifts.com/candle_lamps.html","");
addMenuItem("Floor Lamps","http://www.home-n-gifts.com/floor_lamps.html","");
addMenuItem("Hurricane Lamps","http://www.home-n-gifts.com/hurricane_lamps.html","");
addMenuItem("Lamp and Plate Sets","http://www.home-n-gifts.com/lamp_plate_sets.html","");
addMenuItem("Lighthouse Lamps","http://www.home-n-gifts.com/lighthouse_lamps.html","");
addMenuItem("Oil Lamps","http://www.home-n-gifts.com/oil_lamps.html","");
addMenuItem("Table Lamps","http://www.home-n-gifts.com/table_lamps.html","");
addMenu(188,259);
addMenuItem("CD Racks","http://www.home-n-gifts.com/cd_racks.html","");
addMenuItem("Coat Hooks","http://www.home-n-gifts.com/coat_hooks.html","");
addMenuItem("Key Holders","http://www.home-n-gifts.com/key_holders.html","");
addMenuItem("Letter Holders","http://www.home-n-gifts.com/letter_holders.html","");
addMenuItem("Magazine Racks","http://www.home-n-gifts.com/magazine_racks.html","");
addMenuItem("Plate Racks","http://www.home-n-gifts.com/plate_racks.html","");
addMenuItem("Towel Racks","http://www.home-n-gifts.com/towel_racks.html","");
addMenuItem("Wall Hooks","http://www.home-n-gifts.com/wall_hooks.html","");
addMenu(188,291);
addMenuItem("Bathroom Shelves","http://www.home-n-gifts.com/bathroom_shelves.html","");
addMenuItem("Corner Shelves","http://www.home-n-gifts.com/corner_shelves.html","");
addMenuItem("Curio Shelves","http://www.home-n-gifts.com/curio_shelves.html","");
addMenuItem("Display Shelves","http://www.home-n-gifts.com/display_shelves.html","");
addMenuItem("Metal Shelves","http://www.home-n-gifts.com/metal_shelves.html","");
addMenuItem("Wall Shelves","http://www.home-n-gifts.com/wall_shelves.html","");
addMenuItem("Wood Shelves","http://www.home-n-gifts.com/wood_shelves.html","");
addMenu(418,371);
addMenuItem("Garden Fountains","http://www.home-n-gifts.com/garden_fountains.html","");
addMenuItem("Indoor Fountains","http://www.home-n-gifts.com/indoor_fountains.html","");
addMenuItem("Wall Fountains","http://www.home-n-gifts.com/wall_fountains.html","");
addMenu(572,163);
addMenuItem("Christmas Candles","http://www.home-n-gifts.com/christmas_candles.html","");
addMenuItem("Decorative Candles","http://www.home-n-gifts.com/decorative_candles.html","");
addMenuItem("Pillar Candles","http://www.home-n-gifts.com/pillar_candles.html","");
addMenuItem("Scented Candles","http://www.home-n-gifts.com/scented_candles.html","");
addMenuItem("Scented Jar Candles","http://www.home-n-gifts.com/scented_jar_candles.html","");
addMenu(572,179);
addMenuItem("Candelabras","http://www.home-n-gifts.com/candelabras.html","");
addMenuItem("Candle Chandeliers","http://www.home-n-gifts.com/candle_chandeliers.html","");
addMenuItem("Candle Holders","http://www.home-n-gifts.com/candleholders.html","");
addMenuItem("Glass Candle Holders","http://www.home-n-gifts.com/glass_candle_holders.html","");
addMenuItem("Hurricane Candle Holders","http://www.home-n-gifts.com/hurricane_candle_holders.html","");
addMenuItem("Candle Sconces","http://www.home-n-gifts.com/candle_sconces.html","");
addMenuItem("Tealight Holders","http://www.home-n-gifts.com/tealight_holders.html","");
addMenuItem("Votive Candle Holders","http://www.home-n-gifts.com/votive_candle_holders.html","");
addMenuItem("Wrought Iron Candle Holders","http://www.home-n-gifts.com/wrought_iron_candle_holders.html","");
addMenu(649,163);
addMenuItem("Happy Everything","http://www.home-n-gifts.com/happy_everything.html","");
addMenuItem("Hot 'n Spicy","http://www.home-n-gifts.com/hot_spicy.html","");
addMenuItem("Kitchen Blues","http://www.home-n-gifts.com/kitchen_blues.html","");
addMenuItem("Mom's Kitchen","http://www.home-n-gifts.com/moms_kitchen.html","");
addMenuItem("Wine Theme","http://www.home-n-gifts.com/wine.html","");
addMenuItem("Country Kitchen","http://www.home-n-gifts.com/country_kitchen.html","");
addMenuItem("Blue Floral","http://www.home-n-gifts.com/floral_design_dinnerware.html","");
addMenuItem("Perfectly Plaid","http://www.home-n-gifts.com/perfectly_plaid.html","");
addMenuItem("Picasso Lines","http://www.home-n-gifts.com/picasso_lines.html","");
addMenu(649,179);
addMenuItem("Canisters","http://www.home-n-gifts.com/canisters.html","");
addMenuItem("Cheese Boards","http://www.home-n-gifts.com/cheese_boards.html","");
addMenuItem("Coasters","http://www.home-n-gifts.com/coasters.html","");
addMenuItem("Coffee Mugs","http://www.home-n-gifts.com/coffee_mugs.html","");
addMenuItem("Cookie Jars","http://www.home-n-gifts.com/cookie_jars.html","");
addMenuItem("Cookware","http://www.home-n-gifts.com/cookware.html","");
addMenuItem("Cutlery","http://www.home-n-gifts.com/cutlery.html","");
addMenuItem("Cutting Boards","http://www.home-n-gifts.com/cutting_boards.html","");
addMenuItem("Dinner Plates","http://www.home-n-gifts.com/dinner_plates.html","");
addMenuItem("Dinnerware","http://www.home-n-gifts.com/dinnerware.html","");
addMenuItem("Glassware","http://www.home-n-gifts.com/glassware.html","");
addMenuItem("Kitchen Accessories","http://www.home-n-gifts.com/kitchen_accessories.html","");
addMenuItem("Kitchen Towels & Napkins","http://www.home-n-gifts.com/kitchen_towels_napkins.html","");
addMenuItem("Memo Boards","http://www.home-n-gifts.com/memo_boards.html","");
addMenuItem("Pitchers","http://www.home-n-gifts.com/pitchers.html","");
addMenuItem("Placemats","http://www.home-n-gifts.com/placemats.html","");
addMenuItem("Refrigerator Magnets","http://www.home-n-gifts.com/refrigerator_magnets.html","");
addMenuItem("Salt & Pepper Shakers","http://www.home-n-gifts.com/salt_pepper_shakers.html","");
addMenuItem("Serving Platters","http://www.home-n-gifts.com/serving_platters.html","");
addMenuItem("Serving Trays","http://www.home-n-gifts.com/serving_trays.html","");
addMenuItem("Storage Baskets","http://www.home-n-gifts.com/storage_baskets.html","");
addMenuItem("Tea Sets","http://www.home-n-gifts.com/tea_sets.html","");
addMenuItem("Travel Mugs","http://www.home-n-gifts.com/travel_mugs.html","");
addMenu(264,179);
addMenuItem("Bathroom Decor","http://www.home-n-gifts.com/bathroom_decor.html","");
addMenuItem("Girls Room Decor","http://www.home-n-gifts.com/kids_room_decor.html","");
addMenuItem("Boys Room Decor","http://www.home-n-gifts.com/childs_room_decor.html","");
addMenuItem("Nursery Decor","http://www.home-n-gifts.com/nursery_decor.html","");
addMenuItem("Kitchen Decor","http://www.home-n-gifts.com/kitchen_decor.html","");
addMenu(264,195);
addMenuItem("Beach Towels","http://www.home-n-gifts.com/beach_towels.html","");
addMenuItem("Hand Towels","http://www.home-n-gifts.com/hand_towels.html","");
addMenuItem("Kitchen Towels & Napkins","http://www.home-n-gifts.com/kitchen_towels_napkins.html","");
addMenuItem("Blankets","http://www.home-n-gifts.com/blankets.html","");
addMenuItem("Sheets","http://www.home-n-gifts.com/sheets.html","");
addMenuItem("Decorative Pillows","http://www.home-n-gifts.com/decorative_pillows.html","");
addMenuItem("Tablecloths & Table Runners","http://www.home-n-gifts.com/tablecloths_runners.html","");
addMenuItem("Curtains","http://www.home-n-gifts.com/curtains.html","");
addMenuItem("Area Rugs","http://www.home-n-gifts.com/area_rugs.html","");
addMenu(264,307);
addMenuItem("Bud Vases","http://www.home-n-gifts.com/bud_vases.html","");
addMenuItem("Decorative Vases","http://www.home-n-gifts.com/decorative_vases.html","");
addMenuItem("Glass Vases","http://www.home-n-gifts.com/glass_vases.html","");
addMenuItem("Ginger Jars","http://www.home-n-gifts.com/ginger_jars.html","");
addMenuItem("Urns","http://www.home-n-gifts.com/urns.html","");
addMenu(264,323);
addMenuItem("Christmas Angels","http://www.home-n-gifts.com/christmas_angels.html","");
addMenuItem("Christmas Candles","http://www.home-n-gifts.com/christmas_candles.html","");
addMenuItem("Christmas Figurines","http://www.home-n-gifts.com/christmas_figurines.html","");
addMenuItem("Christmas Decor","http://www.home-n-gifts.com/christmas_decor.html","");
addMenuItem("Christmas Lights","http://www.home-n-gifts.com/christmas_lights.html","");
addMenuItem("Christmas Ornaments","http://www.home-n-gifts.com/christmas_ornaments.html","");
addMenuItem("Christmas Stockings","http://www.home-n-gifts.com/christmas_stockings.html","");
addMenuItem("Christmas Wreaths","http://www.home-n-gifts.com/christmas_wreaths.html","");
addMenuItem("Hanukkah Decorations","http://www.home-n-gifts.com/hanukkah_decorations.html","");
addMenu(264,211);
addMenuItem("Perpetual Calendars","http://www.home-n-gifts.com/perpetual_calendars.html","");
addMenuItem("Shadow Boxes","http://www.home-n-gifts.com/shadow_boxes.html","");
addMenuItem("Wall Art","http://www.home-n-gifts.com/wall_art.html","");
addMenuItem("Wall Crosses","http://www.home-n-gifts.com/holy_crosses.html","");
addMenuItem("Wall Plaques","http://www.home-n-gifts.com/wall_plaques.html","");
addMenuItem("Wall Sconces","http://www.home-n-gifts.com/wall_sconces.html","");
addMenu(264,291);
addMenuItem("Angel Picture Frames","http://www.home-n-gifts.com/angel_picture_frames.html","");
addMenuItem("Baby Picture Frames","http://www.home-n-gifts.com/baby_picture_frames.html","");
addMenuItem("Classic Photo Frames","http://www.home-n-gifts.com/photo_frames.html","");
addMenuItem("Decorative Picture Frames","http://www.home-n-gifts.com/decorative_picture_frames.html","");
addMenuItem("Family Photo Frames","http://www.home-n-gifts.com/family_photo_frames.html","");
addMenuItem("Hanging Picture Frames","http://www.home-n-gifts.com/hanging_picture_frames.html","");
addMenuItem("School Picture Frames","http://www.home-n-gifts.com/school_picture_frames.html","");
addMenuItem("Teen Picture Frames","http://www.home-n-gifts.com/teen_picture_frames.html","");
addMenuItem("Wedding Picture Frames","http://www.home-n-gifts.com/wedding_picture_frames.html","");
addMenu(264,163);
addMenuItem("African Decor","http://www.home-n-gifts.com/african_decor.html","");
addMenuItem("Patriotic Decor","http://www.home-n-gifts.com/patriotic_decor.html","");
addMenuItem("Asian Decor","http://www.home-n-gifts.com/asian_decor.html","");
addMenuItem("Christian Home Decor","http://www.home-n-gifts.com/christian_home_decor.html","");
addMenuItem("Country Decor","http://www.home-n-gifts.com/country_decor.html","");
addMenuItem("French Country Decor","http://www.home-n-gifts.com/french_country_decor.html","");
addMenuItem("Glass Mosaic","http://www.home-n-gifts.com/glass_mosaic.html","");
addMenuItem("Indoor Garden Theme","http://www.home-n-gifts.com/indoor_garden.html","");
addMenuItem("Lodge Decor","http://www.home-n-gifts.com/lodge_decor.html","");
addMenuItem("Medieval Decor","http://www.home-n-gifts.com/medieval_decor.html","");
addMenuItem("Mexican Decor","http://www.home-n-gifts.com/mexican_decor.html","");
addMenuItem("Nautical Decor","http://www.home-n-gifts.com/nautical_decor.html","");
addMenuItem("Rooster Decor","http://www.home-n-gifts.com/rooster_decor.html","");
addMenuItem("Safari Decor","http://www.home-n-gifts.com/safari_decorations.html","");
addMenuItem("Southwest Decor","http://www.home-n-gifts.com/southwest_decor.html","");
addMenuItem("Tuscan Decor","http://www.home-n-gifts.com/tuscan_decor.html","");
addMenuItem("Tropical Decor","http://www.home-n-gifts.com/tropical_decor.html","");
addMenuItem("Wedding Decor","http://www.home-n-gifts.com/wedding_decor.html","");
addMenuItem("Western Decor","http://www.home-n-gifts.com/western_decor.html","");
addMenuItem("Wine and Grapes Decor","http://www.home-n-gifts.com/grapes_decor.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++) {
		
		    if (curMenu == 0) {
			    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='#cc3333' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 1) {
			    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='#b2b2b2' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 2) {
			    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='#d200d5' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 3) {
			    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='#00ae04' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 4) {
			    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='#927241' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 5) {
			    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='#7c3384' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 6) {
			    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='#66cc33' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 7) {
			    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='#ff8000' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 8) {
			    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='#00c6c6' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 9) {
			    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='#927241' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 10) {
			    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='#927241' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 11) {
			    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='#927241' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 12) {
			    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='#cc3333' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 13) {
			    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='#cc3333' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 14) {
			    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='#cc3333' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 15) {
			    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='#cc3333' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 16) {
			    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='#cc3333' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 17) {
			    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='#cc3333' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 18) {
			    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='#00ae04' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 19) {
			    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='#7c3384' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 20) {
			    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='#7c3384' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 21) {
			    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='#66cc33' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 22) {
			    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='#66cc33' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 23) {
			    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='#b2b2b2' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 24) {
			    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='#b2b2b2' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 25) {
			    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='#b2b2b2' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 26) {
			    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='#b2b2b2' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 27) {
			    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='#b2b2b2' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 28) {
			    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='#b2b2b2' onmouseover='menuOn("+curMenu+")' onmouseout='menuOff("+curMenu+")'>");
			} else if (curMenu == 29) {
			    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='#b2b2b2' 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++) {
		
		    if (curMenu == 0) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#cc3333;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+")'>");
		    } else if (curMenu == 1) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#b2b2b2;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+")'>");
		    } else if (curMenu == 2) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#d200d5;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+")'>");
		    } else if (curMenu == 3) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#00ae04;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+")'>");
		    } else if (curMenu == 4) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#927241;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+")'>");
		    } else if (curMenu == 5) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#7c3384;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+")'>");
		    } else if (curMenu == 6) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#66cc33;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+")'>");
		    } else if (curMenu == 7) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#ff8000;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+")'>");
		    } else if (curMenu == 8) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#00c6c6;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+")'>");
		    } else if (curMenu == 9) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#927241;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+")'>");
		    } else if (curMenu == 10) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#927241;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+")'>");
		    } else if (curMenu == 11) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#927241;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+")'>");
		    } else if (curMenu == 12) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#cc3333;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+")'>");
		    } else if (curMenu == 13) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#cc3333;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+")'>");
		    } else if (curMenu == 14) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#cc3333;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+")'>");
		    } else if (curMenu == 15) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#cc3333;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+")'>");
		    } else if (curMenu == 16) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#cc3333;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+")'>");
		    } else if (curMenu == 17) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#cc3333;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+")'>");
		    } else if (curMenu == 18) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#00ae04;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+")'>");
		    } else if (curMenu == 19) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#7c3384;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+")'>");
		    } else if (curMenu == 20) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#7c3384;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+")'>");
		    } else if (curMenu == 21) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#66cc33;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+")'>");
		    } else if (curMenu == 22) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#66cc33;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+")'>");
		    } else if (curMenu == 23) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#b2b2b2;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+")'>");
		    } else if (curMenu == 24) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#b2b2b2;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+")'>");
		    } else if (curMenu == 25) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#b2b2b2;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+")'>");
		    } else if (curMenu == 26) {
 		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#b2b2b2;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+")'>");
		    } else if (curMenu == 27) {
		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#b2b2b2;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+")'>");
		    } else if (curMenu == 28) {
 		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#b2b2b2;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+")'>");
		    } else if (curMenu == 29) {
 		    	document.writeln("<div id='menu"+curMenu+"d' style='background:#b2b2b2;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");
  }
}