function select(oImg){
	currentImg.parentNode.bgColor="";
	currentImg=oImg;
	currentImg.parentNode.bgColor=selectedColor;
	currImgIdx = parseInt(oImg.attributes['tabidx'].value);
	document.getElementById('counter').innerHTML = currImgIdx;
}

function showbig(oImg){
	document.images['imgbig'].src = oImg.attributes['srcbig'].value;
	document.getElementById('bigphoto').className = "bigvis";
	document.getElementById('inbigphoto').className = "inbigvis";
}

function closebig(){
	document.getElementById('bigphoto').className = "big";
	document.getElementById('inbigphoto').className = "inbig";
	document.images['imgbig'].src = "images/fon.gif";
}

function skip(dir){
	if(currImgIdx+dir>imgcount ||currImgIdx+dir<=0) return;
	document.images['imgbig'].src = "images/fon.gif";
	select(document.images['img_'+(currImgIdx+dir)]);
	showbig(currentImg);
}

function setOpasity(obj, value) {
	obj.style.filter="alpha(opacity:" + value*100 + ")";
	obj.KHTMLOpacity=value;
	obj.style.MozOpacity=value;
	obj.style.opacity=value;
}
