﻿
function newWindow(mypage, myname, w, h, features) {
    if (screen.width) {
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
    } else { winl = 0; wint = 0; }
    if (winl < 0) winl = 0;
    if (wint < 0) wint = 0;
    var settings = 'height=' + h + ',';
    settings += 'width=' + w + ',';
    settings += 'top=' + wint + ',';
    settings += 'left=' + winl + ',';
    settings += features;
    win = window.open(mypage, myname, settings);
    win.window.focus();
}
function newWindow2(mypage, myname, w, h, features) {
    var curDateTime = new Date()
    var curTime = curDateTime.getSeconds() + curDateTime.getMinutes() + curDateTime.getHours();
    if (screen.width) {
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
    } else { winl = 0; wint = 0; }
    if (winl < 0) winl = 0;
    if (wint < 0) wint = 0;
    var settings = 'height=' + h + ',';
    settings += 'width=' + w + ',';
    settings += 'top=' + wint + ',';
    settings += 'left=' + winl + ',';
    settings += features;
    win = window.open(mypage, myname + curTime, settings);
    win.window.focus();
}

var newwindow;
function popImage(url) {
    newwindow = window.open(url, 'BBXVideo', 'width=750, height=650, left=200, top=50, titlebar=no, resizable=no, scrollbars=no, toolbar=no, status=no, location=no');
    if (window.focus) { newwindow.focus() }
}
