	var theObj="";
	var toolTipObj = null;
	var loader = new Image();
	loader.src = 'images/popup_loader.gif';
	
	/* www.dustindiaz.com*/
	function getElementsByClass(searchClass,node,tag) {
		var classElements = new Array();
		if ( node == null )
			node = document;
		if ( tag == null )
			tag = '*';
		var els = node.getElementsByTagName(tag);
		var elsLen = els.length;
		var pattern = new RegExp("(^|\\\\s)"+searchClass+"(\\\\s|$)");
		for (i = 0, j = 0; i < elsLen; i++) {
			if ( pattern.test(els[i].className) ) {
				classElements[j] = els[i];
				j++;
			}
		}
		return classElements;
	}
	
	//Display tooltip
	function toolTip(text,me) {
		theObj=me;
		theObj.onmousemove=updatePos;
		img = new Image();
		img.src = text;
		
		toolTipObj = document.getElementById('imageToolTip');
		toolTipObj.style.display="block";
		toolTipObj.innerHTML= "<img src='"+loader.src+"'/>";
		toolTipObj.style.padding="0";
		toolTipObj.style.width = loader.width+"px";
		toolTipObj.style.height = loader.height+"px";
		
		img.onload = function() {
			toolTipObj.innerHTML= "<img src='"+img.src+"'/>";

			toolTipObj.style.width = img.width+"px";
			toolTipObj.style.height = img.height+"px";
		}
	}
	
	//Update Position of Tooltip
	function updatePos(e) {	
		var posx = 0;
		var posy = 0;
		var toolTip = document.getElementById('imageToolTip');
		
		if (!e) var e = window.event;
		if (e.pageX || e.pageY) 	{
			posx = e.pageX;
			posy = e.pageY;
		}
		else if (e.clientX || e.clientY) 	{
			posx = e.clientX + document.body.scrollLeft
				+ document.documentElement.scrollLeft;
			posy = e.clientY + document.body.scrollTop
				+ document.documentElement.scrollTop;
		}
		
		var x = posx;
		var y = posy;
		
		var tp = parseInt(y+25);
		var lt = parseInt(x+15);
		
		if ( parseInt(document.documentElement.clientWidth+document.documentElement.scrollLeft) < parseInt(toolTip.offsetWidth+lt) ) {
			toolTip.style.left = parseInt(lt-(toolTip.offsetWidth/1.5))+'px';
		} else {
			toolTip.style.left = lt+'px';
		}
		
		if (parseInt(document.documentElement.clientHeight+document.documentElement.scrollTop) < parseInt(toolTip.offsetHeight+tp) ) {
			toolTip.style.top = parseInt(tp-(toolTip.offsetHeight*1.1))-20+'px';
		} else {
			toolTip.style.top = tp+'px';
		}
		
		theObj.onmouseout=hideMe;
	}
	
	//Hide tooltips on mouseout
	function hideMe() {
		if (document.getElementById('imageToolTip'))
		{
			document.getElementById('imageToolTip').innerHTML = "";
			document.getElementById('imageToolTip').style.display="none";
		}
	}
	
	
	
	function showYearSubmit()
	{
//		alert('Hello World');
		
		var url = stuburl + document.show_year.year.value + '.htm';
		
		window.location = url;
		return false;
	}
	
	function selectSubmit(el)
	{
//		alert('Hello World');
		
		if(el.value!='')
		{
			var url = stuburl + el.value + '.htm';
		}
		else
		{
			var url = stuburl;
		}
		
		window.location = url;
		return false;
	}
