/**************************************************************************
 *                                                                        *
 *  JAVASCRIPT MENU HIGHLIGHTER v.1.0 (051123)                            *
 * --------------------------------------------                           *
 * ©2005 Media Division (www.MediaDivision.com)                           *
 *                                                                        *
 * Written by Marius Smarandoiu & Armand Niculescu                        *
 *                                                                        *
 * You are free to use, modify and distribute this file, but please keep  *
 * this header and credits                                                *
 *                                                                        *
 * Usage:                                                                 *
 * - the script will apply the .current class to the <a> and its parent   *
 *   <li> that is contained in the element with id="primarynav" and points*
 *   to the current URL                                                   *
 * - works in IE6, Firefox and Opera                                      *
 **************************************************************************/
function extractPageName(hrefString)
{
	var arr = hrefString.split('.');
	arr = arr[arr.length-2].split('/');
	return arr[arr.length-1].toLowerCase();		
}

function setActiveMenu(arr, crtPage)
{
	for(var i=0; i < arr.length; i++)
		if(extractPageName(arr[i].href) == crtPage)
		{
			arr[i].className = "current";
			arr[i].parentNode.className = "current";
		}
}

function setPage()
{
	if(document.location.href) 
		hrefString = document.location.href;
	else
		hrefString = document.location;

	if (document.getElementById("LeftNavItems")!=null) 
		setActiveMenu(document.getElementById("LeftNavItems").getElementsByTagName("a"), extractPageName(hrefString));
}


function setPage2()
{
	if(document.location.href) 
		hrefString = document.location.href;
	else
		hrefString = document.location;

	if (document.getElementById("utilsLinks")!=null) 
		setActiveMenu(document.getElementById("utilsLinks").getElementsByTagName("a"), extractPageName(hrefString));
}

function popUpLBSdis(URL) {
var answer = confirm ("You are now leaving the LBS Financial Credit Union website. We link only to websites of trusted business partners and well known, reputable businesses. Please keep in mind that LBS Financial's privacy policies do not apply to linked websites. You should consult the privacy disclosures on each third-party site for further information. Third-party websites may provide less security than the LBS Financial Credit Union website. LBS Financial does not provide, and is not responsible for, the product, service, or overall website content available on third-party sites.")
if (!answer)

return false;
else
window.location=URL;

}



function popUpLBSdisw(URL) 
{
window.open(URL,"Name","toolbar=0,scrollbars=0,resizable=no,width=410,height=290,left = 412,top = 334,menubar=no,statusbar=0,location=0");
}
