
 
   function InitMenu()
   {
     var bar = menuBar.children     

     for(var i=0;i < bar.length;i++) 
        {
          var menu=eval(bar[i].menu)
          menu.style.visibility = "hidden"
          bar[i].onmouseover = new Function("ShowMenu("+bar[i].id+")")
          var Items = menu.children
          for(var j=0; j<Items.length; j++)
            {
              var menuItem = eval(Items[j].id)
                
                if(menuItem.menu != null)
                   { 
                    menuItem.innerHTML += "<Span Id="+menuItem.id+"_Arrow class='Arrow'></Span>"
                    //var tmp = eval(menuItem.id+"_Arrow")
                    //tmp.style.pixelRight = menu.getBoundingClientRect().Right // - tmp.offsetWidth - 20
                    FindSubMenu(menuItem.menu)}
               
                 if(menuItem.cmd != null) 
                   {
                   menuItem.onclick = new Function("Do("+menuItem.id+")") } 
                   
              menuItem.onmouseover = new Function("highlight("+Items[j].id+")")
            
            }    
        
        }  
   }
   function FindSubMenu(subMenu)
   {
         var menu=eval(subMenu)
         var Items = menu.children
          for(var j=0; j<Items.length; j++)
            {
              menu.style.visibility = "hidden"
              var menuItem = eval(Items[j].id)
              
              
              if(menuItem.menu!= null)
                 {
                    menuItem.innerHTML += "<Span Id="+menuItem.id+"_Arrow class='Arrow'></Span>"
                    // var tmp = eval(menuItem.id+"_Arrow")
                    //tmp.style.pixelLeft = 35 //menuItem.getBoundingClientRect().right - tmp.offsetWidth - 15
                    FindSubMenu(menuItem.menu)
                 }

                 if(menuItem.cmd != null) 
                   {
                   menuItem.onclick = new Function("Do("+menuItem.id+")") } 
                  
              menuItem.onmouseover = new Function("highlight("+Items[j].id+")")
                 
            }  
   } 
   function ShowMenu(obj)
   {
     HideMenu(menuBar)
     var menu = eval(obj.menu)
     var bar = eval(obj.id)
     bar.className="barOver"
     menu.style.visibility = "visible"
     menu.style.pixelTop =  obj.getBoundingClientRect().top + obj.offsetHeight + Bdy.scrollTop
     menu.style.pixelLeft = obj.getBoundingClientRect().left + Bdy.scrollLeft
   }
   
   function highlight(obj)
   {
     var PElement = eval(obj.parentElement.id)
     if(PElement.hasChildNodes() == true)
     {  var Elements = PElement.children
       for(var i=0;i<Elements.length;i++)
       {
          TE = eval(Elements[i].id)
          TE.className = "menuItem"
       }
      } 
     obj.className="ItemMouseOver"
     window.defaultStatus = obj.title
     ShowSubMenu(obj)
   }
   
   function Do(obj)
   {
    var cmd = eval(obj).cmd	
    window.navigate(cmd)
     
   }
   
   function HideMenu(obj)
   {
          if(obj.hasChildNodes()==true)
              {  
                 var child = obj.children     
                 
                 for(var j =0;j<child.length;j++)
                  {
                     if (child[j].className=="barOver")
                     {var bar = eval(child[j].id)
                      bar.className="Bar"}
                      
                     if(child[j].menu != null)
                       {
                          var childMenu = eval(child[j].menu)
                          if(childMenu.hasChildNodes()==true) 
                               HideMenu(childMenu)
                          
                           childMenu.style.visibility = "hidden" 
                         }
                  }
              
              }
   }
  function ShowSubMenu(obj)
  {
     PMenu = eval(obj.parentElement.id)
      HideMenu(PMenu)
     if(obj.menu != null)
     {
     var menu = eval(obj.menu)
     menu.style.visibility = "visible"
     menu.style.pixelTop =  obj.getBoundingClientRect().top + Bdy.scrollTop
     menu.style.pixelLeft = obj.getBoundingClientRect().right + Bdy.scrollLeft
     if(menu.getBoundingClientRect().right > window.screen.availWidth )
       menu.style.pixelLeft = obj.getBoundingClientRect().left - menu.offsetWidth
    }
  } 





if (document.images) {
  var top_menu_used_on = new Image();
  top_menu_used_on.src = "Menu/menu_used_equipment.jpg";
  var top_menu_used_off = new Image();
  top_menu_used_off.src = "top_menu.jpg";

  var top_menu_close_out_on = new Image();
  top_menu_close_out_on.src = "Menu/menu_close_out_equipment.jpg";
  var top_menu_close_out_off = new Image();
  top_menu_close_out_off.src = "top_menu.jpg";

  var top_menu_service_on = new Image();
  top_menu_service_on.src = "Menu/menu_equipment_service_parts.jpg";
  var top_menu_service_off = new Image();
  top_menu_service_off.src = "top_menu.jpg"; 
 
  var menu_home_on = new Image();
  menu_home_on.src = "Menu/menu_home.jpg";
  var menu_home_off = new Image();
  menu_home_off.src = "main_menu_home.jpg";

  var store_store_on = new Image();
  store_store_on.src = "Menu/menu_store.jpg";
  var store_store_off = new Image();
  store_store_off.src = "main_menu_store.jpg";

  var contact_contact_on = new Image();
  contact_contact_on.src = "Menu/menu_contact.jpg";
  var contact_contact_off = new Image();
  contact_contact_off.src = "main_menu_contact.jpg";

  var product_highlight_details_on = new Image();
  product_highlight_details_on.src = "product_details_on.jpg";
  var product_highlight_details_off = new Image();
  product_highlight_details_off.src = "product_highlight.jpg";

  var product_highlight_movie_on = new Image();
  product_highlight_movie_on.src = "product_highlight_on.jpg";
  var product_highlight_movie_off = new Image();
  product_highlight_movie_off.src = "product_highlight.jpg";

  var online_store_store_ad_on = new Image();
  online_store_store_ad_on.src = "online_store_ad_on.jpg";
  var online_store_store_ad_off = new Image();
  online_store_store_ad_off.src = "online_store_ad.jpg";

  var email_email_on = new Image();
  email_email_on.src = "contact_on.jpg";
  var email_email_off = new Image();
  email_email_off.src = "contact.jpg"; 
 
  var bicycles_bicycles_on = new Image();
  bicycles_bicycles_on.src = "Menu/menu_bicycles.jpg";
  var bicycles_bicycles_off = new Image();
  bicycles_bicycles_off.src = "main_menu_bicycles.jpg";                                                                                              
}


function act_used(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_used_on.src");
}

function inact_used(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_used_off.src");
}

function act_close_out(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_close_out_on.src");
}

function inact_close_out(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_close_out_off.src");
}

function act_service(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_service_on.src");
}

function inact_service(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_service_off.src");
}

function act_home(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_home_on.src");
}

function inact_home(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_home_off.src");
}

function act_store(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_store_on.src");
}

function inact_store(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_store_off.src");
}

function act_contact(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_contact_on.src");
}

function inact_contact(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_contact_off.src");
}

function act_details(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_details_on.src");
}

function inact_details(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_details_off.src");
}

function act_movie(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_movie_on.src");
}

function inact_movie(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_movie_off.src");
}

function act_store_ad(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_store_ad_on.src");
}

function inact_store_ad(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_store_ad_off.src");
}

function act_email(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_email_on.src");
}

function inact_email(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_email_off.src");
}

function act_bicycles(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_bicycles_on.src");
}

function inact_bicycles(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "_bicycles_off.src");
}

function movie(){
	for (var i=0; i<1; i++){
	window.open("product_highlight.html", "popup", "scrollbars=no, directories=no, resizable=no, menubar=0, location=0, status=no, toolbar=0, width=340, height=350");
	}
}


 ///////////////////CascadedDropdown Menu/////////////////
 //Date : 08/09/2001               						//
 //Version : 1.0        								//
 //Author Mr.Arun N Kumar	                            //
 //EMail: n_arunk@hotmail.com							//		
 /////////////////////////////////////////////////////////
 // Modifications on this code is not recomended
 // Suggestions are welcome
