function getextras() {
var extrasvalue = ""
	if(!document.form_extras.extras)
		return "";
	var radioLength = document.form_extras.extras.length;
	if(radioLength == undefined)
		if(document.form_extras.extras.checked)
			return document.form_extras.extras.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(document.form_extras.extras[i].checked) {
			var extrasvalue = extrasvalue + document.form_extras.extras[i].value + ',';
		}		
	}
	return extrasvalue;
	return "";
}

var xmlHttp_Costs

function getCosts()
{ 

//document.submitbooking.submit.disabled=true;

xmlHttp_Costs=GetxmlHttp_CostsObject();
if (xmlHttp_Costs==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 

var url="/booking_costs.cfm";
url=url+"?extras="+getextras();
url=url+"&arrivedate="+document.form_extras.arrivedate.value;
url=url+"&departdate="+document.form_extras.departdate.value;
url=url+"&prop_id="+document.form_extras.prop_id.value;
url=url+"&bedrooms="+document.form_extras.bedrooms.value;
url=url+"&pricecode="+document.form_extras.pricecode.value;
url=url+"&taxrate="+document.form_extras.taxrate.value;
//url=url+"&departure="+document.form_dates.departure.value;
//url=url+"&prop_id="+document.form_dates.prop_id.value;
url=url+"&sid="+Math.random();
xmlHttp_Costs.onreadystatechange=function() {
if (xmlHttp_Costs.readyState==4)
{ 
document.getElementById('txtCosts').innerHTML=xmlHttp_Costs.responseText;
if (xmlHttp_Costs.responseText.indexOf('Sorry') >= 0)
{
}
else
{
//document.submitbooking.submit.disabled=false;
}
}
};
xmlHttp_Costs.open("GET",url,true);
xmlHttp_Costs.send(null);
document.getElementById('txtCosts').innerHTML="<center><img src='/loading2.gif'  /></center>";
}

function GetxmlHttp_CostsObject()
{
var xmlHttp_Costs=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp_Costs=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp_Costs=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp_Costs=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp_Costs;
}