// Folders4U common behaviours
// Handles mouse over events on navigator items
// (c) 2006 Scantech Lithographic Ltd 
// Author: Mike Alexander

// folders4u common functions
document.f4uCommon = new function()
{
  // navigator mouse-over handler. Changes the background colour
  this.doNavOver = function()
  {
    this.style.background = "url(http://www.folders4u.co.uk/styles/images/nav_bgs2.gif) no-repeat right bottom";  
  };		

  // navigator mouse-out handler. Restores the background colour
  this.doNavOut = function ()
  {
    this.style.background = "url(http://www.folders4u.co.uk/styles/images/nav_bgs2.gif) no-repeat left bottom";  
  };
  // attach navigator mouse overs
  this.init = function()
  {
    obj = document.getElementById("navlist");  // get navigator list
    var txt = "";
    for (n = 0; n < obj.childNodes.length; n++)  // get child elements
    {
      li = obj.childNodes[n];  
	  if ((li.tagName == "LI") && (li.id != "sel"))  // only apply to LI tag elements
	  {	  
	    li.onmouseover=document.f4uCommon.doNavOver;  // add behaviour
	    li.onmouseout=document.f4uCommon.doNavOut;    // add behaviour    
	  }
    }	  
  };
}


// debugging: show properties of an object
function showProps(obj)
{
  var txt = "";
  for(prop in obj)
  {
    txt = txt + " | " + prop;
  }
  alert(txt);
}

//-->