var _xmlhttp;

//if (canQuote())
{
	document.write('<script type="text/javascript" src="http://www.virtualparcels.com/wmst/http?request=getquote&app=vp&format=js">');
	document.write('</script>');
}

function canQuote()
{
	if (location.pathname.indexOf("page.cfm") != -1)
	{
		if (document.title == "Related Websites") return false;
		return true;
	}
	if (location.pathname.indexOf("article.cfm") != -1) return true;
	if (location.pathname == "") return true;
	if (location.pathname == "/") return true;
	return false;
}

function getQuote()
{
	document.getElementById("quoteRefresh").src = "http://www.virtualparcels.com/shared/images/ajaxButton.gif";
	
	var url = "http://localhost:8050/wmst/http?request=getquote&app=vp&format=html";
	if (window.XMLHttpRequest) _xmlhttp = new XMLHttpRequest();
	else if (window.ActiveXObject) _xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	else return;
	if (!_xmlhttp) return;
	_xmlhttp.onreadystatechange = handleResponse;
	// Use POST because no time for finding how to disable IE caching of GET
	_xmlhttp.open("POST", url, true);
	_xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	_xmlhttp.send();
}

function handleResponse()
{
	if(_xmlhttp.readyState != 4) return
	if (_xmlhttp.status != 200) return;
	document.getElementById("famousQuote").innerHTML = _xmlhttp.responseText;
}

