function doPropertyDetails(TheActionUrl, theContainer, Gallery_id){			//alert(theObject);
		
		var handleFailure = function(o){
			if(o.responseText !== undefined){
				document.getElementById(theContainer).innerHTML = "<li>Transaction id: " + o.tId + "</li>";
				document.getElementById(theContainer).innerHTML += "<li>HTTP status: " + o.status + "</li>";
				document.getElementById(theContainer).innerHTML += "<li>Status code message: " + o.statusText + "</li>";
			}
		}
		var callback=			
		{
		  success: function(o){				
		  	document.getElementById(theContainer).innerHTML = o.responseText;
			//startGallery(Gallery_id);			
		  },
		  failure:handleFailure
		};		
				
	var request = YAHOO.util.Connect.asyncRequest('GET', TheActionUrl + "&ms=" + new Date().getTime(), callback);								
}

function startGallery(theGallery) {
	var myGallery = new gallery($(theGallery), {
			timed: false,
			showArrows: true,
			showCarousel: true,
			embedLinks: false			
	});
}

function dofavorites(TheActionUrl, theActionObject, theAction){			//alert(theObject);
		
		var handleFailure = function(o){
			if(o.responseText !== undefined){
				document.getElementById(theActionObject).innerHTML = "<li>Transaction id: " + o.tId + "</li>";
				document.getElementById(theActionObject).innerHTML += "<li>HTTP status: " + o.status + "</li>";
				document.getElementById(theActionObject).innerHTML += "<li>Status code message: " + o.statusText + "</li>";
			}
		}
		var callback=			
		{
		  success: function(o){				
			if (theAction == "add") {
			  	var collection = document.getElementsByName('Add_' + theActionObject);		// add this any other similar property page
				for (var i = 0; i < collection.length; i++){
					collection[i].innerHTML = "<font color=red>Property Added!</font>";
				}
			}
			if (theAction == "remove") {
			  	var collection = document.getElementsByName('Add_' + theActionObject);		// add this any other similar property page
				//alert(collection.length);
				for (var i = 0; i < collection.length; i++){
					collection[i].innerHTML = "";
					collection[i].innerHTML =  "<a href=\"javascript:void(0);\" onclick=\"javascript:dofavorites(\'/travel/favorites/favorites.asp?Ajax=yes&action=add&item=" + theActionObject + "&count=1\'," + theActionObject + ", \'add\');\"><span style=\"font-family:Arial;font-weight:bold;font-size:14px;color:blue\">+</span>&nbsp;<u>Add&nbsp;to&nbsp;shortlist</u></a>";
				}
			}
			refreshfavorites('favorites');
			
		  },
		  failure:handleFailure
		};		
				
	var request = YAHOO.util.Connect.asyncRequest('GET', TheActionUrl + "&ms=" + new Date().getTime(), callback);								
}


function refreshfavorites(theObject)
{
	var theIcon = document.getElementById(theObject + "_icon");
	var theUrl = "/travel/show_favorites.asp?Ajax=yes&action=show";
	
	//alert(theObject);
		
		var handleFailure = function(o){
			if(o.responseText !== undefined){
				document.getElementById(theObject).innerHTML = "<li>Transaction id: " + o.tId + "</li>";
				document.getElementById(theObject).innerHTML += "<li>HTTP status: " + o.status + "</li>";
				document.getElementById(theObject).innerHTML += "<li>Status code message: " + o.statusText + "</li>";
			}
		}
		var callback=			
		{
		  success: function(o){				
			document.getElementById(theObject).innerHTML = o.responseText;
			if (theIcon !== null) {
				showhide(theObject + "_icon");
			}
			refreshnfavorites('nf');
		  },
		  failure:handleFailure
		};		
		
	if (theIcon !== null) {
		showhide(theObject + "_icon");
	}
		
	var request = YAHOO.util.Connect.asyncRequest('GET', theUrl + "&ms=" + new Date().getTime(), callback);								

}

function refreshnfavorites(theObject)
{
	var theUrl = "/travel/nf.asp?Ajax=yes&mode=-1";
	
	//alert(thePage.href);
		
		var handleFailure = function(o){
			if(o.responseText !== undefined){
				document.getElementById(theObject).innerHTML = "<li>Transaction id: " + o.tId + "</li>";
				document.getElementById(theObject).innerHTML += "<li>HTTP status: " + o.status + "</li>";
				document.getElementById(theObject).innerHTML += "<li>Status code message: " + o.statusText + "</li>";
			}
		}
		var callback=			
		{
		  success: function(o){				
			document.getElementById(theObject).innerHTML = o.responseText;
		  },
		  failure:handleFailure
		};		
		
	var request = YAHOO.util.Connect.asyncRequest('GET', theUrl + "&ms=" + new Date().getTime(), callback);	

}

