// FAQ Single List begins... //
var popupMOM;
function showPopup(e, elemID, txtWhen, txtWhere) 
{
	if (txtWhen=='') 
		txtWhen = 'All Day';
	popupMOM = document.createElement('div');
	popupMOM.className = 'tooltip';
	//popupMOM.style.cssText = 'position: absolute; border: 2px groove #b3b3b3; left: 0px; top: 0px; padding: 2px;';
	if ( txtWhen.length > 0 )
		popupMOM.innerHTML = '<span class="when">When: </span>' + txtWhen + '<br />';
		
	if ( txtWhere.length > 0 )
		popupMOM.innerHTML += '<span class="where">Where: </span>' + txtWhere;
		
	document.body.appendChild(popupMOM);
	positionPopup(e, elemID);
}	

function positionPopup(e, elemID) 
{
	var docb = document.body;
	if (popupMOM == null) return;

	var newLeft = ((e.clientX + docb.scrollLeft) + 4);
	var newTop = ((e.clientY + docb.scrollTop) + 4);
	
	if (newLeft + popupMOM.offsetWidth > (docb.clientWidth+docb.scrollLeft)) 
	{
		var newerLeft = ((e.clientX + docb.scrollLeft) - 4) - popupMOM.offsetWidth;
		if (newerLeft > 0) newLeft = newerLeft;
	}
	
	if (newTop + popupMOM.offsetHeight > (docb.clientHeight + docb.scrollTop)) 
	{
		var newerTop = ((e.clientY + docb.scrollTop) - 4) - popupMOM.offsetHeight;
		if (newerTop > 0) newTop = newerTop;
	}
	
	var popStyle = popupMOM.style;
	popStyle.left = newLeft + 'px';
	popStyle.top = newTop + 'px';
}	

function hidePopup() 
{
	if (popupMOM == null) return;
	document.body.removeChild(popupMOM);
	popupMOM = null;
}

function ToggleElement(elementId)
{
	element = document.getElementById(elementId);
	if ( element != null )
		element.style.display = (element.style.display == "none" ? "block" : "none");
}

// ...Ends FAQ Single List //

//...Begin Custom Scripts by TOL...//
/*
var allAnchors = document.getElementsByTagName("a");
  for (var i=0; i<allAnchors.length; i++) {
  aName=allAnchors[i].getAttribute("href")
	if(aName==null||aName=='')
      //allAnchors[i].style.add("text-decoration") "none");
	  allAnchors[i].innerHtml="Bookmark:";
	  allAnchors[i].className='noLink';
    //}
  }


function fixAnchors(){
	var i,n,a,j,l;
	b=document.getElementsByTagName('A');
	for(i=0;i<b.length;++i){
		a=b[i];
		if(a.id||(a.tagName=="A"&&a.name)){
			j=document.createElement("img");
			j.src="http://www.w3.org/2003/08/anchor";
			j.style.border="none";
			j.alt="";
			if(a.id){
				n=a.id;
			}
			else{
				n=a.name;
			};
			if(a.tagName!="A"){
				l=document.createElement("a");
			}
			else{
				l=a;
			};
			l.href="#"+n;
			l.appendChild(j);
			if(a.tagName!="A"){
				a.appendChild(l);
			};
			l.style.border="1px solid black";
		}
	}
}
document.body.addeventlistener('onload', fixAnchors());
  */