/**
 * Popup window function. 
 *
 * @param string The page to open in the popup. 
 * @param string The name for the new window. 
 */
function sdkPopUp(url, window_name, width, height)
{
    var Popup = null;
    var left = Math.round(screen.width / 2) - 300;
    var top = Math.round(screen.height / 2) - 260;
    var scrollbars = "no";
    if (left < 0) {
        left = 0;
    }
    if (top < 0) {
        top = 0;
    }
    if (width > 800) {
        width = 800;
        scrollbars = "yes";
    }
    if (height > 600) {
        height = 600;
        scrollbars = "yes";
    }
    Popup = window.open(url, window_name, 'width=' + width + ', height=' 
        + height + ',scrollbars=' + scrollbars 
        + ', resizable=yes, toolbar=no, location=no, status=no, menubar=no, left=' 
        + left + ', top=' + top); 
    Popup.focus(); 
    return false;  
}
