//---------------------------------------------------------------------------

startList = function()
{
   if (document.all && document.getElementById)
   {
      var navRoot = document.getElementById("nav");

      if (navRoot)
      {
         for (var i = 0; i < navRoot.childNodes.length; i++)
         {
            var node = navRoot.childNodes[i];

            if (node)
            {
               if (node.nodeName == "LI")
               {
                  node.onmouseover = function()
                  {
                     this.className += " over";
                  }
      
                  node.onmouseout = function()
                  {
                     this.className = this.className.replace(" over", "");
                  }
               }

               //this section is only needed if the menu is more than one level deep
      
               if (node.getElementsByTagName("UL"))
               {
                  var navRoot2 = node.getElementsByTagName("UL")[0];

                  if (navRoot2)
                  {
                     for (var j = 0; j < navRoot2.childNodes.length; j++)
                     {
                        var node2 = navRoot2.childNodes[j];

                        if (node2)
                        {
                           if (node2.nodeName == "LI")
                           {
                              node2.onmouseover = function()
                              {
                                 this.className += " over";
                              }
            
                              node2.onmouseout = function()
                              {
                                 this.className = this.className.replace(" over", "");
                              }
                           }
                           
                           //this section is only needed if the menu is more than two levels deep
            
                           if (node2.getElementsByTagName("UL"))
                           {
                              var navRoot3 = node2.getElementsByTagName("UL")[0];

                              if (navRoot3)
                              {      
                                 for (var k = 0; k < navRoot3.childNodes.length; k++)
                                 {
                                    var node3 = navRoot3.childNodes[k];

                                    if (node3)
                                    {      
                                       if (node3.nodeName == "LI")
                                       {
                                          node3.onmouseover = function()
                                          {
                                             this.className += " over";
                                          }
                        
                                          node3.onmouseout = function()
                                          {
                                             this.className = this.className.replace(" over", "");
                                          }
                                       }
                                    }  // node3
                                 }
                              }  // navRoot2
                           }
                        }  // node2
                     }
                  }  // navRoot2
               }
            }  // node
         }
      }  // navRoot
   }
}

//---------------------------------------------------------------------------


 function editmarket(mid)
    {
        document.location.href="editmarket.php?m_id=" + mid
    }
    function editp(pid, mpid)
    {
        document.location.href="edit_pro.php?p_id=" + pid + "&mp_id=" + mpid
    }
	function iOver(obj)
	 { 
	 
 		obj.border="3"
	}

	function iOut(obj) 
	{
 		obj.border="0"
	}
	function tOver(obj,c)
	{ 
	 
 		obj.style.backgroundColor=c
		obj.style.color='red'
	}

	function tOut(obj,c) 
	{
 		obj.style.backgroundColor=c
				obj.style.color='#4c4c4c';
	}
	function bOver(obj)
	{ 
	 
 		obj.style.backgroundColor="#ff7700"
	}

	function bOut(obj) 
	{
 		obj.style.backgroundColor="#f3b044"
	}
	function rbOver(obj)
	{ 
	 
 		obj.style.backgroundColor="#f22222"
	}
	function rbOut(obj) 
	{
 		obj.style.backgroundColor="#f66666"
	}
	function preOver(obj,p)
	{
		obj.style.backgroundColor="#ff7700"
		obj.style.color="#fff6e7"
		
		
		im = document.getElementById('mprev') 
		pix = 'markets_pix/' + p
		im.setAttribute('src', pix);
    


		
	}
	function preOut(obj)
	{
		obj.style.backgroundColor="#fff6e7"
		obj.style.color="#ff7700"
		
		im = document.getElementById('mprev') 
		pix = '../markets_us_php/images/general/blank.jpg'
		im.setAttribute('src', pix);
	}
	function submarket(id)
    {
        document.location.href="../markets_us_sub.php?m_id=" + id
    }
