browser=navigator.appName;

function checkWidth(){
if (navigator.appName.substr(0,4)=="Micr" && document.body.offsetWidth>=951) document.getElementById('thisDoc').style.width="950px";
}

var f=100; //Change font size
function smaller(){
f=f - 20;
document.getElementById('thisDoc').style.fontSize=f + "%";	
}
function bigger(){
f=f + 20;
document.getElementById('thisDoc').style.fontSize=f + "%";	
}

function show(fileName){document.getElementById(fileName).style.visibility="visible"}
function hide(fileName){document.getElementById(fileName).style.visibility="hidden"}

function findSize(){
switch(browser.substr(0,4)){
case "Micr": currentH=document.body.offsetHeight; break;
default: currentH=window.innerHeight;
}
H = currentH - 175;
document.getElementById('mapList').style.height=H + "px";
}

var h=1;
function writeFrame(x){
if (x==h){x=x+1}
aWindow=window.open('YALE.PHP?k=' + x,'smallWin');
h = x;

switch(x){
case 1: info="Creator, a"; break;
case 2: info="Creator, de"; break;
case 3: info="Title, a"; break;
case 4: info="Title, de"; break;
case 5: info="Date, a"; break;
case 6: info="Date, de"; break;
case 7: info="Call Number, a"; break;
case 8: info="Call Number, de"; break;}
document.sortOrder.info.value="Sorted by " + info + "scending order";
}

function smallWin(title,w,h,x,y,winName)
{
var winName;
if (!winName) {winName="nuWin"};
aWindow=window.open(title, winName, "width=" + w + ", height=" + h + ", resizable, scrollbars, status=no");
aWindow.moveTo(x,y);
}

function remoteSite(siteURL)
{
aWindow=window.open(siteURL, 'remote site', 'width=800,height=600,location,resizable,scrollbars,toolbar');
}



IE=document.all? 1:0 
document.onkeypress = testKey;
/*
The next line doesn't seem to be necessary.
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: javascript:smaller(); break;
case 93: javascript:bigger(); 
}
}