function getPrice()
{
	var url = 'price.php';

	if (document.getElementById('where').value!='' && document.getElementById('people').value!='' && document.getElementById('currency').value!='')
	 {
		url = url +'?t='+ document.getElementById('where').value + '&p='+ document.getElementById('people').value + '&c=' + document.getElementById('currency').value;
	 }
	else
	 {
		document.getElementById('price').value = '-';
		return false;
	 }

	if(typeof XMLHttpRequest != "undefined")
	 { /* Code for: IE 7 Firefox, Mozilla etc Safari Opera */ 
	  httpRequest = new XMLHttpRequest(); 
	 } 
	else if(typeof window.ActiveXObject != "undefined")
	 { /*  Code for: IE 5 IE 6 */ 
	  httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); 
	 }
	httpRequest.open("GET", url, true);
	httpRequest.onreadystatechange= function () {processRequest('price'); } ;
	httpRequest.send(null);
}

function getVianoPrice()
{
	var url = 'viano-price.php';

	if (document.getElementById('where').value!='' && document.getElementById('currency').value!='')
	 {
		url = url +'?t='+ document.getElementById('where').value + '&c=' + document.getElementById('currency').value;
	 }
	else
	 {
		document.getElementById('price').value = '-';
		return false;
	}

	if(typeof XMLHttpRequest != "undefined")
	 { /* Code for: IE 7 Firefox, Mozilla etc Safari Opera */ 
	  httpRequest = new XMLHttpRequest(); 
	 } 
	else if(typeof window.ActiveXObject != "undefined")
	 { /*  Code for: IE 5 IE 6 */ 
	  httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); 
	 }
	httpRequest.open("GET", url, true);
	httpRequest.onreadystatechange= function () {processRequest('price'); } ;
	httpRequest.send(null);
}        

function processRequest(mistoZobrazeni)
{
	if (httpRequest.readyState == 4)
	{
		if(httpRequest.status == 200)
		{
			var mistoZobrazeniVar = document.getElementById(mistoZobrazeni);
			mistoZobrazeniVar.value = httpRequest.responseText;
			document.getElementById('price_span').innerHTML = httpRequest.responseText;
			if (mistoZobrazeniVar.value == '-')
			{
				alert('This trip is available for only 1-8 people!');
			}
		}
	}
}





//2008.12.18
function checkprice()
 {
	 if (document.getElementById('price').value == '-') {alert('Please enter all information about trip!');return false;}
	 else return true;
 }
 
 
 
function showForm()
{
	var url = 'price-form.php';

	if(typeof XMLHttpRequest != "undefined")
	 { /* Code for: IE 7 Firefox, Mozilla etc Safari Opera */ 
	  httpRequest = new XMLHttpRequest(); 
	 } 
	else if(typeof window.ActiveXObject != "undefined")
	 { /*  Code for: IE 5 IE 6 */ 
	  httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); 
	 }
	httpRequest.open("GET", url, true);
	httpRequest.onreadystatechange= function () {processRequest2('get_price_form'); } ;
	httpRequest.send(null);
}
 
function processRequest2(showing_plase)
{
	if (httpRequest.readyState == 4)
	{
		if(httpRequest.status == 200)
		{
			var showing_plaseVar = document.getElementById(showing_plase);
			showing_plaseVar.innerHTML = httpRequest.responseText;
		}
	}
}
 
 