
function change(id, theElements)
{
  closeAll(theElements)
  
  ID = document.getElementById(id);
  
  if (ID.style.display == "")
    ID.style.display = "none";
  else
    ID.style.display = "";
  document.body.focus();
}

function closeAll(theElements)
{
  // The elements
  if (theElements)
  {
    // Close the all first
    var breakElements = theElements.split(';');
    // If we have an array ;-)
    if (breakElements.length > 0) {
      // Loop thruogh all the items of the array
      for (var i = 0; i < breakElements.length; i++) {
        // close the box
        if (document.getElementById(breakElements[i])) {
          document.getElementById(breakElements[i]).style.display = 'none';
        }
      }
    }
  }
}




/*
    Begin Drop Down Menu javascript
*/		
sfHover = function()
{
    if (document.getElementById("nav"))
    {
      	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
      	
        for (var i = 0; i < sfEls.length; i++)
        {
        		sfEls[i].onmouseover = function()
            {
        			 this.className += " sfhover";
        		}
        		
        		sfEls[i].onmouseout = function()
            {
        			 this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
        		}
      	}
  	}
    else
    {
        //alert('Can not find V menu');
    }

    if (document.getElementById("horizontal"))
    {
      	var sfElsH = document.getElementById("horizontal").getElementsByTagName("LI");
      	
        for (var i = 0; i < sfElsH.length; i++)
        {
        		sfElsH[i].onmouseover = function()
            {
        			 this.className += " sfhover";
        		}
        		
        		sfElsH[i].onmouseout = function()
            {
        			 this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
        		}
      	}
  	}
  	else
    {
        //alert('Can not find H menu');
    }
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

/*
    End Drop Down Menu javascript
*/
