/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
//menu1[0]='<a href="./cathy_journey.asp">Shopping journey with Cathy</a>'
//menu1[1]='<a href="./mary_tours.asp">Culinary journey with Mary</a>'
//menu1[2]='<a href="./india_journey.asp">India journey</a>'
menu1[0]='<a href="./ombak_putih.asp">The great ombak putih</a>'
menu1[1]='<a href="#">Worlds Top Spa</a>'
menu1[2]='<a href="./zen_journey.asp">Bali discovery journey</a>'

var menuwidtx='175px' //default menu width
var menubgcolox='#660033'  //menu bgcolor
var disappeardelax=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenux_onclicx="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:'+menuwidtx+';background-color:'+menubgcolox+'" onMouseover="clearhidemenux()" onMouseout="dynamichidex(event)"></div>')

function getposOffsetx(what, offsettype){
var totaloffsetx=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffsetx=(offsettype=="left")? totaloffsetx+parentEl.offsetLeft : totaloffsetx+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffsetx;
}


function showhidex(obj, e, visible, hidden, menuwidtx){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidtx!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidtx
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattestx(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredgex(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattestx().scrollLeft+iecompattestx().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattestx().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattestx().scrollTop+iecompattestx().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenux(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenux(obj, e, menucontents, menuwidtx){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenux()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenux(menucontents)

if (ie4||ns6){
showhidex(dropmenuobj.style, e, "visible", "hidden", menuwidtx)
dropmenuobj.x=getposOffsetx(obj, "left")
dropmenuobj.y=getposOffsetx(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredgex(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredgex(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvaluex()
}

function clickreturnvaluex(){
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 dynamichidex(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenux()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenux()
}

function hidemenux(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenux(){
if (ie4||ns6)
delayhide=setTimeout("hidemenux()",disappeardelax)
}

function clearhidemenux(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenux_onclicx=="yes")
document.onclick=hidemenux

function MM_jumpMenu(targ,selObj,restore){ 
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


