
function Popup3D(theURL,PopupName,PopupWidth,PopupHeight,PopupFeatures) {
    var Xcoor;
    var Ycoor;
    var Popup;
    var FeaturesTotal;
    if (PopupHeight && PopupWidth) {
        if (window.screen.width > PopupWidth)
            Xcoor = (window.screen.width/2) - (PopupWidth/2);
        else
            Xcoor = 0;
        if (window.screen.height > PopupHeight)
            Ycoor = (window.screen.height/2) - (PopupHeight/2);
        else
            Ycoor = 0;
        if (PopupFeatures)
            FeaturesTotal = PopupFeatures + ",width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
        else
            FeaturesTotal = "width=" + PopupWidth + ",height=" + PopupHeight + ",left=" + Xcoor + ",top=" + Ycoor + ",screenX=" + Xcoor + ",screenY=" + Ycoor;
        Popup = window.open(theURL,PopupName,FeaturesTotal);
        Popup.focus;
    }
    else {
        Popup = window.open(theURL,PopupName);
        Popup.focus;
    }
}
