function OpenImg(id,catalog) {
	winpodr2 = window.open("one_image.php?id="+id+"&catalog="+catalog, "pop2", "Width=900px, Height=700px, center=yes, location=0, status=1, menubar=0, scrollbars=1, resizable=1, help=0, toolbar=no");
	winpodr2.focus();
}

/******************/
function closeWin() {window.close();}
function setScroll(){document.body.setExpression("scroll","checkScroll()","JScript");}
function checkScroll(){
	var o=document.body;
	document.body.scroll=(o.scrollHeight>o.clientHeight || o.scrollWidth>o.clientWidth ? "yes":"no");
}


function init()
{
	if(navigator.appName.substring(0,3)=='Mic') setScroll();
	print();
}

function print()
{
	var leftie = document.getElementById("leftie");
	var rightie = document.getElementById("rightie");
	var k_img = document.getElementById("kasseta_img");
	var k_text = document.getElementById("kasseta_text");
	
	if(curpic==0) {
		leftie.style.visibility = 'hidden';
	}

	if(curpic==picz.length-1) {
		rightie.style.visibility = 'hidden';
	}

	if(curpic > 0) {
		leftie.style.visibility = 'visible';
	}

	if(curpic < picz.length-1) {
		rightie.style.visibility = 'visible';
	}

	kasseta.src = picz[curpic];
	kasseta.alt = textz[curpic];
}

function prev()
{
	curpic--;
	if(curpic<0)  curpic=0;
	print();
}


function nextie()
{
	curpic++;
	if(curpic>picz.length-1)  curpic=picz.length-1;
	print();
}