// For the menu

var menu1=new Array()
// Activity Holidays
menu1[1]='<a href="/holidays/norway-northern-lights" class="1">Lights of Norway</a><br>'
//menu1[2]='<a href="/holidays/winter-magic-break" class="1">Winter Magic Break</a><br>'
menu1[2]='<a href="mountain-memories.php" class="1">Mountain Memories</a><br>'
//menu1[3]='<a href="laponia-break.php" class="1">Laponia Break</a><br>'
//menu1[3]='<a href="mountain-memories.php" class="1">Mountain Memories</a><br>'
//menu1[3]='<a href="activity-week-lapland.php" class="1">Laponia Activity Week</a><br>'
//menu1[6]='<a href="luxury-activity-break.php" class="1">Luxury Activity Break</a><br>'
//menu1[4]='<a href="laponia-christmas-week.php" class="1">Laponia Christmas Week</a><br>'
menu1[3]='<a href="northern-lights.php" class="1">Northern Lights</a><br>'
//menu1[4]='<a href="laponia-new-year.php" class="1">Laponia New Year</a><br>'
//menu1[8]='<a href="snow-ice.php" class="1">Snow & Ice</a><br>'
menu1[4]='<a href="winter-cottages.php" class="1">Winter Cottages</a><br>'
menu1[5]='<a href="simply-snow.php" class="1">Simply Snow</a><br>'
menu1[6]='<a href="/holidays/sea-trout-fishing" class="1">Sea Trout Fishing</a><br>'
menu1[7]='<a href="/holidays/salmon-fishing" class="1">Salmon Fishing</a><br>'
menu1[8]='<a href="/holidays/forest-mountains" class="1">Combination Break</a><br>'
menu1[9]='<a href="/holidays/kiruna-arctic-north" class="1">Kiruna Arctic North</a><br>'
menu1[10]='<a href="/lapland/mountain-village" class="1">Mountain Village</a><br>'


//Contents for Christmas Santa
var menu2=new Array()
//menu2[1]='<a href="/holidays/village-santa/" class="1">Village Santa</a><br>'
menu2[1]='<a href="santa-arctic-zoo.php" class="1">Santa &amp; The Arctic Zoo</a><br>'
//menu2[2]='<a href="mountain-santa.php" class="1">Mountain Santa</a><br>'
//menu2[2]='<a href="laponia-christmas-week.php" class="1">Laponia Christmas Week</a><br>'
//menu2[2]='<a href="/holidays/laponia-santa" class="1">Laponia Santa</a><br>'
menu2[2]='<a href="/santa/lapland" class="1">Village Santa</a><br>'
menu2[3]='<a href="/new-year/lapland" class="1">Northern Echeos</a><br>'

//Contents for corporate
var menu3=new Array()
menu3[1]='<a href="corporate-weekend.php" class="1">Office Weekend</a><br>'
menu3[2]='<a href="corporate.php" class="1">Corporate Activity Break</a><br>'

//Contents for dog sleigh
var menu4=new Array()
//menu4[1]='<a href="lapland-forest-dogs.php" class="1">Wild Harmony</a><br>'
//menu4[2]='<a href="winter-wilderness.php" class="1">Winter Wilderness</a><br>'
menu4[1]='<a href="/adventure/northern-huskies" class="1">Northern Huskies</a><br>'
menu4[2]='<a href="dog-sleigh-trip.php" class="1">Silence of Winter</a><br>'
//menu4[2]='<a href="snow-ice.php" class="1">Snow &amp; Ice</a><br>'
menu4[3]='<a href="ice-hotel-journey.php" class="1">Magic Ice Hotel Journey</a><br>'

// Contents for snowmobile trips
var menu5=new Array()
menu5[1]='<a href="arctic-snowmobile.php" class="1">Arctic Circle Safari</a><br>'
menu5[2]='<a href="mountain-snowmobiles.php" class="1">Mountain Snowmobiles</a><br>'

// Contents for ski lapland
var menu6=new Array()
menu6[1]='<a href="ski-blast-hemavan.php" class="1">Ski Blast</a><br>'
menu6[2]='<a href="ski-hotel-lapland.php" class="1">Ski Hotel</a><br>'
menu6[3]='<a href="ski-cabin-lapland.php" class="1">Ski Cabin</a><br>'
menu6[4]='<a href="skiing.php" class="1">Resort Information</a><br>'
menu6[5]='<a href="/holidays/forest-mountains" class="1">Combination Break</a><br>'


// Contents for lapland weddings
var menu7=new Array()
menu7[1]='<a href="storforsen-wedding.php" class="1">Stoforsen Wedding</a><br>'
menu7[2]='<a href="trolltunet-hotel.php" class="1">Trolltunet Hotel</a><br>'
menu7[3]='<a href="Nordkalotten-Hotel-lapland.php" class="1">NordKalotten Hotel</a><br>'
menu7[4]='<a href="Pite Havsbad Hotel.php" class="1">Pite Havsbad Hotel</a><br>'
menu7[5]='<a href="Laisaliden Hotel.php" class="1">Laisaliden Hotel</a><br>'

// Contents for Summer Lapland
var menu8=new Array()
menu8[1]='<a href="/sweden/farmstay-sweden" class="1">Farmstay Sweden</a><br>'
menu8[2]='<a href="bird-watching.php" class="1">Bird Watching in Lapland</a><br>'
menu8[3]='<a href="summer-fly-drive-lapland.php" class="1">Summer Fly Drive</a><br>'
menu8[4]='<a href="summer-breaks.php" class="1">Hotel Breaks</a><br>'
menu8[5]='<a href="game-fishing.php" class="1">Freshwater Fishing</a><br>'
menu8[6]='<a href="sea-fishing.php" class="1">Sea Fishing Norway</a><br>'
menu8[7]='<a href="summer-biking.php" class="1">Walking & Biking</a><br>'
menu8[8]='<a href="ski-cabin-lapland.php" class="1">Rent a Cabin</a><br>'
menu8[9]='<a href="summer-cottages.php" class="1">Summer Cottages</a><br>'
menu8[10]='<a href="camping-sweden.php" class="1">Camping Sweden</a><br>'
//menu8[10]='<a href="/holidays/sporting-break/" class="1">Sporting Break</a><br>'
menu8[11]='<a href="/holidays/sea-trout-fishing" class="1">Sea Trout Fishing</a><br>'
menu8[12]='<a href="/holidays/salmon-fishing" class="1">Salmon Fishing</a><br>'
menu8[13]='<a href="/fishing/repolanto-fishing" class="1">Repolanto Fishing Camp</a><br>'
menu8[14]='<a href="/norway/summer-tromso" class="1">Summer in Norway</a><br>'

// SETUP
		
var menuwidth='' //default menu width
var menubgcolor=''  //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="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" 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+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
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

function ahah(url,target) {
   // native XMLHttpRequest object
   document.getElementById(target).innerHTML = '<img src="binaries/loading.gif">';
   if (window.XMLHttpRequest) {
       req = new XMLHttpRequest();
       req.onreadystatechange = function() {ahahDone(target);};
       req.open("GET", url, true);
       req.send(null);
   // IE/Windows ActiveX version
   } else if (window.ActiveXObject) {
       req = new ActiveXObject("Microsoft.XMLHTTP");
       if (req) {
           req.onreadystatechange = function() {ahahDone(target);};
           req.open("GET", url, true);
           req.send();
       }
   }
}    
 

function ahahDone(target) {
   // only if req is "loaded"
   if (req.readyState == 4) {
       // only if "OK"
       if (req.status == 200 || req.status == 304) {
           results = req.responseText;
           document.getElementById(target).innerHTML = results;
       } else {
           document.getElementById(target).innerHTML="ahah error:\n" +
               req.statusText;
       }
   }
}

function popup(url)
{
	newwindow=window.open(url,'name','height=560,width=432');
	if (window.focus) {newwindow.focus()}
}
//-->


