﻿function WinOpenLogin() {
    window.opener = self;
    self.close();
    window.open('managelogin.aspx', 'Login', 'maximize=true,top=0,left=0,height=100%,width=100%,status=yes,resizable=yes,toolbar=no,menubar=no,location=yes,fullscreen=true, scrollbars=yes, location=no');

}
function winclose() {
    window.opener = self;
    self.close();
}

function fullwin() {
    window.open("managelogin.aspx", "login", "fullscreen=no, maximize=true, left=0,top=0,resizable=yes,scrollbars=yes, toolbar = no, menubar = no");
    window.opener = self;
    //window.close();
    //closeWindow();
}

function closeWindow() {
    //var browserName = navigator.appName;
    //var browserVer = parseInt(navigator.appVersion);
    var ie7 = (document.all && !window.opera && window.XMLHttpRequest) ? true : false;
    if (ie7) {
        //This method is required to close a window without any prompt for IE7
        window.open('', '_parent', '');
        window.close();
    }

    else {
        //This method is required to close a window without any prompt for IE6
        this.focus();
        self.opener = this;
        self.close();
    }
}

function goFullscreen(page) {
    var URLen = page;
    var windowNamen = "mainflashwindow";
    var browserName = navigator.appName;
    var operatingSystem = navigator.platform;
    var version = parseFloat(navigator.appVersion);

    
    // Netscape check version 4.0+ on Win
    if (browserName.indexOf("Netscape") != -1 && version >= 4.0 && operatingSystem.indexOf("Mac") != -1) {
        window.open(URLen, windowNamen, 'titlebar=no,top=0,left=0,width=' + window.screen.availWidth + ',height=' + window.screen.availWidth + ',screenX=0,screenY=0,top=0,left=0')
    }

    // MSIE Mac check
    else if (browserName.indexOf("Microsoft Internet Explorer") != -1 && operatingSystem.indexOf("Mac") != -1) {
        window.open(URLen, windowNamen, 'titlebar=no,top=0,left=0,width=' + window.screen.availWidth + ',height=' + window.screen.availWidth + ',screenX=0,screenY=0,top=0,left=0')
    }

    // Netscape Mac check
    else if (browserName.indexOf("Netscape") != -1 && operatingSystem.indexOf("Mac") != -1) {
        window.open(URLen, windowNamen, 'width=' + screen.width + ',height=' + screen.height + ',top=0,left=0');
    }

    // MSIE Windows
    else if (browserName.indexOf("Microsoft Internet Explorer") != -1 && operatingSystem.indexOf("Win") != -1) {
    //window.open(URLen,windowNamen,'fullscreen=yes')
    
        var win = window.open(URLen, windowNamen, 'titlebar=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,top=0,left=0,width=' + window.screen.availWidth + ',height=' + window.screen.availHeight + ',screenX=0,screenY=0,top=0,left=0')
        win.resizeTo(screen.width, screen.height);
        //win.moveTo(1, 1);
        //win.moveTo(0, 0);
        //win.resizeTo(screen.width, screen.height);
    }

    // Netscape Windows
    else if (browserName.indexOf("Netscape") != -1 && operatingSystem.indexOf("Win") != -1) {
        window.open(URLen, windowNamen, 'width=' + screen.width + ',height=' + screen.height + ',top=0,left=0');
    }

    else {
        window.open(URLen, windowNamen);
    }

}
