﻿function ShowLoginInputs(loginInputs,loginMenu) {
    var loginInputs = document.getElementById(loginInputs);
    var loginMenu = document.getElementById(loginMenu);
    loginInputs.style.display = "block";
    loginMenu.style.display = "none";
}

function ShowLoginMenu(loginInputs,loginMenu) {
    var loginInputs = document.getElementById(loginInputs);
    var loginMenu = document.getElementById(loginMenu);
    loginInputs.style.display = "none";
    loginMenu.style.display = "block";
}

function ShowHand(id) {
    var el = document.getElementById(id);
    el.style.cursor = "pointer";
}

function HideHand(id) {
    var el = document.getElementById(id);
    el.style.cursor = "default";
}

function NewWindow(mypage, myname, w, h, scroll, pos, normal) {
    if (normal != 'yes')
        normal = 'no';

    if (pos == "random") {
        LeftPosition = (screen.width) ? Math.floor(Math.random() * (screen.width - w)) : 100;
        TopPosition = (screen.height) ? Math.floor(Math.random() * ((screen.height - h) - 75)) : 100;
    }
    if (pos == "center") {
        LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100;
        TopPosition = (screen.height) ? (screen.height - h) / 2 : 100;
    }
    else if ((pos != "center" && pos != "random") || pos == null) {
        LeftPosition = 0; TopPosition = 20
    }
    if (normal == 'no')
        settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
    else
        settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=yes,directories=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes';

    window.open(mypage, "", settings);
}


