/*****************************************************************************************/
// Objects

function MenuObj() 
{  
  // Variables
  this.timer = null;  

  // Methods
  this.Delay = function()
  {  
    var self = this;               // fix loss-of-scope in inner function  
    this.timer = window.setTimeout (function(){self.Hide();}, 500);
  };

  this.Hide = function()
  {
    if (document.getElementById("MenuOfferContent"))
      document.getElementById("MenuOfferContent").style.display = "none";
    if (document.getElementById("MenuManufacturerContent"))
      document.getElementById("MenuManufacturerContent").style.display = "none";
    if(document.getElementById("MenuSearchContent"))
      document.getElementById("MenuSearchContent").style.display = "none";
    if(document.getElementById("MenuLoginContent"))
      document.getElementById("MenuLoginContent").style.display = "none";
    if(document.getElementById("MenuBasketContent"))
      document.getElementById("MenuBasketContent").style.display = "none";
    if (document.getElementById("NavBarOffer"))
      document.getElementById("NavBarOffer").style.display = "none";
    if (document.getElementById("NavBarNews"))
      document.getElementById("NavBarNews").style.display = "none";
    if (document.getElementById("NavBarContact"))
      document.getElementById("NavBarContact").style.display = "none";
    if (document.getElementById("NavBarConditions"))
      document.getElementById("NavBarConditions").style.display = "none";
  };

  this.Reset = function()
  {
	  if (this.timer)
	  {
	  	window.clearTimeout(this.timer);
		  this.timer = null;
	  }
  };

  this.Show = function(menuId) 
  {
    this.Reset();
    this.Hide();

    document.getElementById(menuId).style.display = "block";
  };
}

var Menu = new MenuObj(); 

/*****************************************************************************************/





