function openWin(mypage, picture, w, h, scroll) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
    gallery = window.open(mypage, picture, winprops)
    if (parseInt(navigator.appVersion) >= 4) { gallery.window.focus(); }
}
function openWinTop(mypage, picture, w, h, scroll) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+20+',left='+20+',scrollbars='+scroll+',resizable'
    gallery = window.open(mypage, picture, winprops)
    if (parseInt(navigator.appVersion) >= 4) { gallery.window.focus(); }
}
function openWin2(url,W,H,target)
 {
    if (!W) W=200;
    if (!H) H=200;
    if (!target) target="_new";

    //// lower right corner
    // var X = screen.width-W;
    // var Y = screen.height-H;

    //// center
    var X = (screen.width/2)-(W/2);
    var Y = (screen.height/2)-(H/2);

    var winPref = "width=" + W + ",height=" + H
                + ",innerWidth=" + W + ",innerHeight=" + H
                + ",left=" + X + ",top=" + Y
                + ",screenX=" + X + ",screenY=" + Y
                + ",dependent=yes,titlebar=no,scrollbars=no,resizable=no";

    openWin[target] = window.open( url, target, winPref );
    openWin[target].resizeTo(1*W+10,1*H+30);
    openWin[target].focus();

    return false;
 }
 function openWin3(url,W,H,target)
 {
    if (!W) W=200;
    if (!H) H=200;
    if (!target) target="_new";

    //// lower right corner
    // var X = screen.width-W;
    // var Y = screen.height-H;

    //// center
    var X = (screen.width/2)-(W/2);
    var Y = (screen.height/2)-(H/2);

    var winPref = "width=" + W + ",height=" + H
                + ",innerWidth=" + W + ",innerHeight=" + H
                + ",left=" + X + ",top=" + Y
                + ",screenX=" + X + ",screenY=" + Y
                + ",dependent=yes,titlebar=no,scrollbars=no,resizable=yes";

    openWin[target] = window.open( url, target, winPref );
    openWin[target].resizeTo(1*W+10,1*H+30);
    openWin[target].focus();

    return false;
 }