// Ecce Javascript
// Author: Geoffrey Elliott
// Updated: 9/11/02

//Globals - None right now

//Functions

function highlightPage(thisPage) {
    if(document.getElementById && thisPage != "") {
        pageLink = document.getElementById(thisPage);
        if(pageLink.style) {
            pageLink.style.color = 'white';
        }
    }
}

function captureClick(url) {
    newWindow(url);
    return false;
}

function newWindow(url) {
    nw=window.open(url, "ecceWindow", "scrollbars,toolbar,menubar,location,status,resizable,width=750,height=450");

    if(parseInt(navigator.appVersion) >= 4) {
        var nwLeft = (screen.availWidth - 750) / 2;
        var nwTop = (screen.availHeight - 450) / 2;

        if(parseInt(navigator.appVersion) > 4) {
            moveWindow(nw, nwLeft, nwTop);
        }
    }
    nw.focus();
}

function moveWindow(newWindow, windowLeft, windowTop) {
    try {
        newWindow.moveTo(windowLeft,windowTop);
    }
    catch (e) {
        //alert("Exception Caught!");
    }
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
