﻿function PopUpOpenWindow(Id, Width, Height) {
    var Top = parseInt((screen.height - Height) / 2) - 50;
    var Left = parseInt((screen.width - Width) / 2);
    
    window.open('/Hamilton/WebSite/App_Common/PopUp/PopUp.aspx?Id=' + Id,'PopUpWindow','top=' + Top + ', left=' + Left + ', width=' + Width + ', height=' + Height + ', scrollbars=no, resizable=no, status=yes');
}

function PopUpOpenURL(Address) {
    window.opener.location.href = Address;
    window.close();
}

function PopUpPosition(Width, Height) {
    var Top = parseInt((document.body.offsetHeight - Height) / 2) - 50;
    var Left = parseInt((document.body.offsetWidth - Width) / 2);

    document.getElementById('ctl00_body_PanelPopUp').style.top = Top + 'px';
    document.getElementById('ctl00_body_PanelPopUp').style.left = Left + 'px';
    document.getElementById('ctl00_body_PanelPopUpClose').style.top = (Top + Height) + 'px';
    document.getElementById('ctl00_body_PanelPopUpClose').style.left = Left + 'px';
}

function PopUpClose() {
    document.getElementById('ctl00_body_PanelPopUp').style.display = 'none';
    document.getElementById('ctl00_body_PanelPopUpClose').style.display = 'none'
}