<!--Begin preload images-->
<!--Instructions: insert preloadImages() in body tag and simply name the image over file in <img> using a tag named 'oversrc' //-->
var imagesOut=new Array();
var imagesOver=new Array();

var inputImagesOut=new Array();
var inputImagesOver=new Array();

function preloadImages() {
	var imgs = document.getElementsByTagName('img');
	for (var i=0;i<imgs.length;i++) {
		if (imgs[i].getAttribute('oversrc')) {
			imgs[i].onmouseover = imageMouseOver;
			imgs[i].onmouseout = imageMouseOut;
			imagesOut[i] = new Image();
			imagesOut[i].setAttribute('src',imgs[i].getAttribute('src'));
			imagesOver[i] = new Image();
			imagesOver[i].setAttribute('src',imgs[i].getAttribute('oversrc'));
			imgs[i].setAttribute('number', i);
			};
		};
		
	var inputs = document.getElementsByTagName('input');
	for (var i=0;i<inputs.length;i++) {
		if (inputs[i].getAttribute('oversrc')) {
			inputs[i].onmouseover = inputImageMouseOver;
			inputs[i].onmouseout = inputImageMouseOut;
			inputImagesOut[i] = new Image();
			inputImagesOut[i].setAttribute('src',inputs[i].getAttribute('src'));
			inputImagesOver[i] = new Image();
			inputImagesOver[i].setAttribute('src',inputs[i].getAttribute('oversrc'));
			inputs[i].setAttribute('number', i);
			};
		};
		
	};

function imageMouseOver() {
	this.setAttribute('src', imagesOver[this.getAttribute('number')].getAttribute('src'));
	};

function imageMouseOut()	{
	this.setAttribute('src', imagesOut[this.getAttribute('number')].getAttribute('src'));
	};

function inputImageMouseOver() {
	this.setAttribute('src', inputImagesOver[this.getAttribute('number')].getAttribute('src'));
	};

function inputImageMouseOut()	{
	this.setAttribute('src', inputImagesOut[this.getAttribute('number')].getAttribute('src'));
	};
	
<!--End preload images-->

function Page_Navigate (Page) {
	document.Search_Form.Page.value = Page;
	document.Search_Form.submit();
	};

function popImage(File, Width, Height) {
		Width=Width+60;
		Height=Height+100+208;
        window.open('http://www.poptower.com/pop-image.php?FN='+File,'Image','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no, left=50, top=50, width='+Width+',height='+Height+', title="Image"');
        };
		
function showCircle (theAnchorElementId, theShowElementId) {
	theAnchorElement=document.getElementById(theAnchorElementId);
	theShowElement=document.getElementById(theShowElementId);
	if (theAnchorElement) {
		coords=getElementPosition (theAnchorElement);
		coords.y+=theShowElement.offsetHeight-20;
		coords.x+=theShowElement.offsetWidth-20;
		theShowElement.style.left=coords.x+"px";
		theShowElement.style.top=coords.y+"px";
		theShowElement.style.display="inline";
		};
	};

function showCircleLine (theAnchorElementId, theShowElementId) {
	theAnchorElement=document.getElementById(theAnchorElementId);
	theShowElement=document.getElementById(theShowElementId);
	if (theAnchorElement) {
		coords=getElementPosition (theAnchorElement);		
		coords.y-=20;
		coords.x-=20;
		theShowElement.style.left=coords.x+"px";
		theShowElement.style.top=coords.y+"px";
		theShowElement.style.display="inline";
		theShowElement.style.visibility='visible';
		};
	};