/*
    Script:  online_help.js
    Author:  Michael Dumke, mdumke(at)eso.org
    Date:    2006-03-22
    Purpose: Opens small windows to display help topics & external pages
    Last update:  2008-01-03 : changed 'helpfiles' directory location
*/

/*
--------------------------------------------------------------------------------
    Online help
*/

var neu = null;
function help(topic) {
    var helpfile = "/observing/helpfiles/help_" + topic + ".html";
    if (screen.width > 1280) {
        neu = window.open(helpfile,"HelpWindow","left=700,top=8,width=800,height=600,dependent=yes,toolbar=no,resizable=yes,scrollbars=yes");
    } else {
        neu = window.open(helpfile,"HelpWindow","left=500,top=5,width=600,height=500,dependent=yes,toolbar=no,resizable=yes,scrollbars=yes");
    }
    if (neu != null) {
        if (neu.opener == null) {
            neu.opener = self;
        }
        neu.location.href = helpfile;
        neu.focus();
        neu.moveTo(screen.width-610,5);
    }
}
function show(page) {
    if (screen.width > 1280) {
        neu = window.open(page,"ExternalWindow","left=700,top=8,width=800,height=600,dependent=yes,toolbar=no,resizable=yes,scrollbars=yes");
    } else {
        neu = window.open(page,"ExternalWindow","left=500,top=5,width=600,height=500,dependent=yes,toolbar=no,resizable=yes,scrollbars=yes");
    }
    if (neu != null) {
        if (neu.opener == null) {
            neu.opener = self;
        }
        neu.location.href = page;
        neu.focus();
        neu.moveTo(screen.width-610,5);
    }
}

/* End of code */
