//--- NOTE: This description content is generated from descripts.php.  Do not edit here. ---
var svDescript = new Array();
svDescript["index"] = "Our historic building is home to practical resources, provided with a personal touch.";
svDescript["new_titles"] = "Many new titles each month";
svDescript["childrens"] = "A friendly atmosphere, maintained with care";
svDescript["magazines"] = "Dozens of popular titles, can be checked out!";
svDescript["audio"] = "An extensive, growing collection of unabridged titles";
svDescript["large_print"] = "Quality reading for the vision impaired";
svDescript["video"] = "Rentals from a diverse collection for young and old";
svDescript["computer"] = "Free high-speed internet; affordable fax and color copy";
svDescript["special"] = "Poetry readings, crafts and other community activities";
svDescript["club"] = "Make new friends as you save money building your personal collection";
svDescript["interlib"] = "Delivery of books from other libraries";
svDescript["delivery"] = "Home delivery for the mobility impaired";
svDescript["policy"] = "Checkout periods, overdue fines and other policies";
svDescript["admin"] = "A responsive and dedicated board and staff";

var svDefHint = "To get involved, follow an action link above. For more details, click a feature name to the left.";
var svHoverHint= "Click the highlighed feature to see more.";

//--- End of generated descriptions ---

//--- NOTE: This script code is auto-copied from tisklib-main.js  Do not edit here. ---

	var svFeature='';
	var svLastFeature='';
	
	var iFadeCalls = new Array();
	iFadeCalls["FtrDescript"]=0;
	iFadeCalls["FtrHnt"]=0;
	
	var iColor = new Array();
	iColor["FtrDescript"]=255;
	iColor["FtrHnt"]=255;
	iColor["GtCard"]=255;
	iColor["BookRqst"]=255;
	iColor["ShareIdea"]=255;
	
	var iTargetColor = new Array();
	iTargetColor["FtrDescript"]=0;
	iTargetColor["FtrHnt"]=150;
	iTargetColor["GtCard"]=0;
	iTargetColor["BookRqst"]=0;
	iTargetColor["ShareIdea"]=0;
	
	var iExtraWait=0;
	
	function fadeIt(elemID,bHeader){
		
		if (iFadeCalls[elemID]>1 && !bHeader) {
			iColor[elemID]=255; //back to white
			iFadeCalls[elemID]-=1;

 		} else {
		
			if (iColor[elemID]>iTargetColor[elemID]){
				iColor[elemID]-=5; // darker
				
				document.getElementById(elemID).style.color="rgb("+iColor[elemID]+","+iColor[elemID]+","+iColor[elemID]+")";
				
				switch (elemID) {
					case "BookRqst":
						setTimeout("fadeIt('BookRqst',1)",20); 
						break;
					case "GtCard":
						setTimeout("fadeIt('GtCard',1)",20); 
						break;
					case "ShareIdea":
						setTimeout("fadeIt('ShareIdea',1)",20); 
						break;
					case "FtrDescript":
						setTimeout("fadeIt('FtrDescript',0)",20); 
						break;
					case "FtrHnt":
						setTimeout("fadeIt('FtrHnt',0)",20); 
						break;
				}
				
			}
			else
			{	
				if (!bHeader) iFadeCalls[elemID]-=1;
				iColor[elemID]=iTargetColor[elemID];
				document.getElementById(elemID).style.color="rgb("+iTargetColor[elemID]+","+iTargetColor[elemID]+","+iTargetColor[elemID]+")";
			}
		}
	}
	

	function restoreTxt()
	{
		tgTxt(svFeature,1);
	}
	
	
	//Toggle Text
	function tgTxt(listID,outEvent)
	{
		if (!document.getElementById("FtrDescript").innerHTML) return;
		
		// just-in-case for elusive IE symptom described below
		if (listID == undefined) return;
		
		//fix for intermittent IE symptom: descript sometimes returns "undefined" after link click
		// (was onmouseover event firing before BODY onload executed?)
		if (svDescript[listID] == undefined) return;
		
			
		if (outEvent==1) 
			if (listID=="index")
				document.getElementById("FtrHnt").innerHTML=svDefHint
			else
				document.getElementById("FtrHnt").innerHTML="";
		else
			if (listID==svFeature) {
				document.getElementById("FtrHnt").innerHTML="";
	  			return;
  			} else
				document.getElementById("FtrHnt").innerHTML=svHoverHint;
		
				
		// load the description item with matching ID of feature link
  		document.getElementById("FtrDescript").innerHTML=svDescript[listID];
  		
		
		if (listID!=svLastFeature || listID==svFeature){
			 //fade in the description and its click hint
			document.getElementById("FtrDescript").style.color="rgb(255,255,255)";
			document.getElementById("FtrHnt").style.color="rgb(255,255,255)";
			
			iFadeCalls["FtrDescript"]+=1;
			setTimeout("fadeIt('FtrDescript',0)",150+iExtraWait);
			
			iFadeCalls["FtrHnt"]+=1;
			setTimeout("fadeIt('FtrHnt',0)",950+iExtraWait);
			
			iExtraWait=0;
		}	
		
		svLastFeature=listID;
	}
	

	function fadeInSlogan()
	{
		if (!document.getElementById("FtrDescript").innerHTML) return;
		
		// load the description item with matching ID of feature link
		document.getElementById("GtCard").style.color="rgb(255,255,255)";
		document.getElementById("BookRqst").style.color="rgb(255,255,255)";
		document.getElementById("ShareIdea").style.color="rgb(255,255,255)";
		
		setTimeout("fadeIt('GtCard',1)",500);
		setTimeout("fadeIt('BookRqst',1)",1200);
		setTimeout("fadeIt('ShareIdea',1)",1900);
	}
	
	function deLinkMe() 
	{
		for (i=0; i<document.links.length; i++) 
		{	
			if(document.links[i].href == document.URL || (document.links[i].href.indexOf("index")!=-1 && document.links[i].href.indexOf("?")==-1 && document.URL.indexOf(".php") == -1))
			{
				document.links[i].href="javascript:void(0)";
				document.links[i].style.color='black';
				document.links[i].style.fontWeight='bold';
				document.links[i].style.textDecoration='none';
			}
		}
		
	}
	
	/***********************************************
	* Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
	* This notice must stay intact for use
	* Visit http://www.dynamicdrive.com/ for full source code
	***********************************************/
	function handleEnter (field, event) {
			var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
			if (keyCode == 13) {
				var i;
				for (i = 0; i < field.form.elements.length; i++)
					if (field == field.form.elements[i])
						break;
				i = (i + 1) % field.form.elements.length;
				field.form.elements[i].focus();
				return false;
			} 
			else
			return true;
	} 
	
	function initMenu(feature)
	{
		deLinkMe();
		svFeature=feature;
		
		if (document.getElementById("FtrDescript").innerHTML) {
			
			if (svFeature=="index")
			{
				fadeInSlogan();
				//iExtraWait=2500;
				//tgTxt(svFeature,1);
			}
			else
				document.getElementById("FtrHnt").innerHTML="";
		}
	}
//--- End of auto-copied script code ---
