
	function ToggleMenuOver(MenID)
	{
		var theItem=document.getElementById(MenID);
		theItem.style.backgroundColor='#11256F';
		theItem.style.color='#FFFFFF';
	}
	
	function ToggleMenuOut(MenID)
	{
		var theItem=document.getElementById(MenID);
		theItem.style.backgroundColor='#FFFFFF';
		theItem.style.color='#666666';
	}
	
	function ToggleVisible(ElID)
	{
		var theElement=document.getElementById(ElID);
		if(theElement.style.display=='none')
		{
			theElement.style.display='block';
		}
		else
		{
			theElement.style.display='none';
		}
	}
	
	function basename (path, suffix) 
	{
		// http://kevin.vanzonneveld.net
		// +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
		// +   improved by: Ash Searle (http://hexmen.com/blog/)
		// +   improved by: Lincoln Ramsay
		// +   improved by: djmix
		// *     example 1: basename('/www/site/home.htm', '.htm');
		// *     returns 1: 'home'
	 
		var b = path.replace(/^.*[\/\\]/g, '');
		
		if (typeof(suffix) == 'string' && b.substr(b.length-suffix.length) == suffix)
		{
			b = b.substr(0, b.length-suffix.length);
		}
		
		return b;
	}


////////////////////////////////////////////
/* BELOW ARE THE LIGHTBOX FUNCTIONS */
	function ShowLB(ID,Width)
	{
		var cw = document.body.clientWidth;
		var TheDiv=document.getElementById(ID);
		var TheDark=document.getElementById('darkness');
		TheDiv.style.width=Width; 
		TheDiv.style.display='block';
		TheDiv.style.left=(cw-Width)/2;	// should center horizontally

		TheDark.style.height=GetScreenHeight();
		TheDark.style.width=cw;
		TheDark.style.display='block';
	}
		
	
	function CloseLB(ID)
	{
		var TheDiv=document.getElementById(ID);
		var TheDark=document.getElementById('darkness');
		TheDiv.style.display='none';
		TheDark.style.display='none';	
	}
	
	function CloseLBRefresh(ID)
	{
		CloseLB(ID);
		location.reload(true);
	}
	
	function GetScreenHeight()
	{
		var pageHeight;
		if( window.innerHeight && window.scrollMaxY ) // Firefox 
		{
			pageHeight = window.innerHeight + window.scrollMaxY;
		}
		else if( document.body.scrollHeight > document.body.offsetHeight ) // all but Explorer Mac
		{
			pageHeight = document.body.scrollHeight;
		}
		else // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		{ 
			pageHeight = document.body.offsetHeight + document.body.offsetTop; 
		}
		return pageHeight;
	}
	
	
function CheckEmail(str)
{

		var at="@";
		var dot=".";
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		if (str.indexOf(at)==-1)
		{
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    return false;
		 }
		
		 if (str.indexOf(" ")!=-1){
		    return false;
		 }

 		 return true;			
}

function ShowHide(ShowID,HideID)
{
	var ShowEl=document.getElementById(ShowID);
	var HideEl=document.getElementById(HideID);
	
	ShowEl.style.display='block';
	HideEl.style.display='none';
}

