var ns = navigator.appName=="Netscape";
var aniStep=18;
var angInc=Math.PI*3/2/aniStep;
var currInt=0;
var intCount=0;
var nextImage=-1;
var thBack=new Image();
thBack.src='images/pt-thback.jpg';
var showLock=0;
var gRad;
var gAng;
var fullTop=0;
var fullLeft=0;
var fullWidth=0;
var fullHeight=480;
var currImage=-1;
function showLarge(n){
	var docScTop=!ns?document.documentElement.scrollTop:window.pageYOffset;
	var docHeight = !ns?document.documentElement.clientHeight:window.innerHeight;
	var docTop = docScTop+docHeight/2-450;
	thLayer=document.getElementById('tempLayer');
	thImage=document.getElementById('tempImage');
	thImage.src=document.getElementById('thimg'+n).src;
	thImage.width=640;
	thImage.height=480;
	thLayer.style.visibility='visible';
	fFrame=document.getElementById('fullFrame');
	fFrame.style.top=(docTop)+'px';
	fFrame.style.visibility='visible';
	var nImg=n+1;
	var pImg=n-1;
	nImg=(nImg>(picList.length-1))?0:nImg;
	pImg=(pImg<0)?picList.length-1:pImg;
	var iText="<a href='javascript:showSmall()'><img src='images/pic-full/"+catName+"/"+picList[n]+"' width='640px' height='480px' border='0' onload='showFull();' alt=''/></a>";
	document.getElementById('fullImage').innerHTML=iText;
	document.getElementById('prevPic').innerHTML="<a href='javascript:showLarge("+pImg+")'><img id='thimg"+pImg+"' src='images/pic-thumb/"+catName+"/"+picList[pImg]+"' width='80px' height='60px' border='0px' alt='' /></a>";
	document.getElementById('nextPic').innerHTML="<a href='javascript:showLarge("+nImg+")'><img id='thimg"+nImg+"' src='images/pic-thumb/"+catName+"/"+picList[nImg]+"' width='80px' height='60px' border='0px' alt='' /></a>";
	document.getElementById('comment').innerHTML="<font size='2' face='Arial'>"+comList[n]+"</font>";
	document.getElementById('loading').style.visibility='visible';
}
function showFull(){
   document.getElementById('fullFrame').style.visibility='visible';
   document.getElementById('tempLayer').style.visibility='hidden';
   document.getElementById('loading').style.visibility='hidden';
   showLock=0;
}
function showSmall(){
   fFrame=document.getElementById('fullFrame');
   fFrame.style.visibility='hidden';
}
