var baseURL = "http://banffparklodge.com"
var yDepth = 0;
var wCentre = "";
if (navigator.appName == "Microsoft Internet Explorer") 
{
	//mac internet explorer
	if(navigator.appVersion.toLowerCase().indexOf('macintosh')!=-1)
	{
		//mac internet explorer OS 9
		if(navigator.userAgent.indexOf('MSIE 5.0')!=-1)
		{
			yDepth = 0;
			wCentre = "window.page.winW()/2 - 4 - menuW/2 - 4";
		}
		//mac internet explorer OS X
		else
		{
			yDepth = 0;
			wCentre = "window.page.winW()/2 - menuW/2";
		}
	}
	//windows internet explorer
	else
	{
		//windows opera 8
		if(navigator.userAgent.indexOf('Opera')!=-1)
		{
			yDepth = 8;
			wCentre = "window.page.winW()/2 - 5 - menuW/2 - 5";
		}
		//windows internet explorer
		else
		{
			yDepth = 0;
			wCentre = "window.page.winW()/2 - menuW/2";
		}
	}
}
else
{
	if(navigator.appVersion.toLowerCase().indexOf('macintosh')!=-1)
	{
		//mac netscape version 4
		if(parseInt(navigator.appVersion.substring(0,1))==4)
		{
			yDepth = 8;
			wCentre = "window.page.winW()/2 - 4 - menuW/2 - 4";
		}
		//mac netscape version 6 and Safari
		if(parseInt(navigator.appVersion.substring(0,1))==5)
		{
			yDepth = 0;
			wCentre = "window.page.winW()/2 - menuW/2";
		}
	}
	else
	{
		//windows netscape version 4.61
		if(parseInt(navigator.appVersion.substring(0,1))==4)
		{
			yDepth = 8;
			wCentre = "window.page.winW()/2 - 5 - menuW/2 - 5";
		}
		//windows netscape version 6/7 and Firefox 1.0.6
		if(parseInt(navigator.appVersion.substring(0,1))==5)
		{
			yDepth = 0;
			wCentre = "window.page.winW()/2 - 5 - menuW/2 - 5";
		}
	}
}

var hBar = new ItemStyle(190, 0, '', 0, 0, '', '', '', '', '', '', null, null, 'hand', 'hand');
var subM = new ItemStyle(21, 0, '', 0, 3, '#F1F3ED', '#E0E2D7', 'lowText', 'highText', 'itemBorder', 'itemBorder', null, null, 'hand', 'hand');
var pMenu = new PopupMenu('pMenu');

with (pMenu)
{
startMenu('root', false, wCentre, yDepth, 91, hBar, '', false);
addItem( '<img src="/images/t-bpl-logo.gif" alt="home" width="235" height="91" border="0" />', '', 'sm:', null, 235).onclick='window.location.href="' + baseURL + '/"';
if(document.location.pathname.indexOf("/hotel/") == 0) {
	addItem('<img src="/nav/t-nav-hotel02.gif" alt="Our Hotel" width="40" height="91" border="0" />', 'mOurHotel', 'sm:', null, 40).onclick='window.location.href="' + baseURL + '/hotel/"';
}
else {
	addItem('SWAP:<img src="/nav/t-nav-hotel01.gif" alt="Our Hotel" width="40" height="91" border="0" />^<img src="/nav/t-nav-hotel02.gif" alt="Our Hotel" width="40" height="91" border="0" />', 'mOurHotel', 'sm:', null, 40).onclick='window.location.href="' + baseURL + '/hotel/"';
}
if(document.location.pathname.indexOf("/reservations/") == 0) {
	addItem('<img src="/nav/t-nav-reserv02.gif" alt="Reservations" width="97" height="91" border="0" />', 'mReservations', 'sm:', null, 97).onclick='window.location.href="' + baseURL + '/reservations/"';
}
else {
	addItem('SWAP:<img src="/nav/t-nav-reserv01.gif" alt="Reservations" width="97" height="91" border="0" />^<img src="/nav/t-nav-reserv02.gif" alt="Reservations" width="97" height="91" border="0" />', 'mReservations', 'sm:', null, 97).onclick='window.location.href="' + baseURL + '/reservations/"';
}
if(document.location.pathname.indexOf("/conferences/") == 0) {
	addItem('<img src="/nav/t-nav-conf02.gif" alt="Conferences" width="84" height="91" border="0" />', 'mConferences', 'sm:', null, 84).onclick='window.location.href="' + baseURL + '/conferences/"';
}
else {
	addItem('SWAP:<img src="/nav/t-nav-conf01.gif" alt="Conferences" width="84" height="91" border="0" />^<img src="/nav/t-nav-conf02.gif" alt="Conferences" width="84" height="91" border="0" />', 'mConferences', 'sm:', null, 84).onclick='window.location.href="' + baseURL + '/conferences/"';
}
if(document.location.pathname.indexOf("/reunions/") == 0) {
	addItem('<img src="/nav/t-nav-reunion02.gif" alt="Reunions" width="87" height="91" border="0" />', 'mReunions', 'sm:', null, 87).onclick='window.location.href="' + baseURL + '/reunions/"';
}
else {
	addItem('SWAP:<img src="/nav/t-nav-reunion01.gif" alt="Reunions" width="87" height="91" border="0" />^<img src="/nav/t-nav-reunion02.gif" alt="Reunions" width="87" height="91" border="0" />', 'mReunions', 'sm:', null, 87).onclick='window.location.href="' + baseURL + '/reunions/"';
}
if(document.location.pathname.indexOf("/packages/") == 0) {
	addItem('<img src="/nav/t-nav-pack02.gif" alt="Packages" width="72" height="91" border="0" />', 'mPackages', 'sm:', null, 72).onclick='window.location.href="' + baseURL + '/packages/"';
}
else {
	addItem('SWAP:<img src="/nav/t-nav-pack01.gif" alt="Packages" width="72" height="91" border="0" />^<img src="/nav/t-nav-pack02.gif" alt="Packages" width="72" height="91" border="0" />', 'mPackages', 'sm:', null, 72).onclick='window.location.href="' + baseURL + '/packages/"';
}
if(document.location.pathname.indexOf("/dining/") == 0) {
	addItem('<img src="/nav/t-nav-dine02.gif" alt="Dining" width="55" height="91" border="0" />', 'mDining', 'sm:', null, 55).onclick='window.location.href="' + baseURL + '/dining/"';
}
else {
	addItem('SWAP:<img src="/nav/t-nav-dine01.gif" alt="Dining" width="55" height="91" border="0" />^<img src="/nav/t-nav-dine02.gif" alt="Dining" width="55" height="91" border="0" />', 'mDining', 'sm:', null, 55).onclick='window.location.href="' + baseURL + '/dining/"';
}

startMenu('mOurHotel', true, 0, 91, 108, subM, '', false);
addItem('Rooms', '/hotel/rooms/index.html', '');
addItem('Rates', '/u/rates.phtml', '');
addItem('Our Amenities', '/hotel/amenities.html', '');
addItem('At Your Doorstep', '/hotel/doorstep.html', '');
addItem('Festive Season', '/u/festive_season.phtml', '');

startMenu('mReservations', true, 0, 91, 192, subM, '', false);
addItem('Check Availability', 'http://reservation.banffparklodge.com/transaction-calendar.html?login=9', '');
addItem('Make An Individual Reservation', 'http://reservation.banffparklodge.com/booking-request.html?login=9', '');
addItem('Make A Conference Reservation', 'openBFwindow("https://iis.banffparklodge.com/v1web/Availability.asp?WCI=Groups&WCE=GroupSe","conferenceReserv01","750","700")', 'js:');

startMenu('mConferences', true, 0, 91, 132, subM, '', false);
addItem('Meeting Rooms', '/conferences/meeting_rooms.html', '');
addItem('Guest Rooms', '/hotel/rooms/index.html', '');
addItem('Catering Menus', '/conferences/menus/index.html', '');
addItem('Meetings Package ', '/u/meetings_package.phtml', '');
addItem('How to Get Here', '/utility/how_to_get_here.html', '');
addItem('Request for Proposal', '/conferences/proposal.html', '');
addItem('Testimonials', '/conferences/testimonials.html', '');

startMenu('mReunions', true, 0, 91, 110, subM, '', false);
addItem('Our Facilities', '/reunions/our_facilities.html', '');
addItem('Catering Menus', '/conferences/menus/index.html', '');
addItem('Wedding Services', '/reunions/w_services.html', '');
addItem('Wedding Policy', '/reunions/w_policy.html', '');
addItem('Reunions', '/reunions/reunions.html', '');

startMenu('mPackages', true, 0, 91, 216, subM, '', false);
addItem('Ski', '/u/ski.phtml', '');
addItem('Bed & Breakfast', '/u/bed_breakfast.phtml', '');
addItem('Corporate Christmas Party Package', '/u/corporate_christmas.phtml', '');
addItem('Last Minute Specials', '/u/last_minute.phtml', '');
addItem('Meetings Package ', '/u/meetings_package.phtml', '');
addItem('Float Package ', '/u/float.phtml', '');

startMenu('mDining', true, 0, 91, 130, subM, '', false);
addItem('Terrace Dining Room', '/u/terrace.phtml', '');
addItem('Chinook Restaurant', '/u/chinook/index.phtml', '');
addItem('Special Events', '/u/special.phtml', '');
addItem('Reserve a Table', '/dining/reserve.html', '');
addItem('Festive Season', '/u/festive_season.phtml', '');

}