///
/// Return a XMLHTTPRequest in a browser independent fashion.
///
function GetXMLHttp()
{
    var xmlhttp=false;
    
    try 
    {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } 
    catch (e) 
    {
        try 
        {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (E)
        {
            xmlhttp = false;
        }
    }

    // Mozilla then?
    if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
       xmlhttp = new XMLHttpRequest();
    }
    
    return xmlhttp;
}

function viewMap(o)
{
	var murl="http://maps.google.com/maps?q=" + encodeURIComponent(o.getAttribute("street") + "," + o.getAttribute("city") + "," + o.getAttribute("state") + "," + o.getAttribute("zip")) + "&hl=en";
	displayWindow(murl,"_blank",800,600,"resizable=yes,toolbar=no,status=yes,menubar=no,location=no");
}

function displayWindow(theURL,winName,width,height,features) 
{
	var window_width = width;
	var window_height = height;
	var newfeatures= features;
	var window_top = (screen.availHeight-window_height)/2;
	var window_left = (screen.availWidth-window_width)/2;
	
	var	newWindow=window.open(theURL,winName,'width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',' + newfeatures);
	if (newWindow) 	newWindow.focus(); else alert("This site requires popups to be enabled. Please enable popups for the site.");
}

