// JavaScript Document
	var timeout;
	var intervalholder;
	var arrMenu = new Array('home','huntingtonfunds','shareholders', 'prospectiveinvestors','investmentprofessionals','customerservices');
        var pageName ="";
	
	function openInter(type, idd){
		if (document.getElementById)
		if(type=='on')
			document.getElementById(idd).style.display="inline"; 
				else document.getElementById(idd).style.display="none";
	
		return false;
	}
	
	
	function hideMenus(){
		var arr_len = arrMenu.length;
		var arr_iterator = 0;
		
		for (arr_iterator; arr_iterator<arr_len; arr_iterator++){
			hideMenu(arrMenu[arr_iterator]);
		}
	}
	function startMenu(menuName){
		clearTimer();
		hideMenus();
		if (menuName != null){
			
			if(bas = document.getElementById(pageName)) {
				bas.style.display="none";
			}
			
			if(deny = document.getElementById(pageName+"_link")) {
					deny.className="navnormal";
			}
			
			if(lyr = document.getElementById(menuName)) {
				lyr.style.display="inline";
			}
			
			if(btn = document.getElementById(menuName+"_link")) {
				btn.className="navhover";
			}

		}
	}
	
	function stopMenu(menuName){
		if (checkTimer()){
			hideMenu(menuName);
		}
	}
	
	function startTimer(menuName){
		timeout = 0;
		mName = menuName;
		intervalholder = setInterval('stopMenu(mName)',300);
	}
	
	function clearTimer(){
		intervalholder = clearInterval(intervalholder);
		timeout = 0;
	}
	
	function checkTimer(){
		if (timeout >= 10){
			intervalholder = clearInterval(intervalholder);
			return true;
		} else {
			++timeout;
			return false;
		}
	}
	
	function hideMenu(menuName){
		
		if(lyr = document.getElementById(menuName)) {
			lyr.style.display="none";
		}
		
		if(btn = document.getElementById(menuName+"_link")) {
			btn.className="navnormal";
		}
		if(bas = document.getElementById(pageName)) {
			bas.style.display="inline";
		}

		if(deny = document.getElementById(pageName+"_link")) {
			deny.className="navhover";
		}
	}
	
// for faq's
	function showAnswer(q) {
		if(question = document.getElementById(q)) {
			if(question.style.display=="block") {
				question.style.display="none";
			} else {
				question.style.display="block";
			}
		}
	}
// end for faq's

//for login box
function logInTo(currentPage) 
{ 
  var locationIndicator = "";
  //check to see if any argument was passed in, if so, assign that argument as the locationIndicator
  if(arguments.length == 1)
  {
    locationIndicator = locationIndicator + currentPage;
  }
  window.location.href = document.AccountForm.AccountSelect.options[document.AccountForm.AccountSelect.selectedIndex].value + locationIndicator; 
} 
//end login box
//for how can we help box
function firstGoTo(currentPage) 
{ 
  var locationIndicator = "";
  //check to see if any argument was passed in, if so, assign that argument as the locationIndicator
  if(arguments.length == 1)
  {
    locationIndicator=locationIndicator + currentPage;
  }
  window.location.href = document.FirstGoForm.FirstGoSelect.options[document.FirstGoForm.FirstGoSelect.selectedIndex].value + locationIndicator; 
} 

function secondGoTo(currentPage) 
{ 
  var locationIndicator = "";
  //check to see if any argument was passed in, if so, assign that argument as the locationIndicator
  if(arguments.length == 1)
  {
    locationIndicator= locationIndicator + currentPage;
  }

  window.location.href = document.SecondGoForm.SecondGoSelect.options[document.SecondGoForm.SecondGoSelect.selectedIndex].value + locationIndicator; 
} 
//end how can we help box
//locator_small_include
function unselectOthers(obj){
	if (obj != document.locateUs.ClientPOI1){
	  document.locateUs.ClientPOI1.checked = false;
	}
	if (obj != document.locateUs.ClientPOI2){
	  document.locateUs.ClientPOI2.checked = false;
	}
	if (obj != document.locateUs.ClientPOI3){
	  document.locateUs.ClientPOI3.checked = false;
	}
	if (obj != document.locateUs.ClientPOI4){
	  document.locateUs.ClientPOI4.checked = false;
	}
}
//end locator

//Originally created for whichTab, this function returns the string of 
//text that is between the 3rd and 4th "/" character in the URL string, 
//which is the top level directory. For example:
//    http://www.huntington.com/home/pas/HNB1000.htm will return pas.
    function getSubString(locationString)
    {
      var splitLocation = locationString.split("/");
      return splitLocation[3];
  }

//Originally created for onlinebanking_include Log In To drop down box.
//This function gets the browser URL and removes everything before, and
//including the domain name. For example: 
//    http://www.huntington.com/home/home.htm becomes home/home.htm
//
    function getLocationFromDocRoot(locationString)
    {
      var locationFromDocRoot = "";
      var splitLocation = locationString.split("/");
      for (var count = 3; count < splitLocation.length; count++)
      {
        locationFromDocRoot = locationFromDocRoot + splitLocation[count];
        //We want to put the "/" back in if it's not the last splitLocation 
        //(the "/" was taken out when it was used at the deliminter in the 
        //split function above
        if(count != splitLocation.length-1)
        {
          locationFromDocRoot = locationFromDocRoot + "/";
        }
      }

      return locationFromDocRoot;
  }

