/*
Pops up a new window centered relative to the client's screen.

Example:
<a href="[url]" onclick="return popUp('[url]',[width],[height],'[features]');"
    onkeypress="this.onclick();">Pop it</a>
*/
function popUp(url,w,h,feat)
{
    var l = (screen.availWidth / 2) - (w / 2);
    var t = (screen.availHeight / 2) - (h / 2);

    feat = feat + ',width=' + w + ',height=' + h + ',left=' + l + ',top=' + t;

    var newWin = window.open(url, 'popup', feat);

    if (window.focus) newWin.focus();

    return false;
}
