var resColor = "#6D542B";
    
function doOnload(){
	//setInterval("changeResColor()",1000);

	getBookingBox("23293");
}


function changeResColor() {
	
	if (resColor == "#6D542B") {
		document.getElementById("AnimateRes").style.color = "#FFFFFF"

		if (document.getElementById("Internet")) {
			document.getElementById("Internet").style.color = "#FFFFFF"
		}

		resColor = "#FFFFFF"
	}
	else {
		document.getElementById("AnimateRes").style.color = "#6D542B"
		if (document.getElementById("Internet")) {
			document.getElementById("Internet").style.color = "#6D542B"
		}
		resColor = "#6D542B"
	}	
}


/*
	YAHOO.util.Event.on('AnimateRes', 'click', function() {	
		document.getElementById("idReservation").style.display = "block";


		var attributes1 = {
		    height: { from:0, to: 230 },
		    width: { from:0, to: 200 }
		};

		var anim = new YAHOO.util.Anim('idReservation', attributes1);
		anim.animate();
	}
	);


	YAHOO.util.Event.on('closeRes', 'click', function() {	


		var attributes1 = {
		    height: { to: 0 },
		    width: { to: 0 }
		};

		var anim = new YAHOO.util.Anim('idReservation', attributes1);
		anim.animate();

	}
	);
*/


function load() {

	  

      if (GBrowserIsCompatible()) {



        var map = new GMap2(document.getElementById("map"));


        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());

        //map.setCenter(new GLatLng(18.541471, 73.883657), 11);
        map.setCenter(new GLatLng(18.541471, 73.883657), 11);

        // Create our "tiny" marker icon
        var blueIcon = new GIcon(G_DEFAULT_ICON);
        blueIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/blue/blank.png";
		
		// Set up our GMarkerOptions object
		markerOptions = { icon:blueIcon };

          var latlng = new GLatLng(18.541471, 73.883657);
      
		//map.addOverlay(new GMarker(latlng, markerOptions));
		map.addOverlay(createMarker(latlng,"Sun-n-Sand Hotel"));

		var srtHtml;
		
		srtHtml = '<span style="font-size:8pt">Sun-n-Sand Hotel';
		srtHtml = srtHtml + "<br>";
		srtHtml = srtHtml + "3262, Bund Garden Road,";
		srtHtml = srtHtml + "<br>";
		srtHtml = srtHtml + "Pune - 411 001,";
		srtHtml = srtHtml + "<br>";
		srtHtml = srtHtml + "India";
		srtHtml = srtHtml + "<br>";
		srtHtml = srtHtml + "<br>";
		srtHtml = srtHtml + "Tel: +91-20-2616 7777";
		srtHtml = srtHtml + "<br>";
		srtHtml = srtHtml + "Fax:+91-20-6164747";
		srtHtml = srtHtml + "<br>";										
		srtHtml = srtHtml + 'Email: <a style="color:blue" href="mailto:reservations@sunnsandpune.com">reservations@sunnsandpune.com</a></span>';								
		
		map.openInfoWindow(latlng,srtHtml);	
		

		//marker.openInfoWindowHtml(number);

      }

      

}



	function createMarker(point, html) { 		
		
		var marker = new GMarker(point);
		
		//GEvent.addListener(marker, "mouseover", function() {  
		//	marker.openInfoWindowHtml(number);
		//});  
		

		return marker;
	}


function showBigImage(img,folder,Orientation) {
	
	var clientWidth;
	var clientHeight;
	
	clientWidth = document.body.clientWidth	
	clientHeight = document.body.clientHeight	


	document.images.imgBigImage.src = "images/" + folder + "/big/" + img;	
	
	if (Orientation == "L") {
		document.getElementById("idBigImage").style.width = "480px";
		document.getElementById("idBigImage").style.height = "350px";
				
		document.getElementById("idClose").style.left = "220";
		document.getElementById("idClose").style.top = "325";
	}
	else {
		document.getElementById("idBigImage").style.width = "330px";
		document.getElementById("idBigImage").style.height = "500px";		

		document.getElementById("idClose").style.left = "140";
		document.getElementById("idClose").style.top = "475";

	}

	document.getElementById("idBigImage").style.left = ((clientWidth -  parseInt(document.getElementById("idBigImage").style.width)) / 2) + parseInt(document.body.scrollLeft);
	document.getElementById("idBigImage").style.top = ((clientHeight -  parseInt(document.getElementById("idBigImage").style.height)) / 2) + parseInt(document.body.scrollTop);

	document.getElementById("idBigImage").style.display = "block";	
	

	return true;
	
}

function hideBigImage() {
	document.getElementById("idBigImage").style.display = "none";
	document.images.imgBigImage.src = "images/rooms/big/loading.jpg"
}
