var menu;
// Tazi stoinost "theTop" e kolko da e otstupa ot nachaloto na stranicata ... demek hedura
// ako slojish "0" shte pochne da se dviji vednaga sus stranicata ...
var theTop = 130;

function init()
{
	menu = new getObj('MenuLyer');
	movemenu();
}

function movemenu()
{
	if (window.innerHeight)	{pos = window.pageYOffset}
	else if (document.documentElement && document.documentElement.scrollTop)
	{pos = document.documentElement.scrollTop}
	else if (document.body)
	{pos = document.body.scrollTop}
	if (pos > theTop)
	{menu.style.top = pos-theTop;
	}else
	{menu.style.top = 0;}
	temp = setTimeout('movemenu()',1);
}
function getObj(name)
{ if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}
