function checkWidth(){
if (navigator.appName.substr(0,4)=="Micr" && document.body.offsetWidth>=951) document.getElementById('thisDoc').style.width="950px";
}

//For Journal files only//
window.onresize=widthCheck;

function widthCheck(){
browser=navigator.appName;
if (browser.substr(0,4)=="Micr") {currentW=document.body.offsetWidth;}
else {currentW=window.innerWidth;}
if (currentW<1600) {
newWidth=currentW-380;
document.getElementById('thisDoc').style.width=newWidth+"px";
document.getElementById('thisDoc').style.marginRight="330px";
}
}

var aWindow;
function smallWin(fileName, w, h){

if (!w) {w=900}
if (!h) {h=625}
if (!aWindow || aWindow.closed) {
aWindow=window.open(fileName, "aWindow", "width="+w+",height="+h);
}
else {aWindow.focus();} //Restore focus, if window is in background
}

function show(photoName){document.getElementById(photoName).style.visibility="visible"}
function hide(photoName){document.getElementById(photoName).style.visibility="hidden"}
function displayOn(photoName){document.getElementById(photoName).style.display="inline"}
function displayOff(photoName){document.getElementById(photoName).style.display="none"}

IE=document.all? 1:0 
document.onkeypress = testKey;/*
if(!IE) document.captureEvents(Event.KEYPRESS);
*/ 

 
function testKey(key) 
{ 
k=IE? event.keyCode:key.which; 
if (k>93) k=k-32;
switch(k){
case 46: self.scrollTo(0,0); break;
case 91: smaller(); break;
case 93: bigger(); break;
case 66: window.location.href = "../BOOKS.HTM"; break;
case 69: window.location.href = "../EPHEMERA.HTM"; break;
case 77: window.location.href = "../MAPS.HTM"; break;
case 82: window.location.href = "../INDEX.HTM";
}
}

var x=100;
function bigger(){
x = x + (.1 * x);
document.getElementById('thisDoc').style.fontSize=x + "%";
}

function smaller(){
x = x - (.1 * x);
document.getElementById('thisDoc').style.fontSize=x + "%";
}

/*
Not yet implemented 
case 72: window.location.href = "../HELP.HTM"; break;
case 76: window.location.href = "../LEGEND.HTM"; break;
case 78: window.location.href = "../NOTES-1.HTM"; break;
case 83: window.location.href = "../SHIPS/INDEX.HTM"; break;
case 84: window.location.href = "../TABLE-1.HTM"; break;
case 88: window.location.href = "INDEX.HTM";
*/
