var mapwindow = '';

function createRequestObject(){

var req;

if(window.XMLHttpRequest){
//For Firefox, Safari, Opera
req = new XMLHttpRequest();
}
else if(window.ActiveXObject){
//For IE 5+
req = new ActiveXObject("Microsoft.XMLHTTP");
}
else{
//Error for an old browser
alert('Your browser is not IE 5 or higher, or Firefox or Safari or Opera');
}

return req;
}


function popup_map(latitude, longitude, title, address) {

	address = address.replace("#"," ");
	if (!mapwindow.closed && mapwindow.location) {
		mapwindow.location.href = '/include/popmap.php?lat='+latitude+'&long='+longitude+'&title='+title+'&addr='+address;
	}
	else {
		mapwindow=window.open('/include/popmap.php?lat='+latitude+'&long='+longitude+'&title='+title+'&addr='+address,'name','height=500,width=650,scrollbars=no');
		if (!mapwindow.opener) mapwindow.opener = self;
	}
			
	if (window.focus) {mapwindow.focus()}
	

}

function showtermsconds() {
newwin=window.open("termsandconditions.php","Terms","menubar=no, scrollbars=yes, width=420, height=380, directories=no,location=no,resizable=yes,status=no,toolbar=no");
}
