
 var isDHTML = 0;
 var isLayers = 0;
 var isAll = 0;
 var isID = 0;
 
 if (document.getElementById) 
 {
	isID = 1; 
	isDHTML = 1;
 }
 else 
 {
	if (document.all) 
	{
		isAll = 1; 
		isDHTML = 1;
	}
	else 
	{
		browserVersion = parseInt(navigator.appVersion);
		if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) 
		{
			isLayers = 1; 
			isDHTML = 1;
		}
	}
 }
 
 function findDOM(objectID,withStyle) 
 {
	if (withStyle == 1) 
	{
		if (isID) 
		{ 
			return (document.getElementById(objectID).style) ; 
		}
		else 
		{ 
			if (isAll) 
			{ 
				return (document.all[objectID].style); 
			}
			else 
			{
				if (isLayers) 
				{ 
					return (document.layers[objectID]); 
				}
			};
		}
	}
	//without style
	else 
	{
		if (isID) 
		{ 
			return (document.getElementById(objectID)) ; 
		}
		else 
		{ 
			if (isAll) 
			{ 
				return (document.all[objectID]); 
			}
			else 
			{
				if (isLayers) 
				{ 
					return (document.layers[objectID]); 
				}
			};
		}
	}
 }

    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 CloseSplash(pdf_name, splash_name)
	{
   		Splash.close();
	}

    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)/2;

            // 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(url)
    {
        var winType = document.refshelf.refshelflinks.options[document.refshelf.refshelflinks.selectedIndex].value;
        var options = ",location=no,menubar=yes,resizable=yes,status=yes,toolbar=yes,copyhistory=no,directories=no,scrollbars=yes";
        var w = 500, h = 480;

        if( winType == 1 )
        {
            CreateSatellite( url + "cod", "Lion3Sat", w, h, true, options );
        }
        else if( winType == 2 )
        {
            CreateSatellite( url + "mwd", "Lion3Sat", w, h, true, options );
        }
        else if( winType == 3 )
       	{
            CreateSatellite( url + "shakespeare", "Lion3Sat", w, h, true, options );
        }
        else if( winType == 4 )
        {
            CreateSatellite( url + "kjb", "Lion3Sat", w, h, true, options );
		}
        else if( winType == 5 )
        {
            CreateSatellite( url + "combined", "Lion3Sat", w, h, true, options );
		}
    }


    function OpenSatellite(url)
    {
        var options = ",location=yes,menubar=no,resizable=yes,status=yes,toolbar=no,copyhistory=no,directories=no,scrollbars=yes";
        var w = 500, h = 480;

        CreateSatellite( url, "Lion3Sat", w, h, true, options );
    }

	var newwindow;
	function pop_info(item_url)
	{
		newwindow=window.open(item_url,'pop_info','location=no,directories=no,status=no,menubar=yes,resizable=yes,copyhistory=no,scrollbars=yes,width=500,height=340');
		if (window.focus) {newwindow.focus()}
	}

	var newwindow;
	function pop_help(item_url)
	{
		newwindow=window.open(item_url,'pop_help','toolbar=yes,location=yes,directories=no,status=no,menubar=yes,resizable=yes,copyhistory=no,scrollbars=yes,width=500,height=480');
		if (window.focus) {newwindow.focus()}
	}

	var newwindow;
	function pop_20d_rightsindex(item_url)
	{
	newwindow=window.open(item_url,'pop_20d_rightsindex','toolbar=yes,location=yes,directories=no,status=no,menubar=yes,resizable=yes,copyhistory=no,scrollbars=yes,width=500,height=480');
	if (window.focus) {newwindow.focus()}
	}




/*Standard Design jscript used for POPUP WINDOWS */	
	
/* add Array.push if needed (for IE5.x) */
if (Array.prototype.push == null) {
	Array.prototype.push = function(item) {
		this[this.length] = item; return this.length;
	}
}

/* Add Event function taken from http://www.dustindiaz.com/rock-solid-addevent/ */

function addEvent( obj, type, fn ) {
	if (obj.addEventListener) {
		obj.addEventListener( type, fn, false );
		EventCache.add(obj, type, fn);
	}
	else if (obj.attachEvent) {
		obj["e"+type+fn] = fn;
		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
		obj.attachEvent( "on"+type, obj[type+fn] );
		EventCache.add(obj, type, fn);
	}
	else {
		obj["on"+type] = obj["e"+type+fn];
	}
}

/*	EventCache Version 1.0
	Copyright 2005 Mark Wubben
	Provides a way for automagically removing events from nodes and thus preventing memory leakage.
	See <http://novemberborn.net/javascript/event-cache> for more information.
	This software is licensed under the CC-GNU LGPL http://creativecommons.org/licenses/LGPL/2.1/ */
	
var EventCache = function(){
	var listEvents = [];
	return {
		listEvents : listEvents,
		add : function(node, sEventName, fHandler){
			listEvents.push(arguments);
		},
		flush : function(){
			var i, item;
			for(i = listEvents.length - 1; i >= 0; i = i - 1){
				item = listEvents[i];
				if(item[0].removeEventListener){
					item[0].removeEventListener(item[1], item[2], item[3]);
				};
				if(item[1].substring(0, 2) != "on"){
					item[1] = "on" + item[1];
				};
				if(item[0].detachEvent){
					item[0].detachEvent(item[1], item[2]);
				};
				item[0][item[1]] = null;
			};
		}
	};
}();

/* doTheLinks manages all links in document with specific class names */

function doTheLinks() {
	if (!document.getElementsByTagName) return false;
	var links = document.getElementsByTagName("a");
	for (var i=0; i < links.length; i++) {
		if (links[i].className && links[i].className.match("popUp")) {
			hideSpan = document.createElement('span');
			hideSpan.className = 'hiddentext';
			hideText = document.createTextNode(' - this link will open in a new window');
			hideSpan.appendChild(hideText);
			links[i].setAttribute("title", "This link will open in a new window");
			links[i].appendChild(hideSpan);
// IE 5 needs special treatment because it’s a bit special
if(!links[i].ownerDocument) {
				blankImg = document.createElement('img');
				blankImg.src = '/images/blank.gif';
				blankImg.className = 'borderNone';
				links[i].appendChild(blankImg);
			}
		}
		if (links[i].className && links[i].className.match("externalLink")) {
			hideSpan = document.createElement('span');
			hideSpan.className = 'hiddentext';
			hideText = document.createTextNode(' - link to external site, this link will open in a new window');
			hideSpan.appendChild(hideText);
			links[i].setAttribute("title", "Link to external site, this link will open in a new window");
			links[i].appendChild(hideSpan);
// IE 5 needs special treatment because it’s a bit special
if(!links[i].ownerDocument) {
				blankImg = document.createElement('img');
				blankImg.src = '/images/blank.gif';
				blankImg.className = 'borderNone';
				links[i].appendChild(blankImg);
			}
		}
		// attributes if single page only e.g. end session - named 'popUpSmall'
		// change PRODUCT for your product name and add attributes as required
		if (links[i].className && (' ' + links[i].className + ' ').indexOf(' popUpSingle ') != -1) {
			links[i].onclick = function() {
window.open(this.href,'ILCPopUpSingle','width=480,height=360,resizable=1,toolbar=1,location=0,directories=0,addressbar=1,scrollbars=1,status=0,menubar=0');
				return false;
			}
		} 
		// attributes if medium popup - named 'popUpHelp'
// change PRODUCT for your product name and add attributes as required
		else if (links[i].className && (' ' + links[i].className + ' ').indexOf(' popUpHelp ') != -1) {
			links[i].onclick = function() {
window.open(this.href,'ILCPopUpHelp','width=500,height=480,resizable=1,toolbar=1,location=1,directories=0,addressbar=1,scrollbars=1,status=0,menubar=0');
				return false;
			}
		} 
		// attributes if large popup - named 'popUpMulti'
		// change PRODUCT for your product name and add attributes as required
		else if (links[i].className && (' ' + links[i].className + ' ').indexOf(' popUpMulti ') != -1 || (' ' + links[i].className + ' ').indexOf(' externalLink ') != -1) {
			links[i].onclick = function() {
window.open(this.href,'','width=640,height=480,resizable=1,toolbar=1,location=1,directories=0,addressbar=1,scrollbars=1,status=0,menubar=0');
				return false;
			}
		}
	}
}

/* Focus any window as it loads */

function doFocus() {
	window.focus();
}

/* Calls for above functions */

addEvent(window,'load',doFocus);
addEvent(window,'load',doTheLinks);
addEvent(window,'unload',EventCache.flush);


/*END DESIGN JSCRIPT FOR POPUPS WINDOWS*/	





// 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/navbar/critic_over.gif");
        ref_over = newImage("/images/navbar/ref_over.gif");
        kn_over = newImage("/images/navbar/kn_over.gif");
        biblio_over = newImage("/images/navbar/biblio_over.gif");
        web_over = newImage("/images/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'
}

function getForm(name) {
	for(i=0; i<document.forms.length; i++)
	{
		if(document.forms[i].name==name)
			return document.forms[i];
	}
}

function openUrlWindow(page)
{
    windowPrefs = "toolbar=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=480,height=320";
    urlWindow = window.open(page, "openUrl", windowPrefs);
    urlWindow.focus();
}
function openAwsCoverWindow(page)
{
    windowPrefs = "toolbar=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=480,height=600";
    urlWindow = window.open(page, "openAwsCover", windowPrefs);
    urlWindow.focus();
}

function text_only()
{
	if (document && document.location.href)
  	{
  		var locn = document.location.href;
  		var loc1 = locn;
  		if (locn.indexOf('#') > 0)
  		{
  			loc1 = locn.replace(/\#(.*)$/, '');
  		}		
  		document.location=loc1 + '&amp;extra_PRINT=yes&amp;extra_ALL=Y&amp;extra_WARN=N';
  	}
}

// If a cookie exists with the given name return the value, else return a blank string
// For static complete contents pages
function getQSTermsFromCookie(name)
{
    var terms = "";
    start_index=document.cookie.indexOf(name,0);

    if(start_index==-1)
    {
        terms = "";
    }
    else
    {
        equals_index=name.length + start_index;
        semicolon_index=document.cookie.indexOf(";",equals_index);
        if(semicolon_index==-1)
            terms = document.cookie.substring(equals_index+1);
        else
            terms = document.cookie.substring(equals_index+1,semicolon_index);
    }
    // Don't display quick search terms after doing search.
    // Also see /include/side.jsp
    //document.forms['searchQuickForm'].QuickSearchField.value = terms;
    document.forms['searchQuickForm'].QuickSearchField.value = "";
}

function staticToc(contents, journal, issue)
{
    if (journal.match(/literature online biography/i)) {
        contents = "/contents/bio_toc";
        journal = "";
        issue = "bio_first";
    }
    url = "/staticToc.do?contents="+contents+"&journal="+journal+"&issue="+issue;
    self.location = url;
}

// Project7 code for snapping fulltext div into position on Text FT page
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);


function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function P7_autoLayers() { //v1.4 by PVII
 var g,b,k,f,args=P7_autoLayers.arguments;a=parseInt(args[0]);if(isNaN(a))a=0;
 if(!document.p7setc){p7c=new Array();document.p7setc=true;for(var u=0;u<10;u++){
 p7c[u]=new Array();}}for(k=0;k<p7c[a].length;k++){if((g=MM_findObj(p7c[a][k]))!=null){
 b=(document.layers)?g:g.style;b.visibility="hidden";}}for(k=1;k<args.length;k++){
 if((g=MM_findObj(args[k]))!=null){b=(document.layers)?g:g.style;b.visibility="visible";f=false;
 for(var j=0;j<p7c[a].length;j++){if(args[k]==p7c[a][j]) {f=true;}}
 if(!f){p7c[a][p7c[a].length++]=args[k];}}}
}

function P7_ReDoIt() { //v1.21 by PVII
 if(document.layers) {MM_reloadPage(false);}
}

function P7_Snap() { //v2.63 by PVII
 var x,y,ox,bx,oy,p,tx,a,b,k,d,da,e,el,tw,q0,xx,yy,w1,pa='px',args=P7_Snap.arguments;a=parseInt(a);
 if(document.layers||window.opera){pa='';}for(k=0;k<(args.length);k+=4){
 if((g=MM_findObj(args[k]))!=null){if((el=MM_findObj(args[k+1]))!=null){
 a=parseInt(args[k+2]);b=parseInt(args[k+3]);x=0;y=0;ox=0;oy=0;p="";tx=1;
 da="document.all['"+args[k]+"']";if(document.getElementById){
 d="document.getElementsByName('"+args[k]+"')[0]";if(!eval(d)){
 d="document.getElementById('"+args[k]+"')";if(!eval(d)){d=da;}}
 }else if(document.all){d=da;}if(document.all||document.getElementById){while(tx==1){
 p+=".offsetParent";if(eval(d+p)){x+=parseInt(eval(d+p+".offsetLeft"));y+=parseInt(eval(d+p+".offsetTop"));
 }else{tx=0;}}ox=parseInt(g.offsetLeft);oy=parseInt(g.offsetTop);tw=x+ox+y+oy;
 if(tw==0||(navigator.appVersion.indexOf("MSIE 4")>-1&&navigator.appVersion.indexOf("Mac")>-1)){
  ox=0;oy=0;if(g.style.left){x=parseInt(g.style.left);y=parseInt(g.style.top);}else{
  w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;
  x=document.body.scrollLeft+event.clientX+bx;y=document.body.scrollTop+event.clientY;}}
 }else if(document.layers){x=g.x;y=g.y;q0=document.layers,dd="";for(var s=0;s<q0.length;s++){
  dd='document.'+q0[s].name;if(eval(dd+'.document.'+args[k])){x+=eval(dd+'.left');y+=eval(dd+'.top');
  break;}}}e=(document.layers)?el:el.style;xx=parseInt(x+ox+a),yy=parseInt(y+oy+b);
 if(navigator.appVersion.indexOf("MSIE 5")>-1 && navigator.appVersion.indexOf("Mac")>-1){
  xx+=parseInt(document.body.leftMargin);yy+=parseInt(document.body.topMargin);}
 e.left=xx+pa;e.top=yy+pa;}}}
}
//new durable url layer
/***********************************************
* Drop Down/ Overlapping Content- ? Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr);
subobj.style.display=(subobj.style.display!="block")? "block" : "none";
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0) ;
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0);
subobj.style.left=xpos+"px";
subobj.style.top=ypos+4+"px";
return false
}
else
return true
}

function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}  

/***********************************************************
//Highlight target element - used for highlighting footnotes
************************************************************/
function clearbg(obj) {
  for(j=1;;j++)
  {
		 myID = obj + j;
		 if(myObj = document.getElementById(myID))
		 {
				myObj.style.backgroundColor = 'white'; //use bgcolor of page
		 }
		 else
			break;
  }
}
function setbg(x) {
 document.getElementById(x).style.backgroundColor = '#FFFF99'; //highlight color
}