function openWindowScrl(url, w, h)
    {
    var windowprops = "menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=" + w + ",height=" + h;
    popup = window.open(url,'remote3',windowprops);
    popup.moveTo(45,30)
    popup.focus()
    }

function openWindowCenter(url, w, h)
{
    var windowprops = "menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=" + w + ",height=" + h;
    var x = (screen.width - w) / 2;
    var y = (screen.height - h) / 2;
    popup = window.open(url,'remote4',windowprops);
    popup.moveTo(x,y)
    popup.focus()
}

function showPreview(url)
{
    var w = Math.round(screen.width * 0.9);
    var h = Math.round(screen.height * 0.9);
    var x = Math.round((screen.width - w) / 2);
    var y = Math.round((screen.height - h) / 2);
    var windowprops = "menubar=yes,toolbar=yes,location=yes,status=yes,scrollbars=auto,resizable=yes,width=" + w + ",height=" + h;
    popup = window.open(url,'preview',windowprops);
    popup.moveTo(x,y)
    popup.focus()
}
