﻿function ShowPopup(url, id) {
    var iMyWidth;
    var iMyHeight;
    //half the screen width minus half the new window width (plus 5 pixel borders).
    iMyWidth = (window.screen.width / 2) - (75 + 10);
    //half the screen height minus half the new window height (plus title and status bars).
    iMyHeight = (window.screen.height / 2) - (100 + 50);
    //Open the window.

    window.open(url + '?id=' + id, 'popup', 'height=660,width=970,left=50,top=50,location=no,titlebar=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,dialog=yes');
}

function ShowProforma(url, id, status) {

    window.open(url + '?id=' + id + '&status=' + status, 'popup', 'height=800,width=720,left=50,top=50,location=no,titlebar=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,dialog=yes');
}
function ShowGameChoices(url, qid) {

    window.open(url + '?qid=' + qid, 'popup', 'height=270,width=720,left=50,top=350,location=no,titlebar=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,dialog=yes');
}
function ShowBannerProforma(url, id, idate, status) {

    window.open(url + '?id=' + id + '&idate=' + idate + '&status=' + status, 'popup', 'height=800,width=700,left=50,top=50,location=no,titlebar=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,dialog=yes');
}
function ShowLocations(url, id, name) {

    window.open(url + '?id=' + id + '&name=' + name, 'confirmation', 'height=450,dialog=yes,width=900,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes');
}
function ShowSymapthiserAnswer(url,ccode,dt,id) {

    window.open(url + '?cc=' + ccode + '&sid=' + id + '&gm=' + dt , 'confirmation', 'height=330,dialog=yes,width=900,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes');
}
function ShowPeters(url,id) {
    window.open(url + '?Pid=' + id, 'confirmation', 'height=330,dialog=yes,width=900,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes');
}
function ShowViewClientInformation(url, id, name, status) {

    window.open(url + '?id=' + id + '&name=' + name + '&status=' + status, 'confirmation', 'height=450,dialog=yes,width=900,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes');
}
function ShowAllComments(url, id) {

    window.open(url + '?id=' + id , 'confirmation', 'height=710,dialog=yes,width=900,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes');
}
function ShowProfile(url, id, name) {

    window.open(url + '?id=' + id + '&name=' + name, 'confirmation', 'height=600,dialog=yes,width=530,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes');
}
function ShowInvoiceDetails(url, cid, ino, paiddate) {

    window.open(url + '?cid=' + cid + '&ino=' + ino + '&paiddate=' + paiddate, 'confirmation', 'height=500,width=900,dialog=yes,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes');
}
function ShowPDFInvoice(url) {

    window.open(url, 'confirmation', 'height=900,width=900,dialog=yes,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes');
}
function ShowJobpopUp(url) {

    window.open(url, 'confirmation', 'height=350,width=760,dialog=yes,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes,top = 100,status=no, left = 100');

}
function ShowSympathiserpopUp(url) {

    window.open(url, 'confirmation', 'height=310,width=458,dialog=yes,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes,top = 100, left = 100');

}
function ShowSuperBonuspopUp(url) {

    window.open(url, 'confirmation', 'height=315,width=765,dialog=yes,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes,top = 100, left = 100');

}
function ShowSuperBonusTicketpopUp(url,cid,csbid) {

    window.open(url + '?cid=' + cid + '&csbid=' + csbid, 'confirmation', 'height=315,width=695,dialog=yes,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes,top = 100, left = 100');

}
function Revenuepopup(url,cid,sdate,edate) {
    window.open(url+ '?cid=' + cid + '&sdate=' + sdate + '&edate=' + edate, 'confirmation', 'height=700,width=965,dialog=yes,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes,top = 100, left = 100');
}
function ShowTermspopUp(url) {

    //var left = (screen.width / 2) - (w / 2);
    //var top = (screen.height / 2) - (h / 2);
    window.open(url, 'confirmation', 'height=580,width=854,dialog=yes,location=no,status=no,titlebar=no,addressbar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes,top=100, left=100');
    //window.open(url, 'confirmation', 'toolbar=no, location=no,height=580,width=858,location=no, status=no, menubar=no,titlebar=no, scrollbars=yes, resizable=yes, copyhistory=no,toolbar=no,  top=' + top + ', left=' + left); 


}
function showsympopup(url) {

    //var left = (screen.width / 2) - (w / 2);
    //var top = (screen.height / 2) - (h / 2);
        window.open(url, 'confirmation', 'height=580,width=854,dialog=yes,location=no,status=no,titlebar=no,addressbar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes,top=100, left=100');
    //window.open(url, 'confirmation', 'toolbar=no, location=no,height=580,width=858,location=no, status=no, menubar=no,titlebar=no, scrollbars=yes, resizable=yes, copyhistory=no,toolbar=no,  top=' + top + ', left=' + left); 

    
}

function ShowBannerImagePopup(url) {

    window.open(url, 'confirmation', 'height=650,width=130,location=no,titlebar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes,top = 150, left = 400');
}
function ShowContactspopUp(url) {
    window.open(url, 'confirmation', 'height=350,width=649,dialog=yes,maximize=no,popup=yes,location=no,status=no,titlebar=no,addressbar=no,toolbar=no,menubar=no,resizable=no,scrollbars=yes,top=100, left=100');
}
function DisableActivate(buttonid, imageid, valgroup) {
    if (typeof (Page_ClientValidate) == 'function')
        var validationResult = Page_ClientValidate(valgroup);

    if (validationResult == true) {
        document.getElementById(buttonid).style.visibility = "hidden";
        document.getElementById(buttonid).style.display = "none";
        document.getElementById(imageid).style.visibility = "visible";
        document.getElementById(imageid).style.display = "block";
    }
}

