var bisOpera= ((navigator.userAgent.indexOf("Opera")>=0));
var bisIE = ((navigator.userAgent.indexOf("MSIE")>=0)&&(navigator.appVersion.substring(0,1)>=4) && (!bisOpera));
var lodID;
var currFoto;

function showFoto() {
	var n = currFoto;
	if (bisIE)
	{

    	var phc=document.getElementById("photocontainer");
		phc.filters.blendTrans.Apply();
		phc.style.backgroundImage =  "url('pix/"+n+".jpg')";
		phc.filters.blendTrans.Play();
	}
}

function poppic(n) {
	
	if (bisIE)
	{
			var phc=document.getElementById("photocontainer");
			var snim = document.getElementById("snimkata");
			currFoto = n;
			snim.src="pix/"+n+".jpg";
			phc.style.display="block";
			document.getElementById("maintable").style.display="none";
			
			//phc.style.backgroundImage = "url('pix/"+n+".jpg')";
			//lodID = setInterval("showFoto()","100");
			
//			phc.filters.blendTrans.Play();
	}	else {
		if (!bisOpera)
		{
			var phc=document.getElementById("photocontainer");
			phc.style.display="block";
			document.getElementById("maintable").style.visibility="hidden";
			phc.style.backgroundImage = "url('pix/"+n+".jpg')";
		} else {
			window.open("pix/"+n+".jpg","_blank"); //"pic","top=100,left=200,height=500,width=670,status=no,toolbar=no,menubar=no,location=no");
		}
	}
}

function unpopPic() {
	if (bisIE)
	{
		clearInterval(lodID);
		document.getElementById("photocontainer").style.display="none";
		document.getElementById("maintable").style.display="block";
		document.getElementById("photocontainer").style.backgroundImage = "url('images/loading.gif')";
	} else {
		document.getElementById("photocontainer").style.display="none";
		document.getElementById("maintable").style.visibility="visible";
		document.getElementById("photocontainer").style.backgroundImage = "url('images/loading.gif')";
	}

}

function poppic2(url) {
	window.open(url,"_blank");//window.open("pix/"+n+".jpg","pic","top=100,left=200,height=500,width=670,status=no,toolbar=no,menubar=no,location=no");
}