
function clearDefaultandCSS(el) {
	if (el.defaultValue==el.value) el.value = ""
	// If Dynamic Style is supported, clear the style
	if (el.style) el.style.cssText = "font-family:Arial, Verdana, Geneva, Palatino, sans-serif; font-size:12px; color:#000000; height:27px; width:129px; padding:0px; margin:0px; border: 0px; line-height:220%;"
}




/*
	 Initialize and render the MenuBar when its elements are ready 
	 to be scripted.
*/

YAHOO.util.Event.onContentReady("pwn_navigation", function () {

/*
	Instantiate a MenuBar:  The first argument passed to the constructor
	is the id for the Menu element to be created, the second is an 
	object literal of configuration properties.
*/

var oMenuBar = new YAHOO.widget.MenuBar("pwn_navigation", { 
											autosubmenudisplay: true, 
											hidedelay: 750, 
											lazyload: true });

/*
	 Define an array of object literals, each containing 
	 the data necessary to create a submenu.
*/

var aSubmenuData = [

	{
		id: "communitytypes", 
		itemdata: [ 
			{ text: "BOOM TOWNS", url: "/newshour/interactive/patchworknation/communities/boom-towns/" },
			{ text: "CAMPUS AND CAREERS", url: "/newshour/interactive/patchworknation/communities/campus-and-careers/" },
			{ text: "EMPTYING NESTS", url: "/newshour/interactive/patchworknation/communities/emptying-nests/" },
			{ text: "EVANGELICAL EPICENTERS", url: "/newshour/interactive/patchworknation/communities/evangelical-epicenters/" },
			{ text: "IMMIGRATION NATION", url: "/newshour/interactive/patchworknation/communities/immigration-nation/" },
			{ text: "INDUSTRIAL METROPOLIS", url: "/newshour/interactive/patchworknation/communities/industrial-metropolis/" },
			{ text: "MILITARY BASTIONS", url: "/newshour/interactive/patchworknation/communities/military-bastions/" },
			{ text: "MINORITY CENTRAL", url: "/newshour/interactive/patchworknation/communities/minority-central/" },
			{ text: "MONIED 'BURBS", url: "/newshour/interactive/patchworknation/communities/monied-burbs/" },
			{ text: "MORMON OUTPOSTS", url: "/newshour/interactive/patchworknation/communities/mormon-outposts/" },
			{ text: "SERVICE WORKER CENTERS", url: "/newshour/interactive/patchworknation/communities/service-worker-centers/" },
			{ text: "TRACTOR COUNTRY", url: "/newshour/interactive/patchworknation/communities/tractor-country/" },
		]
	}
];


/*
	 Subscribe to the "beforerender" event, adding a submenu 
	 to each of the items in the MenuBar instance.
*/

oMenuBar.subscribe("beforeRender", function () {

	var nSubmenus = aSubmenuData.length,
		i;


	if (this.getRoot() == this) {

		for (i = 0; i < nSubmenus; i++) {
			this.getItem(i).cfg.setProperty("submenu", aSubmenuData[i]);
		}

	}

});


/*
	 Call the "render" method with no arguments since the 
	 markup for this MenuBar instance is already exists in 
	 the page.
*/

oMenuBar.render();         

});