	var timerT = false;

	function imgCancel(img) {
		clearTimeout(timerT);
	}

	function imgHover(img, imgLargeURL, widthL, heightL) {

//alert('In imgHover');

		//clear prvious timers
		if(timerT) {
			clearTimeout(timerT);
		}
		var box = document.getElementById('imgbox' + img.id);
		if (! box) return;

		var pop = document.getElementById('popup');
		if (! pop) return;

//alert('checkpoint');
		var contain = document.getElementById('popupcontain');
		var popshadow = document.getElementById('popupshadow');
		var popimage = document.getElementById('popupimage');
		var poplink = document.getElementById('popuplink');

		// reset any previous stuff that was set.
		pop.style.display = 'none';
		popimage.src = '/images/gif/spacer.gif';

		var href = document.getElementById('href' + img.id);
		poplink.href = href.href;
		poplink.target = href.target;

//alert('poplink.href');

		var smallH = parseFloat(img.style.height);
		var smallW = parseFloat(img.style.width);

//alert('smallH: ' + smallH);
//alert('smallW: ' + smallW);


		var popWidth = 250;
		var popHeight = 250;		
		var bigW = widthL;
		var bigH = heightL;
		var bigWadj = bigW;
		var bigHadj = bigW;

//alert(bigHadj);		

		var containWidth = popWidth - 2;
		var containHeight = popHeight - 44;
		contain.style.width = containWidth + 'px';
		contain.style.height = containHeight + 'px';
		
		if((bigH > containHeight) || (bigW > containWidth))
		{
//alert('in if');		
			if(bigH > bigW)//containHeight) 
			{
				//alert('case 1');
				var hDiff = bigH - containHeight;
				//alert(hDiff);
				var hPercentDiff = (hDiff/bigH);
				//alert(hPercentDiff);
				bigHadj = containHeight;
				bigWadj = parseInt(bigWadj * (1 - hPercentDiff));
			} 
			else if(bigW > bigH)			{
				var wDiff = bigW - containWidth;
				var wPercentDiff = ((wDiff/bigW) * 100);

				bigWadj = containWidth;
				bigHadj = parseInt(bigHadj * ((100 - wPercentDiff)/100));		
			} 
			else 
			{
				
				bigHadj = containHeight;
				bigWadj = containWidth;
			}
		
		}
//alert('out if');		
		
		pop.style.width = popWidth + 'px';
		pop.style.height = popHeight + 'px';

//alert('popWidth: ' + popWidth);
//alert('popHeight: ' + popHeight);
		
		popshadow.style.width  = containWidth + 'px';
		popshadow.style.height = containHeight + 2 + 'px';

		popimage.style.width  = bigWadj + 'px';
		popimage.style.height = bigHadj + 'px';

//alert('bigWadj: ' + bigWadj);
//alert('bigHadj: ' + bigHadj);
//alert('smallH: ' + smallH);

		// Positioning the Box
		var top = objGetRealTop(box);
//alert('RealTop: ' + top);
		//pop.style.top = (top - (smallH) + 5) + 'px';
		pop.style.top = (top - 50) + 'px';



		var left = objGetRealLeft(box);
		//alert(smallW);
		//pop.style.left = (left - (smallW) - 5) + 'px';
		pop.style.left = (left - 70) + 'px';

//alert('styles set');

		// Setting Box Contents
		var titleImgBox = document.getElementById('title' + img.id);
		var titlePopUp = document.getElementById('popuptitle');
		//titlePopUp.innerHTML = titleImgBox.innerHTML + '...';
		//titlePopUp.innerHTML = titleImgBox.innerHTML.substring(0,4) + '...';
		titlePopUp.style.height = 40 + 'px';
		titlePopUp.innerHTML = '<table height="100%"><tr><td align=center valign=middle>' + img.alt + '</td></tr></table>';
		
//alert(titlePopUp.innerHTML);
		

		popimage.src = imgLargeURL;
		var cmd = "delayShow('"+popimage.src+"')";
		timerT = setTimeout(cmd, 600);

	}
	
	function imgHover2(img, imgLargeURL, widthL, heightL) {

//alert('In imgHover');

		//clear prvious timers
		if(timerT) {
			clearTimeout(timerT);
		}
		var box = document.getElementById('imgbox' + img.id);
		if (! box) return;

		var pop = document.getElementById('popup');
		if (! pop) return;

//alert('checkpoint');
		var contain = document.getElementById('popupcontain');
		var popshadow = document.getElementById('popupshadow');
		var popimage = document.getElementById('popupimage');
		var poplink = document.getElementById('popuplink');

		// reset any previous stuff that was set.
		pop.style.display = 'none';
		popimage.src = '/images/gif/spacer.gif';

		var href = document.getElementById('href' + img.id);
		poplink.href = href.href;
		poplink.target = href.target;

//alert('poplink.href');

		var smallH = parseFloat(img.style.height);
		var smallW = parseFloat(img.style.width);

//alert('smallH: ' + smallH);
//alert('smallW: ' + smallW);


		var popWidth = 250;
		var popHeight = 250;		
		var bigW = widthL;
		var bigH = heightL;
		var bigWadj = bigW;
		var bigHadj = bigW;

//alert(bigHadj);		

		var containWidth = popWidth - 2;
		var containHeight = popHeight - 44;
		contain.style.width = containWidth + 'px';
		contain.style.height = containHeight + 'px';
		
		if((bigH > containHeight) || (bigW > containWidth))
		{
//alert('in if');		
			if(bigH > bigW)//containHeight) 
			{
				//alert('case 1');
				var hDiff = bigH - containHeight;
				//alert(hDiff);
				var hPercentDiff = (hDiff/bigH);
				//alert(hPercentDiff);
				bigHadj = containHeight;
				bigWadj = parseInt(bigWadj * (1 - hPercentDiff));
			} 
			else if(bigW > bigH)			{
				var wDiff = bigW - containWidth;
				var wPercentDiff = ((wDiff/bigW) * 100);

				bigWadj = containWidth;
				bigHadj = parseInt(bigHadj * ((100 - wPercentDiff)/100));		
			} 
			else 
			{
				
				bigHadj = containHeight;
				bigWadj = containWidth;
			}
		
		}
//alert('out if');		
		
		pop.style.width = popWidth + 'px';
		pop.style.height = popHeight + 'px';

//alert('popWidth: ' + popWidth);
//alert('popHeight: ' + popHeight);
		
		popshadow.style.width  = containWidth + 'px';
		popshadow.style.height = containHeight + 2 + 'px';

		popimage.style.width  = bigWadj + 'px';
		popimage.style.height = bigHadj + 'px';

//alert('bigWadj: ' + bigWadj);
//alert('bigHadj: ' + bigHadj);
//alert('smallH: ' + smallH);

		// Positioning the Box
		var top = objGetRealTop(box);
//alert('RealTop: ' + top);
		//pop.style.top = (top - (smallH) + 5) + 'px';
		pop.style.top = (top - 50) + 'px';



		var left = objGetRealLeft(box);
		//alert(smallW);
		//pop.style.left = (left - (smallW) - 5) + 'px';
		pop.style.left = (left - 70) + 'px';

//alert('styles set');

		// Setting Box Contents
		var titleImgBox = document.getElementById('title' + img.id);
		var titlePopUp = document.getElementById('popuptitle');
		//titlePopUp.innerHTML = titleImgBox.innerHTML + '...';
		//titlePopUp.innerHTML = titleImgBox.innerHTML.substring(0,4) + '...';
		titlePopUp.style.height = 40 + 'px';
		titlePopUp.innerHTML = '<table height="100%"><tr><td align=center valign=middle>' + img.alt + '</td></tr></table>';
		
//alert(titlePopUp.innerHTML);
		

		popimage.src = imgLargeURL;
		var cmd = "delayShow('"+popimage.src+"')";
		timerT = setTimeout(cmd, 600);

	}
		
	

	function img_path(imgLargeURL) {
	
		var subFront = imgLargeURL.substring(0,4);
		
		if ( subFront == 'http:' )	
			return imgLargeURL;
		else
			return 'http://' + document.domain + imgLargeURL;
	
	}

	function delayShow(imgsrc) {

		// clear the timer
		clearTimeout(timerT);

		// and show the area.
		var pop = document.getElementById('popup');
		pop.style.display = 'block';
	}


