/* ******************************************************************************************************************************************************** */
/* common.js   - This file (page) stores all the common javascript elements that are used throughout the Lobbyist Registration              */
/* 		system.   This file is stored in the 'TEMPLATE - LRO Common Elements' design template.   WARNING - only edit      */
/*		this file in that template.   All the other templates inherit from this common template.   Editing the file in one of these      */
/* 		databases will only mean your changes will be overwritten the next time a design refresh is run.                                         */
/* ******************************************************************************************************************************************************** */
navHover = function() {
	var lis = document.getElementById("navmenu").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);
/* ****************************************************************************************************** */
/* The following is for the vertical menu */
/* ***************************************************************************************************** */
navHover = function() {
 var lis = document.getElementById("navmenu-v").getElementsByTagName("LI");
 for (var i=0; i<lis.length; i++) {
  lis[i].onmouseover=function() {
   this.className+=" iehover";
  }
  lis[i].onmouseout=function() {
   this.className=this.className.replace(new RegExp(" iehover\\b"), "");
  }
 }
}
// if (window.attachEvent) window.attachEvent("onload", navHover);
/*******************************************************************************/
// Used to change the visibilty of a div element.  We use this function to display a description for a menu item when the user's mouse 
// is over the item.  When the mouse is moved off the item, the description is hidden again.  
function ChangeVisibility(divId,state){
document.getElementById(divId).style.visibility = (state) ? 'hidden' : 'visible'
}
/***************************************************************************************************
Sample HTML/js code for above
<div class="text1"><a class="text1" href="#" onMouseOver="status='Whatever 1' ; return true & ChangeVisibility( 'description1', 0 )" onMouseOut="ChangeVisibility( 'description1', 1 )" >Help 1</a></DIV>
<div class="text1"><a class="text1" href="#" onMouseOver="status='Whatever 2' ; return true & ChangeVisibility( 'description2', 0 )" onMouseOut="ChangeVisibility( 'description2', 1 )" >Help 1</a></div>
<div id="description1" class="description">Description1...This form.....bla bla bla...1  </div>
<div id="description2" class="description">Description2...This form.....bla bla bla...2  </div>
So, by defining "descriptionX" we can display a 'bubble' help. Also we can define a backgound image for this help text.
*****************************************************************************************************/

