function windowOpen(page,name,height,width) //opens a random window everytime with no scrollbars
{
    var nL = (screen.width - width) / 2 ;
    var nT = (screen.height - height) / 2 ;
    var prms = 'height='+height+',width='+width+',resizable=no,';
    prms += 'scrollbars=no,location=no,menubar=no,top='+nT+',left='+nL;
    
    // randomise name so we don't open in the same window twice
    var date = new Date();
    name += date.getSeconds() + date.getMinutes();

    window.open(page,name,prms);
}

function windowOpenScroll(page,name,height,width) //opens a random window everytime with scrollbars
{
    var nL = (screen.width - width) / 2 ;
    var nT = (screen.height - height) / 2 ;
    var prms = 'height='+height+',width='+width+',resizable=no,';
    prms += 'scrollbars=yes,location=no,menubar=no,top='+nT+',left='+nL;
    // randomise name so we don't open in the same window twice
    var date = new Date();
    name += date.getSeconds() + date.getMinutes();

    window.open(page,name,prms);
}

function openNamedWindow(page,name,height,width) //opens a named window everytime in the same one with no scrollbars (usually for instants)
{
    var nL = (screen.width - width) / 2 ;
    var nT = (screen.height - height) / 2 ;
    var prms = 'height='+height+',width='+width+',resizable=no,';
    prms += 'scrollbars=no,location=no,menubar=no,top='+nT+',left='+nL;

    window.open(page,name,prms);
}

function openNamedWindowScroll(page,name,height,width) //opens a named window everytime in the same one with no scrollbars (usually for instants)
{
    var nL = (screen.width - width) / 2 ;
    var nT = (screen.height - height) / 2 ;
    var prms = 'height='+height+',width='+width+',resizable=no,';
    prms += 'scrollbars=yes,location=no,menubar=no,top='+nT+',left='+nL;

    window.open(page,name,prms);
}