
//Contents for menu 1
var menu1=new Array()
menu1[0]='<li><a href="../glaciers/glaciers.htm" class="top-nav-text">Glacier &amp; Wildlife Cruises</a></li>'
menu1[1]='<li><a href="../flightseeing/flightseeing.htm" class="top-nav-text">Flightseeing</a></li>'
menu1[2]='<li><a href="../bear-viewing/bear-viewing.htm" class="top-nav-text">Bear Viewing</a></li>'
menu1[3]='<li><a href="../rafting/rafting.htm" class="top-nav-text">Rafting &amp; Kayaking</a></li>'
menu1[4]='<li><a href="../fishing/fishing.htm" class="top-nav-text">Fishing</a></li>'
//menu1[5]='<li><a href="../pages/activities/parkstrails/pt_overview.jsp" class="top-nav-text">Parks & Trails</a></li>'
menu1[5]='<li><a href="../driving/magnificent-drives.htm" class="top-nav-text">Magnificent Drives</a></li>'
//menu1[7]='<li><a href="../pages/activities/railroad/ar_overview.htm" class="top-nav-text">Alaska Railroad</a></li>'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<li>    <a href="../anchorage/anchorage.jsp" class="drop-down-text">Anchorage</a></li>'
menu2[1]='<li><span class="drop-down-text">North</span></li>'
menu2[2]='<li>    <a href="../denali/denali.htm" class="top-nav-text">Denali (McKinley) Park</a></li>'
menu2[3]='<li>    <a href="../talkeetna/talkeetna.htm" class="top-nav-text">Talkeetna</a></li>'
menu2[4]='<li>    <a href="../fairbanks/fairbanks.htm" class="top-nav-text">Fairbanks</a></li>'
menu2[5]='<li><span class="drop-down-text">South</span></li>'
menu2[6]='<li>    <a href="../seward/seward.htm" class="top-nav-text">Seward &amp; Kenai Fjords</a></li>'
menu2[7]='<li>    <a href="../homer/homer.htm" class="top-nav-text">Homer &amp; Kachemak Bay</a></li>'
menu2[8]='<li>    <a href="../kenai/central-kenai.htm" class="top-nav-text">Central Kenai Peninsula</a></li>'
menu2[9]='<li>    <a href="../girdwood/girdwood.htm" class="top-nav-text">Girdwood</a></li>'
menu2[10]='<li><span class="drop-down-text">East</span></li>'
//menu2[9]='<li>    <a href="../pages/destinations/valdez/va_overview.htm" class="top-nav-text">Valdez</a></li>'
menu2[11]='<li>    <a href="../mccarthy/mccarthy.htm" class="top-nav-text">McCarthy-Kennicott</a></li>'
//menu2[11]='<li><span class="drop-down-text">Arctic</span><br>'
//menu2[12]='<li>    <a href="../pages/destinations/nome/no_overview.htm" class="top-nav-text">Nome</a></li>'
//menu2[13]='<li>    <a href="../pages/destinations/kotzebue/ko_overview.htm" class="top-nav-text">Kotzebue</a></li>'
//menu2[14]='<li><a href="../pages/destinations/flyinwild/fw_overview.htm" class="drop-down-text">Fly-In Wilderness Lodges</a></li>'
//menu2[15]='<li><a href="../pages/destinations/navigate/na_overview.htm" class="drop-down-text">Navigate by Map</a></li>'

var menu3=new Array()
menu3[0]='<li><a href="../videos.htm" class="top-nav-text">Videos</a></li>'
menu3[1]='<li><a href="../maps/maps.htm" class="top-nav-text">Maps</a><br></li>'
menu3[2]='<li><a href="../locals/meet-the-locals.htm" class="top-nav-text">Meet The Locals</a><br></li>'

var menu4=new Array()
menu4[0]='<li><a href="../alaska-travel-tips.jsp" class="top-nav-text">Less Is More </a></li>'
menu4[1]='<li><a href="../land-tours-guide.jsp" class="top-nav-text">Land Tour Guide</a><br></li>'
menu4[2]='<li><a href="../independent-vs-escorted.jsp" class="top-nav-text">Independent or Escorted?</a><br></li>'
menu4[3]='<li><a href="../pick-the-right-cruise.jsp" class="top-nav-text">Pick the Right Cruise</a><br></li>'
menu4[4]='<li><a href="../when-to-visit.jsp" class="top-nav-text">When to Visit</a><br></li>'
menu4[5]='<li><a href="../how-to-budget.jsp" class="top-nav-text">How to Budget</a><br></li>'
menu4[6]='<li><a href="../best-of-alaska.jsp" class="top-nav-text">Best of Alaska</a><br></li>'
menu4[7]='<li><a href="../packing-list.jsp" class="top-nav-text">What to Pack</a><br></li>'
menu4[8]='<li><a href="../what-to-wear.jsp" class="top-nav-text">How to Dress</a><br></li>'
menu4[9]='<li><a href="../mosquitoes.jsp" class="top-nav-text">Mosquitoes!</a><br></li>'
menu4[10]='<li><a href="../alaska-photos.jsp" class="top-nav-text">Alaska Photo Tips</a><br></li>'
menu4[11]='<li><a href="../bore-tides.jsp" class="top-nav-text">Bore Tides</a><br></li>'
menu4[12]='<li><a href="../aurora.jsp" class="top-nav-text">Aurora</a></li>'
//menu4[11]='<li><a href="../pages/planningtips/pt_overview_R12.htm" class="top-nav-text">Field Guides</a><br></li>'

var menuwidth='' //default menu width
var menubgcolor='#E3F5F3'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div  id="dropmenudiv" style="width:'+menuwidth+';" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)" ></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+5+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
	//alert(window.location.href);
//window.location.href="pt_overview.jsp";
if (ie4||ns6){
	return false
}
else{
	return true
}

}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide);
{
if (hidemenu_onclick=="yes")
document.onclick=hidemenu
}
}
