var hidden = true;

function showHideLayer(layer)
{
if (hidden)
	{
	document.getElementById(layer).style.display='block';
	hidden = false;
	}
else
	{
	document.getElementById(layer).style.display='none';
	hidden = true;
	}
}


function changeTrophyPopup(imageUrl, title, description)
{
	document.getElementById('block-image').style.backgroundImage='url('+imageUrl+')';
	document.getElementById('block-image2').style.backgroundImage='url('+imageUrl+')';
	
	document.getElementById('block-title').innerHTML = title;
		document.getElementById('block-title2').innerHTML = title;
		//document.getElementById('block-description').innerHTML = description;
}


function showdesc(descfor, layer, distancex, distancey)
{
document.getElementById(layer).style.display="block";
document.getElementById(descfor).onmousemove=
	function (e) 
	{
	 // x i y coordinates on the screen
	var Xin = (navigator.appName.indexOf("Internet Explorer")==-1)? e.clientX : event.clientX;
	var Yin = (navigator.appName.indexOf("Internet Explorer")==-1)? e.clientY : event.clientY;
	
	document.getElementById(layer).style.left=Xin+distancex+"px";
	document.getElementById(layer).style.top=Yin+distancey+"px";
	};
}

function hidedesc(descfor, layer)
{
document.getElementById(layer).style.display="none";
document.getElementById(descfor).onmousemove=null;
}

/* opens page in a new window */
function popitup(url) 
{
newwindow=window.open(url,'name','height=120,width=350');
if (window.focus) {newwindow.focus()}
	return false;
}

/* opens page in a new window */
function popitup2(url, width, height) 
{
newwindow=window.open(url,'name','height='+height+',width='+width+' scrollbars=1');
if (window.focus) {newwindow.focus()}
	return false;
}


