// JavaScript Document


function xmlhttp()
{ 
	var xmlhttp=false;
	try
	{
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(E)
		{
			if (!xmlhttp && typeof XMLHttpRequest!='undefined') xmlhttp=new XMLHttpRequest();
		}
	}
	return xmlhttp; 
}


function mostrarpounds (e,p){
		
		theObject = document.getElementById("PrecioPounds");
		
		theObject.style.visibility = "visible";
		theObject.style.height = "30px";
		theObject.style.width = "200px";
		
		var posx = -10;
		var posy = -10;
		
		posx = e.clientX + document.body.scrollLeft ;
		posy = e.clientY + document.body.scrollTop;
		
		theObject.style.left = posx + "px";
		theObject.style.top = posy + "px";	
		
		theObject.innerHTML="<span id=\"SpanMensajeChildren\">Price in Pounds <span class=\"price\">"+ p+" &pound;</span></span>";
		
	}

function esconderpounds (){
		tObject = document.getElementById("PrecioPounds");
		tObject.style.visibility = "hidden";
		tObject.style.height = "0px";
		tObject.style.width = "0px";
 }

/*
function mostrarloader(){
      var cuarta=window.screen.height/4;
	  var screentop=(window.screen.height-56)/2-cuarta;
      var screenleft=(window.screen.width-200)/2;
	  document.getElementById('loaderdiv').style.display="block";
	  document.getElementById('loaderdiv').style.width="200px";
	  document.getElementById('loaderdiv').style.height="56px";	
	  document.getElementById('loaderdiv').style.top=screentop;	
	  document.getElementById('loaderdiv').style.left=screenleft;	
}*/

function validatestep1(form){
  var error="";
  if(form.rooms.options.selectedIndex==0)
    {error+="Number of rooms required.\n";}
  if(form.occupancy.options.selectedIndex==0)
    {error+="Occupancy required.";}
  if(error=="") 
    { //mostrarloader();
	  return true;}
  else {alert("The following errors occurred:\n\n"+error); return false;}
}

function validatecheck(form){
  var error="";
  if(form.email.value=="")
    {error+="Email required.\n";}
  if(form.locator.value=="")
    {error+="Locator required.";}
  if(error=="") form.submit();
  else alert(error); 
}


