var container = Array();

function initPanel(buttonid,containerid,centered)
{

	var but = document.getElementById(buttonid);
	var pos = YAHOO.util.Dom.getXY(but);
	var x = (YAHOO.util.Dom.getViewportWidth()-800)/2;
	var y = 330;
	
	container[containerid] = new YAHOO.widget.Panel(containerid,  
										{ 
										  fixedcenter:true, 
										  close:true, 
										  draggable:true, 
										  constraintoviewport:false,
										  modal:true,
										  visible:false,
										  zIndex: 8000,
										  width:"800px", 
										  effect:{effect:YAHOO.widget.ContainerEffect.FADE, duration:0.1} 
										} 
									);
	container[containerid].render(document.body);
	container[containerid].body.style.height = '500px';
	YAHOO.util.Event.addListener(but, "click", showHelp,containerid);
}



function showHelp(e,cntid)
{
	for(i in container)
	{
		if(i!=cntid)
		{
			document.getElementById(cntid).style.display='none';
			container[i].hide();
		}
	}
	document.getElementById(cntid).style.display='block';
	container[cntid].show();
}
function hideHelp(e,cntid)
{
	container[cntid].hide();
}

function initPanels()
{
	initPanel('who_btn','who',false);

}
YAHOO.util.Event.addListener(window, "load", initPanels);

