function photo_view(folder,file,width,height)
{
	var doctype = "HTML";
	
	if(doctype=="XHTML")
	{
		scrollLeft=Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
		scrollTop=Math.max(document.documentElement.scrollTop, document.body.scrollTop);
		X = (document.documentElement.clientWidth - width - 26)/2 + scrollLeft;
		Y = (document.documentElement.clientHeight - height - 30)/2 + scrollTop;
		X_window = document.documentElement.clientWidth + scrollLeft;
		Y_window = document.body.clientHeight;
	}
	
	if(doctype=="HTML")
	{
		X = (document.body.clientWidth - width - 26)/2 + document.body.scrollLeft;
		Y = (document.body.clientHeight - height - 30)/2 + document.body.scrollTop;
		X_window = document.body.clientWidth + document.body.scrollLeft;
		Y_window = document.body.scrollHeight;
	}
	
	if(file.length>0){document.getElementById("bigphoto_img").src="/base_images/"+folder+"/"+file;}
	document.getElementById("bigphoto_img").width = width;
	document.getElementById("bigphoto_img").height = height;
	
	document.getElementById("bigphoto").style.left = X+"px";
	document.getElementById("bigphoto").style.top = Y+"px";
	document.getElementById("bigphoto").style.display="block";
	
	document.getElementById("page_bigdiv").style.width = X_window+"px";
	document.getElementById("page_bigdiv").style.height = Y_window+"px";
	document.getElementById("page_bigdiv").style.display="block";
	
	ViewTimeout = setTimeout("photo_view('','','"+width+"','"+height+"');",500);
}

function photo_close()
{
	document.getElementById("bigphoto_img").src="/img/0.gif";
	setTimeout("photo_hidden();",100);
}

function photo_hidden()
{
	document.getElementById("bigphoto").style.display="none";
	document.getElementById("page_bigdiv").style.display="none";
	clearTimeout(ViewTimeout);
}
