// This controsl the form diplays etc


var xmlhttp;



function changeAdults(str)

{

xmlhttp=GetXmlHttpObject();

if (xmlhttp==null)

  {

  alert ("Browser does not support HTTP Request");

  return;

  }

var url="http://www.villastresov.com/rate/changeAdults.php";

url=url+"?cr="+str;

url=url+"&sid="+Math.random();

xmlhttp.onreadystatechange=stateChanged;

xmlhttp.open("GET",url,true);

xmlhttp.send(null);

}



function stateChanged()

{

if (xmlhttp.readyState==4)

{

document.getElementById("final").innerHTML=xmlhttp.responseText;







}

}



function GetXmlHttpObject()

{

if (window.XMLHttpRequest)

  {

  // code for IE7+, Firefox, Chrome, Opera, Safari

  return new XMLHttpRequest();

  }

if (window.ActiveXObject)

  {

  // code for IE6, IE5

  return new ActiveXObject("Microsoft.XMLHTTP");

  }

return null;



} 









function changeChildren(strK)

{

xmlhttp=GetXmlHttpObject();

if (xmlhttp==null)

  {

  alert ("Browser does not support HTTP Request");

  return;

  }

var url="http://www.villastresov.com/rate/changeAdults.php";

url=url+"?crK="+strK;

url=url+"&sid="+Math.random();

xmlhttp.onreadystatechange=stateChanged;

xmlhttp.open("GET",url,true);

xmlhttp.send(null);

}



function stateChanged()

{

if (xmlhttp.readyState==4)

{

document.getElementById("final").innerHTML=xmlhttp.responseText;







}

}



function GetXmlHttpObject()

{

if (window.XMLHttpRequest)

  {

  // code for IE7+, Firefox, Chrome, Opera, Safari

  return new XMLHttpRequest();

  }

if (window.ActiveXObject)

  {

  // code for IE6, IE5

  return new ActiveXObject("Microsoft.XMLHTTP");

  }

return null;



}







function changeInfants(strI)

{

xmlhttp=GetXmlHttpObject();

if (xmlhttp==null)

  {

  alert ("Browser does not support HTTP Request");

  return;

  }

var url="http://www.villastresov.com/rate/changeAdults.php";

url=url+"?crI="+strI;

url=url+"&sid="+Math.random();

xmlhttp.onreadystatechange=stateChanged;

xmlhttp.open("GET",url,true);

xmlhttp.send(null);

}



function stateChanged()

{

if (xmlhttp.readyState==4)

{

document.getElementById("final").innerHTML=xmlhttp.responseText;







}

}



function GetXmlHttpObject()

{

if (window.XMLHttpRequest)

  {

  // code for IE7+, Firefox, Chrome, Opera, Safari

  return new XMLHttpRequest();

  }

if (window.ActiveXObject)

  {

  // code for IE6, IE5

  return new ActiveXObject("Microsoft.XMLHTTP");

  }

return null;



}







function hide(tag){

document.getElementById(""+tag+"").style.visibility = 'hidden';

  

}

function show(tag){

document.getElementById(""+tag+"").style.visibility = 'visible';

}



function rateOff(){

document.getElementById("offseason").style.visibility = 'visible';

}



function rateOffClose(){

document.getElementById("offseason").style.visibility = 'hidden';

}



function rateHigh(){

document.getElementById("highseason").style.visibility = 'visible';

}



function rateHighClose(){

document.getElementById("highseason").style.visibility = 'hidden';

}



function rateHoliday(){

document.getElementById("holidayseason").style.visibility = 'visible';

}



function rateHolidayClose(){

document.getElementById("holidayseason").style.visibility = 'hidden';

}



function extraPersonCalc(){

document.getElementById("extraPerson").style.visibility = 'visible';

}



function extraPersonCalcClose(){

document.getElementById("extraPerson").style.visibility = 'hidden';

}



function extraPersonCalcHoliday(){

document.getElementById("extraPersonHoliday").style.visibility = 'visible';

}



function extraPersonCalcHolidayClose(){

document.getElementById("extraPersonHoliday").style.visibility = 'hidden';

}







function rateZero(){

document.getElementById("zero").style.visibility = 'visible';

}



function rateOffCloseZero(){

document.getElementById("zero").style.visibility = 'hidden';

}



function extraPersonCalcZero(){

document.getElementById("extraPersonZero").style.visibility = 'visible';

}



function extraPersonCalcCloseZero(){

document.getElementById("extraPersonZero").style.visibility = 'hidden';

}


function rateRomantic(){

document.getElementById("rateRomantic").style.visibility = 'visible';

}



function rateRomanticClose(){

document.getElementById("rateRomantic").style.visibility = 'hidden';

}


//this is for maintaining the package display rules if the user wants to update inquiry

function show_confirm_package()
{
var r=confirm("Do you want to keep the package?");
if (r==true)
  {
  history.go(-1);
  }
else
  {
  window.location='http://www.villastresov.com/rate/index.php';
  }
}


function payment(type_str)
{
	if(type_str == "Wire Transfer")
	{
	
		document.getElementById("Wire").innerHTML="The Below Credit Card Info is not necessary to fill out. Please use the following information:<br />Routing Number: ##########<br />Account Humber: ##########<br />International Swift Code: ###";
		
	}else{
	
		document.getElementById("Wire").innerHTML="";
	}
}
