// JavaScript Document

function toggleLayerDisplay(nr) {
	if (document.all)
		document.all[nr].style.display = (document.all[nr].style.display == 'none') ? 'block' : 'none';
	else if (document.getElementById)
		document.getElementById(nr).style.display = (document.getElementById(nr).style.display == 'none') ? 'block' : 'none';
}

function getCoord(oElement,coord)
{
	var iReturnValue = 0;
	while( oElement != null )
	{
		if (coord == 'x') iReturnValue += oElement.offsetTop; else iReturnValue += oElement.offsetLeft;
		oElement = oElement.offsetParent;
	}
	return iReturnValue;
}
function solutions_question_switch_block(id,state,source)
{
	var elem = document.getElementById(id);
	if (state) elem.style.display = '';
	else elem.style.display = 'none';
	/*var c_x = Math.round(document.body.clientWidth/2)-150;
	var c_y = getCoord(source,'y')+offsetHeight;
	elem.style.left = c_x.toString()+"px";
	elem.style.top = c_y.toString()+"px";*/
	document.getElementById(id+'_link').style.display = (state?'none':'');
	return false;
}
