<!--

function $()
{
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++)
	{
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}

function postHTTPReq(url,query,destinationid)
{
	if (window.XMLHttpRequest)
	{
		xmlhttp=new XMLHttpRequest();
		if (xmlhttp.overrideMimeType) { xmlhttp.overrideMimeType('text/html'); }
	}
	else if (window.ActiveXObject)
	{
		try
		{
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
                } 
                catch (e)
		{
			try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } 
			catch (e) {}
		}
	}
	if (xmlhttp)
	{
		xmlhttp.onreadystatechange = function()
		{
			if (xmlhttp.readyState==4)
			{
				if (xmlhttp.status==200) {
					$(destinationid).innerHTML = xmlhttp.responseText;
					$(destinationid).style.padding = "10px"; }
				else { $(destinationid).innerHTML = 'An error occurred, please try again.'; }
			}
		}
		xmlhttp.open("POST",url,true)
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", query.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.send(query);
	}
}


function getquote()
{

var qn = document.getElementById('quote_name').value;
var qe = document.getElementById('quote_email').value;
var qp = document.getElementById('quote_phone').value;
var qt = document.getElementById('quote_tours').value;
var ql = document.getElementById('quote_location').value;
//var qi = (document.getElementById('quote_photos').checked == true ? 1 : 0);
//var qd = document.getElementById('quote_display').value;

//var q = "quote_name="+qn+"&quote_email="+qe+"&quote_phone="+qp+"&quote_tours="+qt+"&quote_location="+ql+"&quote_photos="+qi+"&quote_display="+qd;
var q = "quote_name="+qn+"&quote_email="+qe+"&quote_phone="+qp+"&quote_tours="+qt+"&quote_location="+ql;

postHTTPReq('http://www.360virtualtours.co.uk/quote.php', encodeURI(q), 'instant_quote')

}

-->