  tab1imgOn = new Image();
  tab1imgOn.src = "../images/minisites/nav_Overview_o.gif";
  tab1imgOff = new Image();
  tab1imgOff.src = "../images/minisites/nav_Overview.gif";
  tab2imgOn = new Image();
  tab2imgOn.src = "../images/minisites/nav_RoomsRates_o.gif";
  tab2imgOff = new Image();
  tab2imgOff.src = "../images/minisites/nav_RoomsRates.gif";
  tab3imgOn = new Image();
  tab3imgOn.src = "../images/minisites/nav_PhotosVideos_o.gif";
  tab3imgOff = new Image();
  tab3imgOff.src = "../images/minisites/nav_PhotosVideos.gif";
  tab4imgOn = new Image();
  tab4imgOn.src = "../images/minisites/nav_MapDirections_o.gif";
  tab4imgOff = new Image();
  tab4imgOff.src = "../images/minisites/nav_MapDirections.gif";
  
  imagerotation = new Image();imagerotation.src = "../content/images/common/bigrotation2.gif";
  pic1on= new Image(100,25);
  pic1on.src="../images/minisites/btn_virtual_tour_o.gif";
  pic2on= new Image(100,25);
  pic2on.src="../images/minisites/btn_video_o.gif";
  pic3on= new Image(100,25);
  pic3on.src="../images/minisites/btn_slideshow_o.gif";
  pic3off = new Image(100,25);
  pic3off.src="../images/minisites/btn_slideshow.gif";
  pic2off = new Image(100,25);
  pic2off.src="../images/minisites/btn_video.gif";
  pic1off= new Image(100,25);
  pic1off.src="../images/minisites/btn_virtual_tour.gif";
  pic1second_on = new Image(100,25);
  pic1second_on.src="../images/minisites/btn_virtual_tour_o.gif";
  pic2second_on= new Image(100,25);
  pic2second_on.src="../images/minisites/btn_video_o.gif";
  pic3second_on= new Image(100,25);
  pic3second_on.src="../images/minisites/btn_slideshow_o.gif";
  pic3second_off = new Image(100,25);
  pic3second_off.src="../images/minisites/btn_slideshow.gif";
  pic2second_off = new Image(100,25);
  pic2second_off.src="../images/minisites/btn_video.gif";
  pic1second_off= new Image(100,25);
  pic1second_off.src="../images/minisites/btn_virtual_tour.gif";

var map3 = null;
var center3 = null;
var zoom3 = null;
function getTab(tab) {
    if (navigator.userAgent.indexOf('Opera') != -1) {
        retAjaxVal = true;
        return;
    }

    if (activeTab == tab) return;

    disableDiv($("tabdiv"));

    if ('tab1' == tab){
        url = check_url+"&bmInSession=true&ajax=true&tab=tab1";
    }
    if ('tab2' == tab){
        url = check_url+"&bmInSession=true&ajax=true&tab=tab2";
    }
    if ('tab3' == tab){
        url = check_url+"&bmInSession=true&ajax=true&tab=tab3";
     }
    if ('tab4' == tab){
        url = check_url+"&bmInSession=true&ajax=true&tab=tab4";
    }

    HttpObjTab.open("GET", url, true);;
    HttpObjTab.onreadystatechange= function () {
      if (HttpObjTab.readyState == 4) {
        if (HttpObjTab.status == 200) {
          try {
            var ret =  HttpObjTab.responseText;
            if (ret !=null && ret.replace(/^\s+|\s+$/g,"").length > 0){
                newDiv = document.createElement('div');
                newDiv.innerHTML = ret;
                $("tabdiv").innerHTML = "";
                $("tabdiv").appendChild(newDiv);

                activeTab = tab;

                $('img_tab1').src = tab1imgOff.src;
                $('img_tab1').style.cursor = "pointer";
                $('img_tab1').onclick = "getTab('tab1');return false;";

                $('img_tab2').src = tab2imgOff.src;
                $('img_tab2').style.cursor = "pointer";
                $('img_tab2').onclick = "getTab('tab2');return false;";

                $('img_tab3').src = tab3imgOff.src;
                $('img_tab3').style.cursor = "pointer";
                $('img_tab3').onclick = "getTab('tab3');return false;";

                $('img_tab4').src = tab4imgOff.src;
                $('img_tab4').style.cursor = "pointer";
                $('img_tab4').onclick = "getTab('tab4');return false;";

                if ('tab1' == tab) {
                    __ms_current_tab = "tab1";
                    $('img_tab1').src = tab1imgOn.src;
                    $('img_tab1').style.cursor = "default";
                    $('img_tab1').onclick = "return false;";
 						var map = new VEMap('myMap1');
                        var latitude =document.getElementById('latitude').value;
                        var longitude=document.getElementById('longitude').value;
                        map.SetDashboardSize(VEDashboardSize.Tiny);

                        map.LoadMap(new VELatLong(latitude,longitude),13,VEMapStyle.Road,1,null,1);

                        //var pin = new VEShape(VEShapeType.Pushpin,new VELatLong(latitude,longitude));
                        //pin.SetCustomIcon("../images/specialoffers/wr/1_bullet.gif");
			   var pin = new VEShape(VEShapeType.Pushpin,new VELatLong(latitude,longitude));
                        var customIcon ="<div class='pinStyle2'></div>"; 
                        pin.SetCustomIcon(customIcon);
                        map.AddShape(pin);

                }
                if ('tab2' == tab) {
                    __ms_current_tab = "tab2";
                    $('img_tab2').src = tab2imgOn.src;
                    $('img_tab2').style.cursor = "default";
                    $('img_tab2').onclick = "return false;";
                }
                if ('tab3' == tab) {
                    __ms_current_tab = "tab3";
                    $('img_tab3').src = tab3imgOn.src;
                    $('img_tab3').style.cursor = "default";
                    $('img_tab3').onclick = "return false;";
                }
                if ('tab4' == tab) {
                    __ms_current_tab = "tab4";
                    $('img_tab4').src = tab4imgOn.src;
                    $('img_tab4').style.cursor = "default";
                    $('img_tab4').onclick = "return false;";
			   map3 = new VEMap('myMap4');
                        var latitude =document.getElementById('latitude').value;
                        var longitude=document.getElementById('longitude').value;
                        map3.HideDashboard();
                        var options = new VEMapOptions();
                        map3.LoadMap(new VELatLong(latitude,longitude),12,VEMapStyle.Road, null, null, false, 0, options); 
                        AddMyControl3();
                        map3.ClearInfoBoxStyles();
                        var pin = new VEShape(VEShapeType.Pushpin,new VELatLong(latitude,longitude));
                        var customIcon ="<div class='pinStyle2'></div>"; 
                        pin.SetCustomIcon(customIcon);
                        map3.AddShape(pin);
			   center3=map3.GetCenter();
                	   zoom3=map3.GetZoomLevel();

                }

             } else {
                location.href = 'error';
             }
          } catch (ex) {
          }
        } else if (HttpObjTab.status != 0) {
            location.href = 'error';
        }
      }
    }
    HttpObjTab.send(null);
}

var mapcontrol3;

function AddMyControl3()
{
	if (mapcontrol3 == null)
	{
		mapcontrol3 = document.createElement("div");
		mapcontrol3.id = "myControl";
		mapcontrol3.style.position = "absolute";
		mapcontrol3.style.top ="0px";
		mapcontrol3.style.left = "0px";
		mapcontrol3.style.height = "28px";
		mapcontrol3.style.width = "70px";
		mapcontrol3.style.zIndex = 10;
		//mapcontrol.style.border = "1px solid black";
		mapcontrol3.style.background = "transparent";
		mapcontrol3.innerHTML = '<table cellspacing=0 cellpadding=0><tr valign=top>'
			+ '<td><input id="zoomin" type="image" src="../images/map/ZoomIn.gif" onclick="map3.ZoomIn(); return false;" ondblclick="map3.ZoomIn(); return false;" onMouseOver="this.src=\'../images/map/ZoomIn2.gif\';" onMouseOut="this.src=\'../images/map/ZoomIn.gif\';"/></td>'
			+ '<td><input id="zoomout" type="image" src="../images/map/ZoomOut.gif" onclick="map3.ZoomOut(); return false;" ondblclick="map3.ZoomOut(); return false;" onMouseOver="this.src=\'../images/map/ZoomOut2.gif\';" onMouseOut="this.src=\'../images/map/ZoomOut.gif\';"/><img src="../images/map/Seperator.gif"></td>'
			+ '<td><input id="reset" type="image" src="../images/map/Reset.gif" onclick="resetMap3(); return false;" onMouseOver="this.src=\'../images/map/Reset2.gif\';" onMouseOut="this.src=\'../images/map/Reset.gif\';"/></td>'
			+ '</tr></table>';
		document.getElementById('myMap4').appendChild(mapcontrol3);
	}

}

function resetMap3(){
	map3.SetMapStyle(VEMapStyle.Road);
	map3.SetCenterAndZoom(center3, zoom3);
}

function disableDiv(elm) {
  var divPos = getElementPosition(elm);

  _width = elm.offsetWidth;
  _height = elm.parentNode.offsetHeight;
  _top = divPos.y;
  _left = divPos.x;

  overlay = document.createElement("div");
  overlay.style.width = _width + "px";
  overlay.style.height = _height + "px";

  overlay.style.position = "absolute";
  overlay.style.background = "#eeeeee";
  overlay.style.top = _top + "px";
  overlay.style.left = _left + "px";

  overlay.style.filter = "alpha(opacity=85)";
  overlay.style.opacity = "0.85";
  overlay.style.mozOpacity = "0.85";

  overlay.style.cursor = "wait";

  img = document.createElement("img");
  img.style.position = "absolute";
  imgtop = 100;
  if (_height < 40) imgtop = 0;
  img.style.top = imgtop;
  img.style.left = _width/2-16;
  img.src = "../content/images/common/bigrotation2.gif";
  overlay.appendChild(img);
  elm.appendChild(overlay);
}
function lightup(imgName) {
  if (document.images) {
      imgOn=eval(imgName + "on.src");
      document[imgName].src = imgOn;
  }
}

function turnoff(imgName) {
  if (document.images) {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
  }
}
