function getPrice(cottageref,startdate,duration)
{

		  var xmlHttp;
		try
		{    // Firefox, Opera 8.0+, Safari
			xmlHttp=new XMLHttpRequest();    }
		  catch (e)
			{    // Internet Explorer 
			   try
			  {      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
			catch (e)
			  {      
			  try
				{        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
			  catch (e)
				{        alert("Your browser does not support AJAX!"); 
					   return false;  
							 }
								   }
									   }
			xmlHttp.onreadystatechange=function()
			  {
			  if(xmlHttp.readyState==4)
				{
				document.getElementById("price").innerHTML=xmlHttp.responseText;
				//alert(xmlHttp.responseText)
				}
			  }
			xmlHttp.open("GET","AJAX/getavaildates/getprice.asp?duration=" + duration + "&cottageref=" + cottageref + "&startdate=" + startdate,true);
			xmlHttp.send(null);
}




function doSearch(cottageref,duration,arrival)
{


document.getElementById("dates").innerHTML="<table width='220' border='0' cellspacing='0' cellpadding='0'><tr><td width='102' align='left'>Please wait... </td><td width='118' align='center'><img src='/2009graphics/loading-small.gif' title='Loading'></td></tr></table>"

  var xmlHttp;
try
{    // Firefox, Opera 8.0+, Safari
	xmlHttp=new XMLHttpRequest();    }
  catch (e)
    {    // Internet Explorer 
	   try
      {      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
    catch (e)
      {      
	  try
        {        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
      catch (e)
        {        alert("Your browser does not support AJAX!"); 
		       return false;  
			         }
					       }
						       }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
        document.getElementById("dates").innerHTML=xmlHttp.responseText;
		//alert(xmlHttp.responseText)
        }
      }
    xmlHttp.open("GET","AJAX/getavaildates/getdates.asp?duration=" + duration + "&cottageref=" + cottageref + "&arrival=" + arrival,true);
    xmlHttp.send(null);
	}
	
	
 function shortlist(cottageref)
{  var xmlHttp;
try
{    // Firefox, Opera 8.0+, Safari
	xmlHttp=new XMLHttpRequest();    }
  catch (e)
    {    // Internet Explorer 
	   try
      {      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
    catch (e)
      {      
	  try
        {        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
      catch (e)
        {        alert("Your browser does not support AJAX!"); 
		       return false;  
			         }
					       }
						       }

	
	var clicked = document.getElementById("hide");
	if (clicked.innerHTML=="Add Shortlist")
	{
	clicked.innerHTML = "<a href=shortlist.asp class=shortlistR>View&nbsp;Shortlist</a>"
	    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
		document.getElementById("numshortlist").innerHTML=xmlHttp.responseText
		//alert(xmlHttp.responseText)
        }
      }
    xmlHttp.open("GET","/shortlist/add.asp?cottageref="+cottageref,true);
    xmlHttp.send(null); }
	 }