//

function HideFloatPhoto()
{
	var floatPhoto = document.getElementById("divPhoto");
	floatPhoto.style.visibility = "hidden";
}

function ShowFloatPhoto(obj, evt)
{
	var floatPhoto = document.getElementById("divPhoto");
	var photo = document.getElementById("imgSho");
	floatPhoto.style.visibility = "visible";

	var x = FindPosX(obj);
	var y = FindPosY(obj);

   y = parseInt(y) + 1;
   x = parseInt(x) + 1;

	floatPhoto.style.top = y + "px";
	floatPhoto.style.left = x + "px";

	photo.src = obj.src;
	photo.onclick = obj.onclick;
	
	//Anchor
	var anc = document.getElementById("ancShow");
	anc.href = obj.parentNode;
}

function FindPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function FindPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

function BrowserWidth()
{
	var bWidth = 0, bHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) 
	{
		//Non-IE
		bWidth = window.innerWidth;
		//myHeight = window.innerHeight;
	} 
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	{
		//IE 6+ in 'standards compliant mode'
		bWidth = document.documentElement.clientWidth;
		//myHeight = document.documentElement.clientHeight;
	} 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
	{
		//IE 4 compatible
		bWidth = document.body.clientWidth;
		//myHeight = document.body.clientHeight;
	}

	return bWidth;
}