/*
** White Phone Popup manager
*/

var CPopupManager =
{
	getLinkElements: function()
	{		
		return this.oRoot.getElementsByTagName("A");
	},
	
	initialize: function( szRootID )
	{
		this.szRootID = szRootID;		
		this.oRoot = document.getElementById(szRootID);
		
		// Add onclicks to the links
		aLinks = this.getLinkElements();
		
		for (i=0; i < aLinks.length; i++)
		{			
			aLinks[i].onclick=function() { CPopupManager.toggle(); }
		}
	},
	
	toggle: function()
	{
		this.oRoot.style.display = (this.oRoot.style.display != "block") ? "block" : "none";
	}
}
