var newwindow  ='';
var newwindow2 ='';
var newwindow3 ='';

function popitupn(url, winName, winHeight,winWidth)
{
        var wleft = (screen.width/2)-(700/2);
        var wtop = (screen.height/2)-(900/2);

        var newwin = '';

        newwin=window.open(url,winName,'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=' + winWidth + ',height=' + winHeight + ',directories=no,location=no,top=' + wtop +',left=' + wleft);

        if (window.focus) {newwin.focus()}
        return false;
}

function popitup(url)
{
        if (!newwindow.closed && newwindow.location) {
                newwindow.location.href = url;
        }
        else {
                newwindow=window.open(url,'name','width=750px,height=750px,status=no,toolbar=no,scrollbars=yes,titlebar=yes,menubar=yes,resizable=yes,directories=no,location=no');
                if (!newwindow.opener) newwindow.opener = self;
        }
        if (window.focus) {newwindow.focus()}
        return false;
}

function popitup2(url)
{
        if (!newwindow2.closed && newwindow2.location) {
                newwindow2.location.href = url;
        }
        else {
                newwindow2=window.open(url,'name2','width=700px,height=650px,status=no,toolbar=no,scrollbars=yes,titlebar=yes,menubar=yes,resizable=yes,directories=no,location=no');
                if (!newwindow2.opener) newwindow2.opener = self;
        }
        if (window.focus) {newwindow2.focus()}
        return false;
}
function popitup3(url,winHeight)
{
        var wleft = (screen.width/2)-(700/2);
        var wtop = (screen.height/2)-(900/2);

        if (!newwindow3.closed && newwindow3.location) {
                newwindow3.location.href = url;
        }
        else {
                newwindow3=window.open(url,'name3','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=700,height=' + winHeight +',directories=no,location=no,top=' + wtop +',left=' + wleft);
                if (!newwindow3.opener) newwindow3.opener = self;
        }
        if (window.focus) {newwindow3.focus()}
        return false;
}
function popitup4(url,winHeight,winWidth)
{
        var wleft = (screen.width/2)-(700/2);
        var wtop = (screen.height/2)-(900/2);

        if (!newwindow3.closed && newwindow3.location) {
                newwindow3.location.href = url;
        }
        else {
                newwindow3=window.open(url,'name3','status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=' + winWidth + ',height=' + winHeight + ',directories=no,location=no,top=' + wtop +',left=' + wleft);
        }
        if (window.focus) {newwindow3.focus()}
        return false;
}

