
if (document.images) {

    enaup       = new Image();
    enaup.src   = "images/menu/1predstavitev.gif" ;
    enadown     = new Image() ;
    enadown.src = "images/menu/1predstavitevOVER.gif" ;
	
	dvaup       = new Image();
    dvaup.src   = "images/menu/2kontakt.gif" ;
    dvadown     = new Image() ;
    dvadown.src = "images/menu/2kontaktOVER.gif" ;
	
	triup       = new Image();
    triup.src   = "images/menu/3povezave.gif" ;
    tridown     = new Image() ;
    tridown.src = "images/menu/3povezaveOVER.gif" ;
	
	stirup       = new Image();
    stirup.src   = "images/menu/4ribolovniokolis.gif" ;
    stirdown     = new Image() ;
    stirdown.src = "images/menu/4ribolovniokolisOVER.gif" ;
	
	petup       = new Image();
    petup.src   = "images/menu/5ribolovnirezim.gif" ;
    petdown     = new Image() ;
    petdown.src = "images/menu/5ribolovnirezimOVER.gif" ;
	
	sesup       = new Image();
    sesup.src   = "images/menu/6reke.gif" ;
    sesdown     = new Image() ;
    sesdown.src = "images/menu/6rekeOVER.gif" ;
	
	sdmup       = new Image();
    sdmup.src   = "images/menu/7solaribolova.gif" ;
    sdmdown     = new Image() ;
    sdmdown.src = "images/menu/7solaribolovaOVER.gif" ;
	
	osmup       = new Image();
    osmup.src   = "images/menu/8ribe.gif" ;
    osmdown     = new Image() ;
    osmdown.src = "images/menu/8ribeOVER.gif" ;
	
	dvetup       = new Image();
    dvetup.src   = "images/menu/9galerija.gif" ;
    dvetdown     = new Image() ;
    dvetdown.src = "images/menu/9galerijaOVER.gif" ;
	
	dsetup       = new Image();
    dsetup.src   = "images/menu/10knjigagostov.gif" ;
    dsetdown     = new Image() ;
    dsetdown.src = "images/menu/10knjigagostovOVER.gif" ;
	
	enajup       = new Image();
    enajup.src   = "images/menu/11prehrana.gif" ;
    enajdown     = new Image() ;
    enajdown.src = "images/menu/11prehranaOVER.gif" ;
	
	dvanajup       = new Image();
    dvanajup.src   = "images/menu/12novice.gif" ;
    dvanajdown     = new Image() ;
    dvanajdown.src = "images/menu/12noviceOVER.gif" ;
	
	trinajup       = new Image();
    trinajup.src   = "images/menu/13kamvbelikrajini.gif" ;
    trinajdown     = new Image() ;
    trinajdown.src = "images/menu/13kamvbelikrajiniOVER.gif" ;
}
function buttondown( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "down.src" );
    }
}
function buttonup ( buttonname )
{
    if (document.images) {
      document[ buttonname ].src = eval( buttonname + "up.src" );
    }
}

function slika(datoteka,xwidth,xheight,naslov)
				{
                                                var razx=xheight/screen.height;
                                                var razy=xwidth/screen.width;

						var xheight2=xheight;
						var xwidth2=xwidth;

                                                if (xheight2>(screen.height) && xwidth2>(screen.width))
						{
								if (razx>razy)
								{
								xheight=screen.height;
								xwidth=xwidth/razx;
								}

								if (razx<razy)
								{
								xheight=xheight/razy;
								xwidth=screen.width;
								}

								if (razx==razy)
								{
								xwidth=screen.width;
								xheight=screen.height;
								}

						}

						if (xheight2>(screen.height) && xwidth2<=(screen.width))
						{
								xheight=xheight/razx;
								xwidth=xwidth/razx;
						}

						if (xheight2<=(screen.height) && xwidth2>(screen.width))
						{
								xheight=xheight/razy;
								xwidth=xwidth/razy;
						}
				
						var nw3 = window.open("/slika.php?slika="+datoteka+"&naslov="+naslov+"&width="+xwidth+"&height="+xheight,"location",["width="+xwidth,"height="+xheight,"scrollbars=no"]);

						nw3.moveTo(((screen.width/2)-(xwidth/2)),((screen.height/2)-(xheight/2)))
						nw3.focus();
				}
				
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];
  }
}
				
				
var menu;
var theTop = 150;
var old = theTop;

window.onload = function () {
	menu = new getObj('menutop');
	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) pos = theTop;
	else pos += 30;
	if (pos == old)
	{
		menu.style.top = pos;
	}
	old = pos;
	temp = setTimeout('movemenu()',500);
}
