// JavaScript Document
function set_border(current)
{
	for(i=1; i<got; i++)
	{
		objs[i].style.border = '0px solid red';
	}
	current_img = document.getElementById("i_"+current);
	current_img.style.border = '3px solid orange';
}
//global var next_btn and prev_btn are initialized in gallery.php after the button is rendered
function pics(loa, comments, pic_id)
{
	set_border(pic_id);

	richo.src = "http://www.lestoree.com/cacny/gals/"+loa;
	download.onclick = function (){window.open("http://lestoree.com/cacny/gals/hr/"+loa); return false;};
	document.getElementById("coms").innerHTML = '&nbsp;&nbsp;'+comments;
	n = parseInt(pic_id)+1;
	p = parseInt(pic_id)-1;
	if(next = document.getElementById(n))
	{
		next_btn.style.display = 'inline';
		next_btn.onclick = next.onclick;
	}else{ next_btn.style.display = 'none';}
	if(prev = document.getElementById(p))
	{
		prev_btn.style.display = 'inline';
		prev_btn.onclick = prev.onclick;
	}else{ prev_btn.style.display = 'none';}
	return false;
}
function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+350))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else if (ns4&&crossobj.top>=(contentheight*(-1)+450))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}

function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",20)

}