var Encircle =
{
  init: function(wCircle)
  {
  
  Encircle.div = document.getElementById("encircle");

  switch(wCircle)
  {
  case "interface":
		Encircle.div.style.position = 'absolute';
		Encircle.div.style.background = "url('../images/shared/nav_hilite_strip.gif') no-repeat";
		Encircle.div.style.backgroundPosition = '0 0';
		Encircle.div.style.height = '57px';
		Encircle.div.style.width = '147px';
		Encircle.div.style.left = '262px';
		Encircle.div.style.top = '5px';
  break;
  
  case "fotografie":
		Encircle.div.style.position = 'absolute';
		Encircle.div.style.background = "url('../images/shared/nav_hilite_strip.gif') no-repeat";
		Encircle.div.style.backgroundPosition = '0 0';
		Encircle.div.style.height = '57px';
		Encircle.div.style.width = '147px';
		Encircle.div.style.left = '367px';
		Encircle.div.style.top = '36px';
  break;
  
  case "online":
		Encircle.div.style.position = 'absolute';
		Encircle.div.style.background = "url('../images/shared/nav_hilite_strip.gif') no-repeat";
		Encircle.div.style.backgroundPosition = '0 0';
		Encircle.div.style.height = '57px';
		Encircle.div.style.width = '147px';
		Encircle.div.style.left = '457px';
		Encircle.div.style.top = '5px';
  break;
  
  case "lernsoftware":
		Encircle.div.style.position = 'absolute';
		Encircle.div.style.background = "url('../images/shared/nav_hilite_strip.gif') no-repeat";
		Encircle.div.style.backgroundPosition = '0 0';
		Encircle.div.style.height = '57px';
		Encircle.div.style.width = '147px';
		Encircle.div.style.left = '557px';
		Encircle.div.style.top = '32px';
  break;
  
  case "kontakt":
		Encircle.div.style.position = 'absolute';
		Encircle.div.style.background = "url('../images/shared/nav_hilite_strip.gif') no-repeat";
		Encircle.div.style.backgroundPosition = '0 0';
		Encircle.div.style.height = '57px';
		Encircle.div.style.width = '147px';
		Encircle.div.style.left = '667px';
		Encircle.div.style.top = '3px';
  break;
  }
   
  Encircle.frameHeight = 57;
  Encircle.frames = 7;
  Encircle.offsetY = 0;
  Encircle.maxOffset = -Encircle.frameHeight * Encircle.frames;
    
  Encircle.animate();

  },
  animate: function()
  {
	
    Encircle.offsetY -= Encircle.frameHeight;
    
	if (Encircle.offsetY >= Encircle.maxOffset)
	{	 
	  setTimeout(Encircle.animate, 90);
	}
	else
	{
	 Encircle.offsetY = Encircle.maxOffset;
	}
   
    Encircle.div.style.backgroundPosition = "0 " + Encircle.offsetY + "px";
     
    
  }
};
