﻿
var newwindow;
function poptastic(url) {
    newwindow = window.open(url, 'name', 'height=500,width=400');
    if (window.focus) { newwindow.focus() }
}


function popup(url) {
    var w = 400, h = 300;
    if (document.all) {
        /* the following is only available after onLoad */
        w = document.body.clientWidth;
        h = document.body.clientHeight;
        x = window.screenTop;
        y = window.screenLeft;
    }
    else if (document.layers) {
        w = window.innerWidth;
        h = window.innerHeight;
        x = window.screenX;
        y = window.screenY;
    }
    var popW = 400, popH = 300;
    var leftPos = ((w - popW) / 2) + y, topPos = ((h - popH) / 2) + x;
    window.open(url, 'popup', 'width=' + popW + ',height=' + popH + ',top=' + (topPos/2) + ',left=' + leftPos);
}


function popup2(url) {
    var w = 700, h = 800;
    if (document.all) {
        /* the following is only available after onLoad */
        w = document.body.clientWidth;
        h = document.body.clientHeight;
        x = window.screenTop;
        y = window.screenLeft;
    }
    else if (document.layers) {
        w = window.innerWidth;
        h = window.innerHeight;
        x = window.screenX;
        y = window.screenY;
    }
    var popW = 700, popH = 800;
    var leftPos = ((w - popW) / 2) + y, topPos = ((h - popH) / 2) + x;
    window.open(url, 'popup', 'width=' + popW + ',scrollbars=yes, height=' + popH + ',top=' + (topPos / 2) + ',left=' + leftPos);
}
//--></script>


