﻿

function openlogin(url) {
    //window.open(url, 'login', 'resizable=yes,scrollbars=yes,left=300,top=300,width=370,height=590')
    openmaxwindow(url, 'login', 370, 590)
}

function gologin() {
    setCookie('gotopageafterlogin', document.location.href);
    document.location.href = 'membership.asp?w=login';
}

function openmaxwindow(url, title, w, h) {
    var t = 50
    var useh = (screen.height - t - 140 < h) ? screen.height - t - 140 : h
    //var parm = 'resizable=yes,scrollbars=yes,status=yes,left=100,top=' + t + ',width=' + w + ',height=' + useh
    var parm = 'resizable=yes,scrollbars=yes,status=yes,width=' + w + ',height=' + useh
    window.open(url, title, parm)
}

function resizemaxwindow(w, h) {
    var t = 50
    var useh = (screen.height - t - 140 < h) ? screen.height - t - 140 : h
    window.moveTo(100, t)
    window.resizeTo(w, useh)
}

