var browser = '';
var menu_left = '';

function detect()
{
	var x = navigator;
	browser = x.userAgent;

return browser;
}

function init()
{
	//==========================================================================================
	// if supported, initialize TransMenus
	//==========================================================================================
	// Check isSupported() so tdat menus aren't accidentally sent to non-supporting browsers.
	// tdis is better tdan server-side checking because it will also catch browsers which would
	// normally support tde menus but have javascript disabled.
	//
	// If supported, call initialize() and tden hook whatever image rollover code you need to do
	// to tde .onactivate and .ondeactivate events for each menu.
	//==========================================================================================

	if (TransMenu.isSupported())
		TransMenu.initialize();

}

function createMenu()
{
	if (TransMenu.isSupported())
	{
		if(detect().indexOf('Firefox') != (-1))
		{
			var ms = new TransMenuSet(TransMenu.direction.right, 5, 0, TransMenu.reference.topRight);
		}
		else
		{
			var whereat = location.href;
			
			if(whereat.indexOf('calendar/calendar') != (-1))
				var ms = new TransMenuSet(TransMenu.direction.right, 10, 0, TransMenu.reference.topRight);				
			else
				var ms = new TransMenuSet(TransMenu.direction.right, 18, 10, TransMenu.reference.topRight);
		}

		var menu1 = ms.addMenu(document.getElementById("about"));
		menu1.addItem("About Pats Peak", "http://www.patspeak.com/summer/about.htm");
		menu1.addItem("Henniker Area", "http://www.patspeak.com/summer/henniker.htm");
		menu1.addItem("Media Center", "http://www.patspeak.com/mediacenter.htm");
		menu1.addItem("Directions", "http://www.patspeak.com/summer/direction.htm");
		menu1.addItem("Contact Us", "http://www.patspeak.com/summer/contact_us.php");

		var menu2 = ms.addMenu(document.getElementById("banquets"));
		menu2.addItem("Banquets", "http://www.patspeak.com/summer/banquets.php");
		menu2.addItem("Weddings &amp; Receptions", "http://www.patspeak.com/summer/weddings.php");
		menu2.addItem("Company Meetings", "http://www.patspeak.com/summer/companymeetings.php");
		menu2.addItem("Banquet Photos", "http://www.patspeak.com/summer/photos.php");
		menu2.addItem("Request Information", "http://www.patspeak.com/summer/request_info.php");
		menu2.addItem("Banquet Vendors", "http://www.patspeak.com/summer/banquet_vendors.php");
		menu2.addItem("Area Accommodations", "http://www.patspeak.com/summer/area_accomodations.php");
		menu2.addItem("Testimonials", "http://www.patspeak.com/summer/testimonials.php");

			
		var menu4 = ms.addMenu(document.getElementById("peakwinter"));
		menu4.addItem("Winter Info","http://www.patspeak.com/winter_fun.php");
		menu4.addItem("Season Passes","http://www.patspeak.com/seasonpasses.htm");
		menu4.addItem("Media Center","http://www.patspeak.com/mediacenter.htm");
		
		
		var menu5 = ms.addMenu(document.getElementById("employment"));
		menu5.addItem("Summer Job Listings", "http://www.patspeak.com/summer/jobs.htm");
		menu5.addItem("Winter Job Listings", "http://www.patspeak.com/jobs.htm");
		<!-- menu5.addItem("Online Application", "http://forms.patspeak.com/jobappform/"); -->
		<!-- menu5.addItem("Printable Application", "http://www.patspeak.com/summer/jobprintapp.htm"); -->
		menu5.addItem("Ski Patrol Positions", "http://www.patspeak.com/sp_joinskipatrol.htm");
		menu5.addItem("I9 & W4 Forms", "http://www.patspeak.com/summer/emp_forms.htm");
		
	TransMenu.renderAll();
	}
}