var bTestSite=false;
var sHttpPrefix="http://";
var sLiveSiteRoot = "www.alaskacanopy.com/";      // address of LIVE site root directory (without the "http://" prefix!)
var sTestSiteRoot = "004fb85.netsolhost.com/";

// establish test vs live site
if (window.location.toString().toLowerCase().indexOf(sTestSiteRoot) > -1)
{
	bTestSite=true;
}
// establish http vs https
if (window.location.toString().toLowerCase().indexOf("https") > -1)
{
	sHttpPrefix = "https://";
}

//var nSubMenuAdditionalWidthMedium = 350;   	//mfindlay
var nSubMenuAdditionalWidthWide = 150;    	//mfindlay

//var nMenuWidth=175;				// width of menus to appear. Set to zero to ignore
var sBaseSite="";
var sNonSSLBaseSite="";

// If test site, just use 1 base site
if (bTestSite) 
{
	sBaseSite = sHttpPrefix + sTestSiteRoot;
	sNonSSLBaseSite = "http://" + sTestSiteRoot;
}
else
{
	sNonSSLBaseSite = "http://" + sLiveSiteRoot;
	
	// live site. If https mode, use safesecureweb address
	if (sHttpPrefix=="https://")
	{
		sBaseSite = sHttpPrefix + sLiveSiteRoot;  
	}
	else
	{
		// non ssl mode, use normal address
		sBaseSite = sHttpPrefix + sLiveSiteRoot;
	}
} 

//********************
// TD Top nav onclick
//********************
function NavigateTo(sTarget)
{
	window.location.href = sNonSSLBaseSite + sTarget;
	return true;
}


//var submenuTopOffset = "offset=5";  see iym for reference use in submenu flyouts
//var submenuLeftOffset = "offset=1";

// milonic
_menuCloseDelay=250;           	// The time delay for menus to remain visible on mouse out
_menuOpenDelay=50;             	// The time delay before menus open on mouse over
_subOffsetTop=4;             	// Sub menu top offset from bottom of image associated with it
_subOffsetLeft=-4;            	// Sub menu left offset

// MAIN STYLE
with(mainMenuStyle=new mm_style()){
onbgcolor="#FFDD6D";			// hover background color  
offbgcolor="#FFEEB6";			// normal (non-hover) background color  
offcolor="#003366";				// normal (non-hover) text color  
oncolor="#003366";				// hover text color  
//offclass="mmpadding";			// custom style attached to menu
//onclass="mmpadding";			// custom style attached to menu
bordercolor="#C7C3A8";			// border color A89C91
borderstyle="solid";
borderwidth=1;
fontfamily="Arial";				// font / font family
fontsize="11px";				// font size
fontstyle="normal";				// font style   
fontweight="bold";				// font weight (bold)   
//outfilter="Fade(duration=0.1)";
overfilter="Fade(duration=0.1);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
padding=5;						// menu item cell padding
pagebgcolor="#FFDD6D"; 			// this is the (non-hover) background color of the menu item last clicked 
pagecolor="#003366";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#9196B1";		// separator color 
separatorsize="1";
subimage=sBaseSite + "images/common/flyoutarrow.gif";
subimagepadding="2";
}

//******************** TOURS ***********************************
with(milonic=new menuname("mmtours")){
overflow="scroll";
style=mainMenuStyle;
itemwidth=150;  

top=-1;
left=0;
aI("showmenu=TOURS_CanopyAdventure;text=Alaska Canopy Adventures;url=");
aI("text=Download Brochures;url=" + sNonSSLBaseSite + "pages/brochures.htm;");
aI("showmenu=TOURS_AdventurePartners;text=Adventure Partner Tours;url=");
}

	// Sub-Flyout for TOURS_CanopyAdventure
	with(milonic=new menuname("TOURS_CanopyAdventure")){
	style=mainMenuStyle;
	itemwidth += nSubMenuAdditionalWidthWide;
	aI("text=Alaska's Ultimate Canopy <br />& Zipline Expedition - Juneau;url=" + sNonSSLBaseSite + "Tours/Zipline-Rainforest-Juneau.html;");
	aI("text=Rainforest Canopy <br />& Zipline Expedition - Ketchikan;url=" + sNonSSLBaseSite + "Tours/Zipline-Rainforest-Ketchikan.html;");
	aI("text=Bear Creek Zipline Adventure - Ketchikan;url=" + sNonSSLBaseSite + "Tours/Zipline-Bearcreek-Ketchikan.html;");
}

	// Sub-Flyout for TOURS_AdventurePartners
	with(milonic=new menuname("TOURS_AdventurePartners")){
	style=mainMenuStyle;
	itemwidth += nSubMenuAdditionalWidthWide;
	aI("showmenu=TOURS_TaquanAir;text=Taquan Air Tours;url=");
	aI("showmenu=TOURS_RainforestAdventure;text=Alaska Rainforest Adventures Tours;url=");
	aI("showmenu=TOURS_AdventureKart;text=Adventure Karts Tour;url=");
}

	// Sub-Flyout for TOURS_TaquanAir
	with(milonic=new menuname("TOURS_TaquanAir")){
	style=mainMenuStyle;
	itemwidth += nSubMenuAdditionalWidthWide;
	aI("text=Classic Misty Fjords Flightseeing;url=" + sNonSSLBaseSite + "Tours/Misty-Fjords-Flightseeing.html;");
	aI("text=Glacier Fjords Spectacular;url=" + sNonSSLBaseSite + "Tours/Glacier-Fjords-Spectacular.html;");
	aI("text=Alaska Bear Adventure;url=" + sNonSSLBaseSite + "Tours/Bear-Adventure.html;");
	aI("text=Anan Creek Bear Adventure;url=" + sNonSSLBaseSite + "Tours/Bear-Anan-Creek.html;");
	aI("text=Pilot's Choice <br />Seaplane Safari;url=" + sNonSSLBaseSite + "Tours/Pilots-Choice-Seaplane.html;");
	aI("text=Alaska Bush Pilot Experience;url=" + sNonSSLBaseSite + "Tours/Bush-Pilot-Experience.html;");
	aI("text=Exclusive Flightseeing <br />& Crab Feast;url=" + sNonSSLBaseSite + "Tours/Flightseeing-Crab-Feast.html;");
}

	// Sub-Flyout for TOURS_RainforestAdventure
	with(milonic=new menuname("TOURS_RainforestAdventure")){
	style=mainMenuStyle;
	itemwidth += nSubMenuAdditionalWidthWide;
	aI("text=Wildlife Sanctuary <br />& Eagle Center;url="  + "Tours/Wildlife-Sanctuary.html;");
	aI("text=Bear Country <br />& Wildlife Expedition;url="  + "Tours/Wildlife-Expedition.html;");
}

	// Sub-Flyout for TOURS_AdventureKart
	with(milonic=new menuname("TOURS_AdventureKart")){
	style=mainMenuStyle;
	itemwidth += nSubMenuAdditionalWidthWide;
	aI("text=Adventure Kart Expedition;url=" + sNonSSLBaseSite + "Tours/Kart-Excursion.html;");
}

	
	
//******************** SAFETY STANDARDS ***********************************
with(milonic=new menuname("mmsafetystandards")){
overflow="scroll";
style=mainMenuStyle;
itemwidth=150;  

top=-1;
left=0;
aI("text=Operations;url=" + sNonSSLBaseSite + "pages/saftey_operations.htm;");
aI("text=Equipment;url=" + sNonSSLBaseSite + "pages/saftey_equipment.htm;");
aI("text=The Industry;url=" + sNonSSLBaseSite + "pages/saftey_industry.htm;");
}

//******************** THE EXPERIENCE ***********************************
with(milonic=new menuname("mmtheexperience")){
overflow="scroll";
style=mainMenuStyle;
itemwidth=150;  

top=-1;
left=0;
aI("text=Photo Gallery;url=" + sNonSSLBaseSite + "Tours/Slideshow-Gallery.html;");
aI("text=Video Gallery;url=" + sNonSSLBaseSite + "Tours/Video-Gallery.html;");
aI("text=Guest Comments;url=" + sNonSSLBaseSite + "pages/experience_comments.htm;");
aI("target=_blank;text=How Are We Doing?;url=" + sNonSSLBaseSite + "pages/experience_howdoing.htm;");
}
	
//******************** HOW TO BOOK ***********************************
with(milonic=new menuname("mmhowtobook")){
overflow="scroll";
style=mainMenuStyle;
itemwidth=150;  

top=-1;
left=0;
}

//******************** VISITOR INFORMATION ***********************************
with(milonic=new menuname("mmvisitorinfo")){
overflow="scroll";
style=mainMenuStyle;
itemwidth=150;  

top=-1;
left=0;
aI("text=About Ketchikan & Juneau;url=" + sNonSSLBaseSite + "pages/visitor_about.htm;");
aI("text=Things to See &amp; Do;url=" + sNonSSLBaseSite + "pages/visitor_seedo.htm;");
aI("text=History;url=" + sNonSSLBaseSite + "pages/visitor_history.htm;");
aI("text=Preparation For Your Visit;url=" + sNonSSLBaseSite + "pages/visitor_prepare.htm;");
}
	
//******************** ABOUT US ***********************************
with(milonic=new menuname("mmaboutus")){
overflow="scroll";
style=mainMenuStyle;
itemwidth=150;  

top=-1;
left=0;
aI("text=Who We Are;url=" + sNonSSLBaseSite + "pages/canopy_about.htm;");
aI("text=Associated Links;url=" + sNonSSLBaseSite + "pages/associations.htm;");
aI("target=_blank;text=Gift Shop;url=" + "http://www.alaskacanopy.com/ims_v3/index.php?page=shop/browse&category_id=4623e9c83eee0adae96fec2c75b1aac4;");
aI("text=Newsletter Signup;url=" + sNonSSLBaseSite + "pages/subscribe.htm;");
aI("showmenu=ABOUTUS_Job_Opportunities;text=Job Opportunities;url=");
}

	// Sub-Flyout for ABOUTUS_Job_Opportunities
	with(milonic=new menuname("ABOUTUS_Job_Opportunities")){
	style=mainMenuStyle;
	itemwidth += nSubMenuAdditionalWidthWide;
	aI("text=Join Our Team;url=" + sNonSSLBaseSite + "pages/canopy_jointeam.htm;");
	aI("target=_blank;text=Available Jobs;url="  + "https://apply.coolworks.com/spirit-of-alaska-tours/job-list.asp");
	aI("target=_blank;text=Apply Online;url="  + "https://apply.coolworks.com/spirit-of-alaska-tours/job-app.asp");
	}
	

//drawMenus();  will do this in main body so we don't lose the page background (milonic bug)


