
	var w1 = null, is_nav = 0, is_nav3 = 0, is_nav4 = 0, is_nav4up = 0, is_ie  = 0;       
	var is_ie3 = 0, is_ie4 = 0, is_ie4up = 0, is_ie5 = 0, is_ie5up = 0;
	
	function ShowPdf(pdf_name, splash_name)
	{
		var options = ",location=yes,menubar=yes,resizable=yes,status=yes,toolbar=yes,copyhistory=no,directories=no,scrollbars=yes";
   		// window.open(pdf_name, "pdf");
		CreateSatellite( pdf_name, "pdf", 700, 500, true, options )

   		Splash = window.open(splash_name, "splash",
              "status=no,toolbar=no,titlebar=no,menubar=no,resizeable=no,height=70,width=90");
   		setTimeout('CloseSplash()',900);
	}

	function ShowInMainFrame(url) 
	{
    	// append the keyword as a parameter to the url 
		var kw = document.SearchForm.keyword.value;	
		if( kw == "" )
		{
			alert ("Please enter a keyword to search for.");
			return false; // stop a submit!
		} 
		url = url + "&KW=" + escape(kw);
		// append the options as a parameter
	    if( document.SearchForm.keyopt[0].checked )
	    	var opt = document.SearchForm.keyopt[0].value;	    
	    else if( document.SearchForm.keyopt[1].checked )
	    	var opt = document.SearchForm.keyopt[1].value;	    
	    url = url + "&keyopt=" + opt;		
	    opener.focus();
	    opener.parent.location.replace(url);
		window.close();
		return true;
	}
		
	function DetermineBrowserTypeVersion()
	{
	   var agt=navigator.userAgent.toLowerCase(); 
			   
	   // Note: On IE5, these return 4, so use is_ie5up to detect IE5. 
	   var is_major = parseInt(navigator.appVersion); 
	   var is_minor = parseFloat(navigator.appVersion); 
	
	   // Navigator Checks
	   is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('compatible') == -1)); 
       if( is_nav )
	   {
         is_nav3 = (is_nav && (is_major == 3)); 
         is_nav4 = (is_nav && (is_major == 4)); 
         is_nav4up = (is_nav && (is_major >= 4)); 
	   }
	
	   // IE Checks
	   is_ie   = (agt.indexOf("msie") != -1); 				
	   if( is_ie )
	   {
	     is_ie3  = (is_ie && (is_major < 4)); 
         is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
         is_ie4up  = (is_ie  && (is_major >= 4)); 
         is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
         is_ie5up  = (is_ie  && !is_ie3 && !is_ie4); 	
	   }
	}


function CreateSatellite( theURL, name, width, height, center, options )
	{
		DetermineBrowserTypeVersion();

		// Different Browsers have different ways to get the 
		// position and size of the browser window.
		if( is_nav4up && center )
		{
		 	var x = window.screenX;
    	  	var y = window.screenY;
		  	var w = window.outerWidth;
		  	var h = window.outerHeight;
		  	var midx = x + (w - width)/2; 
		  	var midy = y + (h - height)/2; 	

			w1 = window.open( theURL, name, "left=" + midx + ",top=" + midy + ",height="+ height + ",width=" +  width + options );
		}else if( is_ie5up && center ) 
		{
			var x = window.screenLeft;
         	var y = window.screenTop;
			var w = document.body.clientWidth;
		 	var h = document.body.clientHeight;
			var midx = x + (w - width)/2;
			var midy = y + (h - height - 100)/2;	// 100 is a guesstimate for toolbar height

			// Next bit forces IE5 to give focus and display the window in the correct position
                        if( w1 != null && !w1.closed )
                        {
                            w1.close();
                            w1 = null;
                        }			    

			w1 = window.open(theURL, name, "left=" + midx + ",top=" + midy + ",height="+ height + ",width=" +  width + options );
		}else{  
		    // Older browsers can't determine browser window pos/size and IE4 has probs
		    // closing and re-opening a window  	      

			w1 = window.open(theURL, name, "height="+ height + ",width=" +  width + options );
		}

		w1.focus();
	}
		
	function DetectSatelliteType()
	{
		var winType = document.refshelf.refshelflinks.options[document.refshelf.refshelflinks.selectedIndex].value;
		var options = ",location=no,menubar=no,resizable=no,status=no,toolbar=no,copyhistory=no,directories=no,scrollbars=yes";
		var w = 470, h = 460;

		if( winType == 1 )
			CreateSatellite( "/dict/", "SATELLITE", w, h, true, options );
		else if( winType == 2 )
		    CreateSatellite( "/glossary", "SATELLITE", w, h, true, options );
		else if( winType == 3 )
			CreateSatellite( "/shakespeare", "SATELLITE", w, h, true, options );
		else if( winType == 4 )
			CreateSatellite( "/kjbible", "SATELLITE", w, h, true, options );
				
		// Set the default option back, so we can detect another call for the same option
		document.refshelf.refshelflinks.options[0].selected=true;
	} 


// Generic roll-over code, thoughtfully supplied by the Mighty Macromedia . . .

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//top navbar rollover code for main pages spat out by photoshop


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		critic_over = newImage("/images_old/navbar/critic_over.gif");
		ref_over = newImage("/images_old/navbar/ref_over.gif");
		kn_over = newImage("/images_old/navbar/kn_over.gif");
		biblio_over = newImage("/images_old/navbar/biblio_over.gif");
		web_over = newImage("/images_old/navbar/web_over.gif");
		preloadFlag = true;
	}
}

// Popup Menus Motivator copyright 2001 E. Michael Brandt of ValleyWebDesigns.com
// All rights reserved.  Please leave these comments intact.
function VWD_showMenu(theMenu,origX,Ypos,widthRoot,widthMenu,maxW,useNode,USER_ADJ) {
var browser, width = 640, browserFudge=0, screenwidth = screen.width-20;
if (document.all) { //IE4+ 
	width = document.body.clientWidth;
browserFudge=0;
} else { if (document.layers) {//NS4+ 
	width = window.innerWidth;
browserFudge=-16;
	} else if (document.getElementById) {width = window.innerWidth;//NS6+ code
browserFudge=-12;
}
}
var newX ;
if (useNode == 0) newX = ((origX)*(screenwidth/maxW)*(width/screenwidth)) - USER_ADJ*(maxW/screenwidth)*((screenwidth-width)/width) + browserFudge;  
if (useNode == 1) newX = ((origX+widthRoot)*(screenwidth/maxW)*(width/screenwidth)) - USER_ADJ*(maxW/screenwidth)*((screenwidth-width)/width) + browserFudge - widthRoot;  
if (useNode == 2) newX = ((origX+widthMenu)*(screenwidth/maxW)*(width/screenwidth)) - USER_ADJ*(maxW/screenwidth)*((screenwidth-width)/width) + browserFudge - widthMenu;  
window.FW_showMenu(theMenu,newX,Ypos);
}


//more groovy fun with dhtml to get the icon key working
/*
Textual Tooltip Script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/


var content=new Array()
//change the array below to the text associated with your links Expand or contract the array, depending on how many links you have
content[0]='<p>Move your mouse over any of the search results icons above to view the relevant description in this box.'
content[1]='<p>Items with this logo have been indexed in the MHRA\'s <b>Annual Bibliography of English Language and Literature</b>.'
content[2]='<p>Clicking this icon next to an individual entry below will add it to your list of Selected Records.'
content[3]='<p>Clicking this icon next to an individual entry below will open the full bibliographic record.'
content[4]='<p>Clicking this icon next to an individual entry below will open the full text of an article.'
content[5]='<p>Clicking this icon next to an individual entry below will open the full text of the article in page image format.'
content[6]='<p>Clicking this icon next to an individual entry below will open the relevant Web page in a new window.'
content[7]='<p>Clicking this link next to an ABELL record will open the corresponding full text in JSTOR\'s <em>Arts &amp; Sciences I</em> collection (subscribers only).'

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
appear()
setTimeout("window.onresize=regenerate",450)
}
}

function changetext(whichcontent){

if (document.all||document.getElementById){
cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
cross_el.innerHTML=''+whichcontent+''
}
else if (document.layers){
document.d1.document.d2.document.write(''+whichcontent+'')
document.d1.document.d2.document.close()
}

}

function appear(){
document.d1.visibility='show'
}

