function popupWin(form)
{
    if (!window.focus) return true;
    var windowname = form.code.value;
    sealWin=window.open('', windowname, 'height=430px,width=680px,scrollbars=yes');
    if (window.focus) { sealWin.focus() }
    form.target=windowname;
    return true;
}
function popUp(url) 
{
    // trim off leading slash (if there)
    if (url.substring(0,1) == '/')
    {
        url = url.substring(1);
    }

    if (url.substring(0,7) != 'http://' && url.substring(0,8) != 'https://')
    {
        base = document.getElementById('myBaseId');
        url = base.href + url;
    }
    sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=550,height=350');
    if (window.focus) { sealWin.focus() }
    self.name = "mainWin";
}
function popUpFull(url) {
    if (url.substring(0,7) != 'http://' && url.substring(0,8) != 'https://')
    {
        base = document.getElementById('myBaseId');
        url = base.href + url;
    }
    sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=785,height=550');
    if (window.focus) { sealWin.focus() }
    self.name = "mainWin";
}
function popUpOpts(url,x,y,scrolly) {
    base = document.getElementById('myBaseId');
    sealWin=window.open(base.href + url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=' + scrolly + ',resizable=1,width=' + x + ',height=' + y);
    if (window.focus) { sealWin.focus() }
    self.name = "mainWin";
}
