var map=null
function goto_map_position(lat,lng){
map.panTo(new GLatLng(lat,lng))}
function load(){
if(GBrowserIsCompatible()){
var str=parent.document.getElementById("Hidden1").value
var cityd=new Array()
cityd=str.split(';')
map=new GMap2(document.getElementById("map"))
map.addControl(new GSmallMapControl())
map.addControl(new GMapTypeControl())
map.getPane(G_MAP_FLOAT_PANE).appendChild(tooltip)
tooltip.style.visibility="hidden"
var citydd=new Array()
citydd=cityd[0].split(',')
if(parent.document.getElementById("Hidden2").value=='')
{
map.setCenter(new GLatLng(citydd[1],citydd[0]),10)
}
else
{
map.setCenter(new GLatLng(citydd[1],citydd[0]),15)
}
var hoteld=new Array()
hoteld=cityd[1].split('|')
for(i=0;i<hoteld.length-1;i++){
var hoteldd=new Array()
hoteldd=hoteld[i].split('^')
function createMarker(point,ccty,add,image,price,hotellink){
var redIcon=new GIcon()
var no=i+1
redIcon.image="http://www.allhoteldeals.net/images/iconr"+(i+1)+".png"
redIcon.iconAnchor=new GPoint(9,34)
redIcon.infoWindowAnchor=new GPoint(9,2)
redIcon.iconSize=new GSize(15,26)
opts={
"icon": redIcon,
"clickable": true}
var box="<table border='0' cellpadding='2' cellspacing='0' style='width: 200px' class='Text1'><tr><td align='left' colspan='3' width='100%'><a style='color: maroon' href='"+hotellink+"' class='HeadText_Hname1'>"+ccty+"</a></td></tr><tr><td align='left' width='145'><span style='color: maroon'>Prices From: <b>"+price+"</b></span></td></tr></table>"
var marker=new GMarker(point,opts)
GEvent.addListener(marker,"click",function(){
marker.openInfoWindowHtml("<table border='0' cellpadding='0' cellspacing='0' style='width: 200px' ><tr><td align='left' colspan='3' width='100%'><a style='color: maroon' target='_blank' href='"+hotellink+"' class='HeadText_Hname1' >"+ccty+"</a></td></tr><tr><td valign='top' align='left'><a style='color: maroon' target='_blank' href='"+hotellink+"' ><img height='40' width='50' valign='Top' border='2' src='"+image+"' style='border-color:white' /></a></td><td width='5'></td><td align='left'  class='HeadText_Hname2'>"+add+"<br /><span style='color:maroon' class='HeadText_Hname1'>Prices From: <b>"+price+"</b></span></td></tr></table>")}
)
GEvent.addListener(marker,"mouseover",function(){
marker.setImage("http://www.allhoteldeals.net/images/yellowiconr"+no+".png")
showTooltip(marker,box)}
)
GEvent.addListener(marker,"mouseout",function(){
marker.setImage("http://www.allhoteldeals.net/images/iconr"+no+".png")
tooltip.style.visibility="hidden"}
)
return marker}
var point=new GLatLng(hoteldd[4],hoteldd[3])
map.addOverlay(createMarker(point,hoteldd[0],hoteldd[1],hoteldd[2],hoteldd[5],hoteldd[6]))}
if(parent.document.getElementById("Hidden2").value!='')
{
var hotelstr=parent.document.getElementById("Hidden2").value;
var hotelinfo=new Array();
hotelinfo=hotelstr.split('^');
var hotelpoint=new GLatLng(hotelinfo[4],hotelinfo[3])
map.setCenter(new GLatLng(hotelinfo[4],hotelinfo[3]),15)

map.openInfoWindowHtml(hotelpoint,"<table border='0' cellpadding='0' cellspacing='0' style='width: 200px' ><tr><td align='left' colspan='3' width='100%'><a style='color: maroon' target='_blank' href='"+hotelinfo[6]+"' class='HeadText_Hname1' >"+hotelinfo[0]+"</a></td></tr><tr><td valign='top' align='left'><a style='color: maroon'  target='_blank' href='"+hotelinfo[6]+"' ><img height='40' width='50' valign='Top' border='2' src='"+hotelinfo[2]+"' style='border-color:white' /></a></td><td width='5'></td><td align='left'  class='HeadText_Hname2'>"+hotelinfo[1]+"<br /><span style='color:maroon' class='HeadText_Hname1'>Prices From: <b>"+hotelinfo[5]+"</b></span></td></tr></table>")
}
map.addOverlay(createMarkerCity(citydd[1],citydd[0],citydd[2]))

function createMarkerCity(long1,lat1,City){
var Citypoint=new GLatLng(citydd[1],citydd[0])
var redIcon=new GIcon()
redIcon.image="http://www.allhoteldeals.net/images/imagestar.png"
redIcon.iconAnchor=new GPoint(9,34)
redIcon.infoWindowAnchor=new GPoint(9,2)
opts={
"icon": redIcon,
"clickable": true,
"title":City}
var marker=new GMarker(Citypoint,opts)
return marker}}
map.enableGoogleBar()}
var tooltip=document.createElement("div")
function showTooltip(marker,box){
tooltip.innerHTML="<div class='tooltip'>"+box+"</div>"
var point=map.getCurrentMapType().getProjection().fromLatLngToPixel(map.fromDivPixelToLatLng(new GPoint(0,0),true),map.getZoom())
var offset=map.getCurrentMapType().getProjection().fromLatLngToPixel(marker.getPoint(),map.getZoom())
var anchor=marker.getIcon().iconAnchor
var width=marker.getIcon().iconSize.width
var height=tooltip.clientHeight
var pos=new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(offset.x-point.x-anchor.x+width,offset.y-point.y-anchor.y-height))
pos.apply(tooltip)
tooltip.style.visibility="visible"}

function stopErrors(){
return true}
window.onerror=stopErrors
function filterSectionClick(obj,img1){
var div_show=document.getElementById(obj)
if(div_show.style.visibility=="hidden"){
div_show.style.visibility="visible"
div_show.style.display="block"
document.getElementById(img1).src="http://www.allhoteldeals.net/Images/up.jpg"}
else if(div_show.style.visibility=="visible"){
div_show.style.visibility="hidden"
div_show.style.display="none"
document.getElementById(img1).src="http://www.allhoteldeals.net/Images/down.jpg"}}
function showmap(lnk){
if(lnk.innerHTML=="Hide Map"){
document.getElementById("map1").style.visibility="hidden"
document.getElementById("map1").style.display="none"
lnk.innerHTML="View Map"}
else if(lnk.innerHTML=="View Map"){
document.getElementById("map1").style.visibility="visible"
document.getElementById("map1").style.display="block"
lnk.innerHTML="Hide Map"}
return false}
function centerDiv(divobj){
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
divobj=document.getElementById(divobj)
var ie=document.all&&!window.opera
var dom=document.getElementById
var scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
var scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
var docwidth=(ie)? this.standardbody.clientWidth : window.innerWidth-this.scrollbarwidth
var docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
var docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)? this.standardbody.offsetHeight : this.standardbody.scrollHeight
var objwidth=divobj.offsetWidth
var objheight=divobj.offsetHeight
var topposition=(docheight>objheight)? scroll_top+docheight/2-objheight/2+"px" : scroll_top+10+"px"
divobj.style.left=docwidth/2-objwidth/2+"px"
divobj.style.top=Math.floor(parseInt(topposition))+"px"
divobj.style.visibility="visible"}

