﻿/***********************************************
* 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
***********************************************/
var tmpURL = window.location.href;
//Contents for menu 1

var menu1=new Array()
menu1[0]='<a href="http://www.indochinediscovery.com/HotelBookingForm.aspx">Hotel booking form</a>'
menu1[1]='<a href="http://www.indochinediscovery.com/TourBookingForm.aspx">Tour booking form</a>'
menu1[2]='<a href="http://www.indochinediscovery.com/FlightBookingForm.aspx">Flight booking form</a>'

var menu2=new Array()
menu2[0]='<a href="http://www.indochinediscovery.com/Vietnam-airlines-saigon.aspx">Vietnam air ticket</a>'
menu2[1]='<a href="http://www.indochinediscovery.com/TrainTicket.aspx">Vietnam train ticket</a>'
menu2[2]='<a href="http://www.indochinediscovery.com/BoatTicket.aspx">Vietnam boat ticket</a>'
menu2[3]='<a href="http://www.indochinediscovery.com/Pick-up-and-transfer-service.aspx">Pick up & transfer service</a>'
menu2[4]='<a href="http://www.indochinediscovery.com/Vietnam-visa.aspx">Vietnam visa</a>'

var menu3=new Array()
menu3[0]='<a href="http://www.indochinediscovery.com/Vietnam-country-and-people.aspx">Vietnam country & people</a>'
menu3[1]='<a href="http://www.indochinediscovery.com/Vietnam-destination.aspx">Vietnam destination</a>'
menu3[2]='<a href="http://www.indochinediscovery.com/Medical-service.aspx">Medical service</a>'
menu3[3]='<a href="http://www.indochinediscovery.com/Bar-and-restaurant.aspx">Embassies in Vietnam</a>'
menu3[4]='<a href="http://www.indochinediscovery.com/Bar-and-restaurant.aspx">Bar & Restaurant</a>'


var menu4=new Array()
menu4[0]='<a href="http://www.indochinediscovery.com/Saigon-Hotels.aspx">Saigon Hotels</a>'
menu4[1]='<a href="http://www.indochinediscovery.com/Vung-Tau-Hotels.aspx">Vung Tau  Hotels </a>'
menu4[2]='<a href="http://www.indochinediscovery.com/Phan-Thiet-Hotels.aspx">Phan Thiet Hotels</a>'
menu4[3]='<a href="http://www.indochinediscovery.com/Da-Lat-Hotels.aspx">Da Lat Hotels</a>'
menu4[4]='<a href="http://www.indochinediscovery.com/Nha-Trang-Hotels.aspx">Nha Trang Hotels</a>'
menu4[5]='<a href="http://www.indochinediscovery.com/Hoi-An-Hotels.aspx">Hoian Hotels</a>'
menu4[6]='<a href="http://www.indochinediscovery.com/Da-Nang-Hotels.aspx">Da Nang Hotels</a>'
menu4[7]='<a href="http://www.indochinediscovery.com/Hue-Hotels.aspx">Hue Hotels</a>'
menu4[8]='<a href="http://www.indochinediscovery.com/Ha-Noi-Hotels.aspx">Hanoi Hotels</a>'
menu4[9]='<a href="http://www.indochinediscovery.com/Sapa-Hotels.aspx">Sapa Hotels</a>'
menu4[10]='<a href="http://www.indochinediscovery.com/Phu-Quoc-Hotels.aspx">Phu Quoc Hotels</a>'
menu4[11]='<a href="http://www.indochinediscovery.com/Quy-Nhon-Hotels.aspx">Quy Nhon Hotels</a>'
menu4[12]='<a href="http://www.indochinediscovery.com/Can-Tho-Hotels.aspx">Can Tho Hotels</a>'
menu4[13]='<a href="http://www.indochinediscovery.com/Chau-Doc-Hotels.aspx">Chau Doc Hotels</a>'


var menu5=new Array()
menu5[0]='<span class="AirMenu">Vietnam internal flight</span>'
menu5[1]='<a href="http://www.indochinediscovery.com/Vietnam-airlines-saigon.aspx">Flight from/to HCM city</a>'
menu5[2]='<a href="http://www.indochinediscovery.com/Vietnam-airlines-hanoi.aspx">Flight from/to Ha Noi</a>'
menu5[3]='<span class="AirMenu">Flight from/to Vietnam</span>'
menu5[4]='<a href="http://www.indochinediscovery.com/Vietnam-airlines-indochina.aspx">Indochina</a>'
menu5[5]='<a href="http://www.indochinediscovery.com/Vietnam-airlines-south-east-asia.aspx">South East Asia</a>'
menu5[6]='<a href="http://www.indochinediscovery.com/Vietnam-airlines-north-east-asia.aspx">North East Asia</a>'
menu5[7]='<a href="http://www.indochinediscovery.com/Vietnam-airlines-north-america.aspx">North America</a>'
menu5[8]='<a href="http://www.indochinediscovery.com/Vietnam-airlines-europe.aspx">Europe</a>'
menu5[9]='<a href="http://www.indochinediscovery.com/Vietnam-airlines-australia.aspx">Australia</a>'




var menu6=new Array()
menu6[0]='<a href="http://www.indochinediscovery.com/Jetstar-airways-vietnam-internal-flight.aspx">Vietnam Internal flight </a>'
menu6[1]='<a href="http://www.indochinediscovery.com/Jetstar-airways-internationl-flight.aspx">Internationl flight<br/>&nbsp;from/to Vietnam</a>'


var menu7=new Array()
menu7[0]='<a href="http://www.indochinediscovery.com/Other-airlines-vietnam-to-america.aspx">Vietnam to America\' countries</a>'
menu7[1]='<a href="http://www.indochinediscovery.com/Other-airlines-vietnam-to-australia.aspx">Vietnam to Australia</a>'
menu7[2]='<a href="http://www.indochinediscovery.com/Other-airlines-vietnam-to-europe.aspx">Vietnam to Euro\' countries</a>'
menu7[3]='<a href="http://www.indochinediscovery.com/Other-airlines-vietnam-to-asia.aspx">Vietnam to Asia\' countries</a>'

var menu8=new Array()
menu8[0]='<a href="http://www.indochinediscovery.com/Content.aspx?ItemPK=10">Term and Condition </a>'
menu8[1]='<a href="http://www.indochinediscovery.com/Content.aspx?ItemPK=17">Booking procedure</a>'


var menu9=new Array()
menu9[0]='<a href="http://www.indochinediscovery.com/HCMC-stop-over-tours.aspx">HCMC stop over tours</a>'
menu9[1]='<a href="http://www.indochinediscovery.com/Mekong-delta-adventure-tours.aspx">Mekong delta tours</a>'
menu9[2]='<a href="http://www.indochinediscovery.com/Beach-tours.aspx">Beach tours</a>'
menu9[3]='<a href="http://www.indochinediscovery.com/Central-discovery-tours.aspx">Central discovery tours</a>'
menu9[4]='<a href="http://www.indochinediscovery.com/Southern-ecologic-tours.aspx">Southern Ecologic tours</a>'
menu9[5]='<a href="http://www.indochinediscovery.com/Northern-ecologic-tours.aspx">Northern Ecologic tours</a>'
menu9[6]='<a href="http://www.indochinediscovery.com/Hanoi-stop-over-tours.aspx">Hanoi stop over tours</a>'
menu9[7]='<a href="http://www.indochinediscovery.com/Halong-tours.aspx">Halong tours</a>'
menu9[8]='<a href="http://www.indochinediscovery.com/Sapa-tours.aspx">Sapa tours</a>'





var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
//var menubgcolor='#ffffff'  //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 getposOffset2(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft + 90 : what.offsetTop -10;
var parentEl=what.offsetParent; 
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide2(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
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 topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
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){ //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 populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu2(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){
showhide2(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset2(obj, "left")
dropmenuobj.y=getposOffset2(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue2()
}

function clickreturnvalue2(){
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 delayhidemenu2(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

