﻿//--------------------------------------------------------------------

// open a new window with the text that was passed in as a parameter

//

function genericPopUp(word, definition) {



    // set up some constants

    // how editable!

    var bgcolor = "#E0E7EF;";

    var my_width = 421;

    var my_height = 361;

    var my_scrollbars = 1;



    // open the window

    w = window.open("", "glossaryWindow", "resizable=1,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=" + my_scrollbars + ",copyhistory=0,width=" + my_width + "px,height=" + my_height +"px");



    // write to it

    w.document.open();

    w.document.writeln("<html><head><title>Term: " + word + "</title>");

    w.document.writeln("<style>body  {background-color: " + bgcolor + ";}");

    w.document.writeln("       .word {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold;   color: #000000;}");

    w.document.writeln("       .def  {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: normal; color: #000000;}");

    w.document.writeln("</style></head><body>");

    w.document.writeln("<div class='word'><p>" + word + "</p></div>");

    w.document.writeln("<div class='def'><p>" + definition + "<br /><br /></p>");
    w.document.writeln("<p><br /><br /><a href='javascript:self.close()'><img src='Images/close_en.jpg' width='67' height='26' border='0' alt='Close Window' name='bclose'></a></p></div></body></html>");

    w.document.close();



    // bring it to the front

    w.focus();

}

function glossaryPopUp(word, definition) {



    // set up some constants

    // how editable!

    var bgcolor = "#8FE1E2";

    var my_width = 640;

    var my_height = 150;

    var my_scrollbars = 1;



    // open the window

    w = window.open("", "glossaryWindow", "resizable=1,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=" + my_scrollbars + ",copyhistory=0,width=" + my_width + ",height=" + my_height);



    // write to it

    w.document.open();

    w.document.writeln("<html><head><title>Glossary Definition: " + word + "</title>");

    w.document.writeln("<style>body  {background-color: " + bgcolor + ";}");

    w.document.writeln("       .word {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold;   color: #000000;}");

    w.document.writeln("       .def  {font-family: Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: normal; color: #000000;}");

    w.document.writeln("</style></head><body>");

    w.document.writeln("<div class='word'><p>" + word + "</p></div>");

    w.document.writeln("<div class='def' ><p>" + definition + "</p></div></body></html>");

    w.document.close();



    // bring it to the front

    w.focus();

}

function openCenter2(myurl) {

    // This is used by the glossary routines    



    windowNavi = window.open(myurl, "Ethics", "toolbar=no,width=725,height=340,menubar=no,status=no,scrollbars=no,resizable=no");

    windowNavi.moveTo(((screen.width / 2) - 389), ((screen.height / 2) - 265))

    windowNavi.location = myurl;

    windowNavi.focus();

}

function openCenter3(mapurl) {

    windowMap = window.open(mapurl, "main86", "toolbar=no,width=800,height=500,menubar=no,status=yes,scrollbars=yes,resizable=no");

    //  windowMap.moveTo(((screen.width/2)-389),((screen.height/2)-265))

    windowMap.moveTo(0, 0)

    windowMap.location = mapurl;

    windowMap.focus();

}

function windowOpener(windowHeight, windowWidth, windowName, windowUri) {
    var centerWidth = (window.screen.width - windowWidth) / 2;
    var centerHeight = (window.screen.height - windowHeight) / 2;

    newWindow = window.open(windowUri, windowName, "resizable=0,width=" + windowWidth +
        ",height=" + windowHeight +
        ",left=" + centerWidth +
        ",top=" + centerHeight +
        ",toolbar=no,menubar=no,status=yes,scrollbars=yes");

    newWindow.focus();
    return newWindow.name;
}
