var tt = new Array();

function CreateTooltip(contextid,header,text)
{

	tt[contextid] = new YAHOO.widget.Panel('panel'+contextid, { width:"320px", visible:false ,modal:true,fixedcenter : true, constraintoviewport:true } );
	tt[contextid].setHeader(header);
	tt[contextid].setBody(text);
	tt[contextid].render(document.body);
	
	
	tt[contextid].showTooltip = function()
	{
		if(this.cfg.getProperty("visible") == false)
		{
			for(i in tt)
			{
				if(tt[i].cfg.getProperty("visible")==true)
				{
					tt[i].cfg.setProperty("visible",false)
				}
			}
			this.cfg.setProperty("visible",true)
		}
		else
		{
			this.cfg.setProperty("visible",false)
		}
	}
	
	
	YAHOO.util.Event.addListener(contextid, "click", tt[contextid].showTooltip, tt[contextid], true);
}        



function CreateTooltip2(contextid,header,text)
{
	
	tt[contextid] = new YAHOO.widget.Panel('panel'+contextid, { width:"520px", visible:false,modal:true,fixedcenter : true, constraintoviewport:true } );
	tt[contextid].render(document.body);
	
	
	tt[contextid].showTooltip = function()
	{
		if(this.cfg.getProperty("visible") == false)
		{
			for(i in tt)
			{
				if(tt[i].cfg.getProperty("visible")==true)
				{
					tt[i].cfg.setProperty("visible",false)
				}
			}
			this.cfg.setProperty("visible",true)
			
			if(document.getElementById('flash')!=null)
			{
				document.getElementById('flash').style.visibility = "hidden";
			}
		}
		else
		{
			this.cfg.setProperty("visible",false)
			
		}
		
		var span = YAHOO.util.Dom.getElementsByClassName("container-close");
		if(span!=null)
		{
			YAHOO.util.Event.on(span, "click", hid, this);
		}
	}
	
	this.hid = function()
	{
		if(document.getElementById('flash')!=null)
		{
			document.getElementById('flash').style.visibility = "visible";
		}
	}
	
	YAHOO.util.Event.addListener(contextid, "click", tt[contextid].showTooltip, tt[contextid], true);
}        



function CreateTT(contextid,text)
{
	
	
	tt[contextid] = new YAHOO.widget.Tooltip("tooltip", 
	{  
		context: contextid,
		text: text, 
	    showDelay:500,
		hidedelay:200 
	} );	
	
	
	YAHOO.util.Event.addListener(contextid, "click", tt[contextid].showTooltip, tt[contextid], true);
}        
