// JavaScript Document

/***********************************************
* 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 Hotel
var mhotel=new Array()
mhotel[0]='<a href="hotels.html" class="text_links">Hotels Home</a>'
mhotel[1]='<a href="city-wise-hotels-list.html?listfor=hotels&by=city" class="text_links">City wise list</a>'
mhotel[2]='<a href="city-wise-hotels-list.html?listfor=hotels&by=state" class="text_links">State wise list</a>'
mhotel[3]='<a href="city-wise-hotels-list.html?listfor=hotels&by=allindia" class="text_links">All India hotels</a>'
mhotel[4]='<a href="hotel-list.html?listfor=hotels&by=toprevived" class="text_links">Top  Revived hotels</a>'
mhotel[5]='<a href="hotel-list.html?listfor=hotels&by=budget" class="text_links">Find hotels by budget</a>'
mhotel[6]='<a href="city-wise-hotels-list.html?listfor=hotels&by=rating" class="text_links">Find hotels By rating</a>'
mhotel[7]='<a href="city-wise-hotels-list.html?listfor=hotels&by=type" class="text_links">Find hotels by type</a>'
mhotel[8]='<a href="city-wise-hotels-list.html?listfor=hotels&by=city" class="text_links">Write Review</a>'
//mhotel[9]='<a href="managehotels.php" class="text_links">Add Hotel</a>'

//Contents for Destination, and so on
var mdestination=new Array()
mdestination[0]='<a href="city-wise-destination-list.html?listfor=destination&by=city" class="text_links">City wise list</a>'
mdestination[1]='<a href="city-wise-destination-list.html?listfor=destination&by=state" class="text_links">State wise list</a>'
mdestination[2]='<a href="city-wise-destination-list.html?listfor=destination&by=allindia" class="text_links">All India list</a>'
mdestination[3]='<a href="destination_list.html?mode=top" class="text_links">Top destination</a>'
mdestination[3]='<a href="adddestination.php" class="text_links">Add Destination</a>'
mdestination[4]='<a href="selectdestheme.php" class="text_links">Find destination by theme</a>'

//Contents for Holidays
var mholiday=new Array()
mholiday[0]='<a href="city-wise-tours-list.html?listfor=tours&by=city" class="text_links">City wise list</a>'
mholiday[1]='<a href="city-wise-tours-list.html?listfor=tours&by=state" class="text_links">State wise list</a>'
mholiday[2]='<a href="city-wise-tours-list.html?listfor=tours&by=allindia" class="text_links">All India holidays</a>'
mholiday[3]='<a href="tours_list.html?mode=top" class="text_links">Top Tours list</a>'
mholiday[4]='<a href="tours_list.html?mode=recent" class="text_links">Recently added tours</a>'
//mholiday[5]='<a href="#" class="text_links">Find tours By themes</a>'
mholiday[6]='<a href="select-travel-agent.html" class="text_links">Find tours by travel agents</a>'

//Contents for Travelagents
var mtravelagents=new Array()
mtravelagents[0]='<a href="city-wise-travel-agent-list.html?listfor=agents&by=city" class="text_links">City wise travel agents</a>'
mtravelagents[1]='<a href="city-wise-travel-agent-list.html?listfor=agents&by=state" class="text_links">State wise travel agents</a>'
mtravelagents[2]='<a href="city-wise-travel-agent-list.html?listfor=agents&by=allindia" class="text_links">All India travel agents</a>'
mtravelagents[3]='<a href="agent_list.html?listfor=agents&by=top" class="text_links">Top rated  travel Agents</a>'
mtravelagents[4]='<a href="agent_list.html?listfor=agents&by=carrental" class="text_links">Car Rental Travels Agents</a>'
mtravelagents[5]='<a href="agent_list.html?listfor=agents&by=hotelbooking" class="text_links" class="text_links">Hotel booking travel agents</a>'
mtravelagents[6]='<a href="agent_list.html?listfor=agents&by=airticket" class="text_links">Air ticket booking travel agents</a>'
mtravelagents[7]='<a href="agent_list.html?listfor=agents&by=holidaymaker" class="text_links">Tours Holiday maker travel agents</a>'

//Contents for Airports
var mairports=new Array()
mairports[0]='<a href="airports.html" class="text_links">Air ports Home</a>'
mairports[1]='<a href="city-wise-airport-list.html?listfor=airports&by=city" class="text_links">City wise airport</a>'
mairports[2]='<a href="city-wise-airport-list.html?listfor=airports&by=state" class="text_links">State wise airport</a>'
mairports[3]='<a href="city-wise-airport-list.html?listfor=airports&by=allindia" class="text_links">All India airports</a>'
mairports[4]='<a href="airport_list.html?listfor=airports&by=domestic" class="text_links">Domestic Airport</a>'
mairports[5]='<a href="airport_list.html?listfor=airports&by=international" class="text_links">International airport</a>'

//Contents for Photos
var mphoto=new Array()
mphoto[0]='<a href="all-photos.html" class="text_links">View All</a>'
mphoto[1]='<a href="add-photo.html" class="text_links">Upload Photo</a>'
mphoto[2]='<a href="all-photos.html?mode=toprated" class="text_links">Top rated photo</a>'
mphoto[3]='<a href="all-photos.html?mode=myphoto" class="text_links">My travel photo</a>'
mphoto[4]='<a href="all-photos.html?mode=recent" class="text_links">Recently added photo</a>'

//Contents for Videos
var mvideo=new Array()
mvideo[0]='<a href="all-videos.html" class="text_links">View All</a>'
mvideo[1]='<a href="add-video.html" class="text_links">Upload Video</a>'
mvideo[2]='<a href="all-videos.html?mode=toprated" class="text_links">Top rated Video</a>'
mvideo[3]='<a href="all-videos.html?mode=myvideo" class="text_links">My video</a>'
mvideo[4]='<a href="all-videos.html?mode=recent" class="text_links">Recently added video</a>'

//Contents for Help
var mhelp=new Array()
mhelp[0]='<a href="all-travel-questions.html" class="text_links">Travel Q/A</a>'
mhelp[1]='<a href="ask-travel-question.html" class="text_links">Ask a Question</a>'
mhelp[2]='<a href="distance-travel-chart.php" class="text_links">Distance chart</a>'
mhelp[3]='<a href="bus-tickets.html" class="text_links">Bus tickets</a>'
mhelp[4]='<a href="railway-tickets.html" class="text_links">Railway tickets</a>'
mhelp[5]='<a href="flight-tickets.html" class="text_links">Flight tickets</a>'
mhelp[6]='<a href="use-fullinks.html" class="text_links">Useful (IMP) links</a>'


		
var menuwidth='165px' //default menu width
var menubgcolor='#3A8BCA'  //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="-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 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

