function PopUp(url, width, height)
{
	var xMax, yMax;
    if (document.all)
    {
        xMax = screen.width;
        yMax = screen.height;
    }
    else
    {
        if (document.layers)
        {
            xMax = window.outerWidth;
            yMax = window.outerHeight;
        }
        else
        {
            xMax = 640;
            yMax=480;
        }
    }
    var xOff = (xMax - width)/2, yOff = (yMax - height)/2;

    var ref = window.location;
    if (window.location.pathname)
    	ref = window.location.pathname;
    	
    if (url.indexOf("#") < 0) //not even gonna try when url has hash in it
    {
		if (url.indexOf("?") >= 0)
			url += "&referrer=" + ref;
		else
			url += "?referrer=" + ref;
	}		
    
    window.open(url, 'Details', 'width='+width+',height='+height+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes,screenX='+xOff+',screenY='+yOff+',left='+xOff+',top='+yOff);
}
