
function leftmenu(id){
  this.id = id;
  this.click = click; 
  this.onover=onover;
  this.out=out;
  this.start = start;

}

function start(el)
	{
	   for (var i = 0, el_node; i < el.childNodes.length; i++)
      {
          el_node = el.childNodes.item(i);
          if (el_node.nodeName.toLowerCase() == 'ul') el_node.style.display='none';
         
          if (el_node.nodeName.toLowerCase() == 'a')
          {
             el_node.onmouseover = this.onover;
             el_node.onmouseout = this.out;
             el_node.onclick = this.click;
             
          }
    		  this.start(el_node);
      
      }
   }  
   
function click ()
  {
      for (var i = 0, el_node; i < this.parentNode.childNodes.length; i++)
      {
         el_node = this.parentNode.childNodes.item(i);
         if (el_node.nodeName.toLowerCase() == 'ul')
         {
              el_node.style.display = el_node.style.display == 'none' ? 'block' : 'none';
        
              return;
         }
      }
  }
  
function onover()
	{
this.style.background='url("images/selected.jpg")';
this.style.color="#000000";
this.style.height="20px";
this.style.width="140px";
//this.style.backgroundColor="#F57979";
//this.style.color="#FFFFFF";
	}
	

	
function out()
	{
	this.style.backgroundColor="transparent";
        this.style.background="none";
	this.style.color="#3366CC";
	}

