var win = null;

function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings);
}

function popupfull(page)
    {
        w = (window.screen.width - 10);
        h = (window.screen.height- 60);
        scrollb = 'no';

    l = (window.screen.width - (w + 10))/2;
    t = (window.screen.height - (h + 15 + 42))/2;
    settings = 'scrollbars=' + scrollb + ',resizable=no,status=no,menubar=no,width=' + w + ',height=' + h + ',left='
                 + l + ',top=' + t + ',screenX=' + l + ',screenY=' + t;
    win = window.open(page, 'popup2', settings);
    win.focus();
    }

function popupfull_a(page)
    {
        w = (window.screen.width - 10);
        h = (window.screen.height- 60);
        scrollb = 'no';

    l = (window.screen.width - (w + 10))/2;
    t = (window.screen.height - (h + 15 + 42))/2;
    settings = 'scrollbars=' + scrollb + ',resizable=no,status=no,menubar=no,width=' + w + ',height=' + h + ',left='
                 + l + ',top=' + t + ',screenX=' + l + ',screenY=' + t;
    win = window.open(page, 'popupfull_a', settings);
    win.focus();
    }

function popupfullscroll(page)
    {
        w = (window.screen.availWidth - 10);
        h = (window.screen.availHeight- 75);
        scrollb = 'yes';

    l = (window.screen.availWidth - (w + 10))/2;
    t = (window.screen.availHeight - (h + 30 + 42))/2;
    settings = 'scrollbars=' + scrollb + ',resizable=no,status=no,menubar=yes,width=' + w + ',height=' + h + ',left='
                 + l + ',top=' + t + ',screenX=' + l + ',screenY=' + t;
    win = window.open(page, 'popup2', settings);
    win.focus();
    }

function popupleiras(page, scroll, w, h)
    {
    if (w == null)
        {
        w = 790;
        }

    if (h == null)
        {
        h = 540;
        }


    if (scroll == null)
        {
        scroll = 'yes';
        }

    l = (window.screen.width - (w + 10))/2;
    t = (window.screen.height - (h + 78))/2;
    settings = 'scrollbars=' + scroll + ',resizable=no,status=no,menubar=yes,width=' + w + ',height=' + h + ',left='+ l + ',top=' + t + ',screenX=' + l + ',screenY=' + t;
    win = window.open(page, 'popupleiras', settings);
    win.focus();
    } 

function popupvideo(page, scroll, w, h)
    {
    if (w == null)
        {
        w = 790;
        }

    if (h == null)
        {
        h = 540;
        }


    if (scroll == null)
        {
        scroll = 'yes';
        }

    l = (window.screen.width - (w + 10))/2;
    t = (window.screen.height - (h + 78))/2;
    settings = 'scrollbars=' + scroll + ',resizable=no,status=no,menubar=yes,width=' + w + ',height=' + h + ',left='+ l + ',top=' + t + ',screenX=' + l + ',screenY=' + t;
    win = window.open(page, 'popupvideo', settings);
    win.focus();
    } 
