	var imgwidth = 0, imgheight = 0;

	if (document.getElementById || document.all)
	{
		document.write('<div id="trailimageid">');
		document.write('</div>');
	}
	
	function gettrailobj()
	{
		if (document.getElementById)
			return document.getElementById("trailimageid").style
		else if (document.all)
			return document.all.trailimagid.style
	}
	
	function gettrailobjnostyle()
	{
		if (document.getElementById)
			return document.getElementById("trailimageid")
		else if (document.all)
			return document.all.trailimagid
	}
	
	function truebody()
	{
		return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}
	
	function trackMouse(imagename, title)
	{
		gettrailobj().display="block";
		
		var oImg = new Image();
		oImg.src = imagename;
		imgwidth = oImg.width;
		imgheight = oImg.height + 24;
		
		if (!document.all)
			document.captureEvents(Event.MOUSEMOVE);

		document.onmousemove = followmouse;
		
		
		newHTML = '<div align="center" style="padding: 5px; background-color: #FFF; border: 1px solid #888; width:' + imgwidth + ';">';
		//newHTML = newHTML + '<h2>' + title + '</h2>';
		newHTML = newHTML + title;
		newHTML = newHTML + '<div align="center" style="padding: 8px 2px 2px 2px;">';
		newHTML = newHTML + '<img src="' + imagename + '" border="0"></div>';
		newHTML = newHTML + '</div>';
		gettrailobjnostyle().innerHTML = newHTML;
		pausecomp(50);
		gettrailobj().display="inline";
	}
	
	function pausecomp(millis) 
	{
	var date = new Date();
	var curDate = null;

	do { curDate = new Date(); } 
	while(curDate-date < millis);
	} 

	
	function untrackMouse()
	{
		gettrailobj().innerHTML = " ";
		gettrailobj().display="none"
		document.onmousemove=""
		gettrailobj().left="-500px"
	}

	function followmouse(e)
	{
		//image x,y offsets from cursor position
		var xcoord = 15;
		var ycoord = 20;
		var docwidth = 0;
		var docheight = 0;
	
		/*var docwidth = document.all? truebody().scrollLeft+truebody().clientWidth : window.innerWidth;
		var docheight = document.all? truebody().scrollTop+truebody().clientHeight : window.innerHeight;*/
		
		docwidth = (document.body) ? document.body.clientWidth + document.body.scrollLeft : document.documentElement.clientWidth + document.documentElement.scrollLeft;
		docheight = (document.body) ? document.body.clientHeight + document.body.scrollTop : document.documentElement.clientHeight + document.documentElement.scrollTop;

		if (typeof e != "undefined")
		{	
			if (docwidth - e.pageX - xcoord < imgwidth)
				xcoord = e.pageX + truebody().scrollLeft - xcoord - imgwidth; // Move to the left side of the cursor
			else
				xcoord = e.pageX + truebody().scrollLeft + xcoord;
	
			if (truebody().scrollTop == 0)
			{
				if (window.innerHeight - e.pageY - ycoord < imgheight)
					ycoord = e.pageY - imgheight - ycoord;
				else
					ycoord = e.pageY + ycoord;
			}
			else
			{
				if (docheight - e.pageY - ycoord < imgheight)
					ycoord = e.pageY - imgheight - ycoord;
				else
					ycoord = e.pageY + ycoord;			
			}
		}
		else if (typeof window.event != "undefined")
		{		
			if (truebody().clientWidth - event.clientX - xcoord < imgwidth)
				xcoord = event.clientX + truebody().scrollLeft - xcoord - imgwidth; //Move to the left side of the cursor
			else
				xcoord = truebody().scrollLeft + event.clientX;

			if (truebody().clientHeight - event.clientY - ycoord < imgheight)
 				ycoord = event.clientY + truebody().scrollTop - ycoord - imgheight;	//Move to the top side of the cursor
			else
				ycoord = truebody().scrollTop + event.clientY + ycoord;
		}
	
		gettrailobj().left=xcoord;
		gettrailobj().top=ycoord;
	}
	
	function PreloadImages(strImages, strDelim)
	{
		var oImages = null;
		var arrImages = null;
		var oImg = null;
		
		arrImages = strImages.split(strDelim);
		oImages = new Array();
		for (var i=0; i<arrImages.length; i++)
		{
			oImg = new Image();
			oImg.src = arrImages[i];
		}
	}
	
	function trackCATextMouse()
	{
		gettrailobj().display="block";
		
		imgwidth = 400;
		imgheight = 300;
		
		if (!document.all)
			document.captureEvents(Event.MOUSEMOVE);

		document.onmousemove = followmouse;
		
		
		
		newHTML = '<div align="center" class="gray_text_14" style="padding: 5px; background-color: #FFF; border: 1px solid #888; width:' + imgwidth + ';">';
		//newHTML = newHTML + '<h2>' + title + '</h2>';
		newHTML = newHTML + '<b>The Caren Archive</b>';
		newHTML = newHTML + '<div align="justify" class="gray_text_14" style="padding: 8px 2px 2px 2px;" >';
		newHTML = newHTML + 'The Caren Archive is a collection of some 20,000 extremely rare, often one-of-a-kind, newspapers and newsbooks covering the major events from the 16th to the early 20th centuries in the U.S. and Britain.  The Caren Archive also features many news photographs, broadsides, and prints.<br><br>The archive itself is the life\'s work of Eric C. Caren, a noted collector of rare newspapers for over 30 years, is widely recognized as one the nation\'s foremost experts in the field of historical paper. He enjoys sharing his archive with the public and believes that these important documents enhance the scholarship of experts and students alike.<br><br>Mr. Caren is a consultant to the Freedom Forum NEWSEUM and is a former director of the Ephemera Society of America. He is a member of the American Antiquarian Society and is the author of nine books. He has also written histories for the Smithsonian\'s National Air and Space Museum and the Smithsonian\'s National Museum of American History.';
		newHTML = newHTML + '</div>';
		gettrailobjnostyle().innerHTML = newHTML;
		
		gettrailobj().display="inline";
	}
	function trackCATextClick()
	{
		
		gettrailobj().display="block";
		
		imgwidth = 400;
		imgheight = 200;
		
		if (!document.all)
			document.captureEvents(Event.MOUSEMOVE);
		
		//document.onmousemove = followmouse;
		
		//followmouse;
		
		newHTML = '<div align="center" style="padding: 5px; background-color: #FFF; border: 1px solid #888; width:' + imgwidth + ';">';
		//newHTML = newHTML + '<h2>' + title + '</h2>';
		newHTML = newHTML + '<b>The Caren Archive</b>';
		newHTML = newHTML + '<div align="justify" style="padding: 8px 2px 2px 2px;">';
		newHTML = newHTML + 'The Caren Archive is a collection of some 20,000 extremely rare, often one-of-a-kind, newspapers and newsbooks covering the major events from the 16th to the early 20th centuries in the U.S. and Britain.  The Caren Archive also features many news photographs, broadsides, and prints.<br>The archive itself is the life\'s work of Eric C. Caren, a noted collector of rare newspapers for over 30 years, is widely recognized as one the nation\'s foremost experts in the field of historical paper. He enjoys sharing his archive with the public and believes that these important documents enhance the scholarship of experts and students alike.<br>Mr. Caren is a consultant to the Freedom Forum NEWSEUM and is a former director of the Ephemera Society of America. He is a member of the American Antiquarian Society and is the author of nine books. He has also written histories for the Smithsonian\'s National Air and Space Museum and the Smithsonian\'s National Museum of American History.';
		newHTML = newHTML + '</div>';
		gettrailobjnostyle().innerHTML = newHTML;
		
		gettrailobj().display="inline";
	}