	var cacheImg= new Array();
	var	slideNum;
	var	slideMax;
	var	slideName;
	var	slideTime=5000;
	
	cacheMenuImage();

	function cacheMenuImage()
	{
		for(i=1;i<7;i++)
		{
			cacheImg[i] = new Array(2);
			cacheImg[i][0]= new Image();
			cacheImg[i][0].src="images/img0"+i+"-0.gif";
			cacheImg[i][1]= new Image();
			cacheImg[i][1].src="images/img0"+i+"-1.gif";
		}
	}
	
	function openPage(pWhere)
	{
		location.href=pWhere;
	}

	function openWindow(pWhere,pName,pWidth,pHeight)
	{
  var aLeft,aTop
		if(pWidth==0){pWidth=770;}
		if(pHeight==0){pHeight=560;}
   aLeft=screen.width-pWidth-19;
   aTop=screen.height-pHeight;
   aLeft=(aLeft/2);
   aTop=(aTop/2);
	 window.open(pWhere,pName,'Left='+aLeft+',Top='+aTop+',Height='+pHeight+'px,Width='+pWidth+'px,Status=1,toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0');
	}


	function chClass(pHow)
	{
		var aT=window.event.srcElement;
		aT.className=pHow;
	}
	function menuOn(pMenu,pHow)
	{
		var aBtn=document.getElementById("menu"+pMenu);
		var aImg=document.getElementById("menuImg"+pMenu);
		if(pHow==1){
			aBtn.className="divMenuBtnTopOn";
			aImg.src=cacheImg[pMenu][1].src;
		}
		if(pHow==0){
			aBtn.className="divMenuBtnTop";
			aImg.src=cacheImg[pMenu][0].src;
		}
	}
	
	function slideShow(pWhat,pMax,pStart)
	{
		slideMax=pMax;
		slideName=pWhat;
		slideNum=pStart;
		setTimeout("slideLoad()",slideTime);
	}
	
	function slideLoad()
	{
		slideNum++;
		if(slideNum>slideMax){slideNum=1;}
		var pNum=slideNum;
		if(slideNum<10){pNum="0"+pNum;}
		var comm="images/foto/"+slideName+pNum+".jpg";
		var slidePic1=document.getElementById('slideImage1');
		var slidePic2=document.getElementById('slideImage2');
		slidePic2.src=slidePic1.src;
		slidePic1.src=comm;
		setTimeout("slideLoad()",slideTime);
	}
	
	function myFormSubmit()
	{
		openWindow("","formSubmit",600,500);
		var aObj=document.getElementById("formOceneni");
		aObj.target="formSubmit";
		return true;
	}

