var m_ID;
function resetTimeout ()
{
	try{
		window.clearTimeout(m_ID);
	} catch (ex) {}
}
		
function startTimeout (timeOut)
{
	m_ID = window.setTimeout("cd.style.visibility='hidden';", timeOut);
}
		
function showAd (titleText, adText, URL, clickTag,title,element)
{
	// create DIV
	document.getElementById("cd").style.left  = 50;
	document.getElementById("cd").style.top   = 100;
	document.getElementById("cd").style.width = 150;
	document.getElementById("cd").style.visibility = '';
	document.getElementById("cd").innerHTML = "<table style='color:black;cursor:pointer;cursor:hand;font-family:verdana;font-size:8pt;' onMouseOut=startTimeout(150); "
						+ "onMouseOver=resetTimeout(); onClick=window.location = '"+clickTag+"'; cellpadding='0' cellspacing='3'><tr><td align='left' style='color:gray;font-size:7pt'>" 
						+ title + "</td></tr><tr><td><nobr><b style='color:darkBlue;'>"+titleText+"</b></nobr></td></tr><tr><td>"
						+ adText + "</td></tr><tr><td style='color:darkBlue;'>"+ URL +"</td></tr></table>";
	var oBo = cBB (document.getElementById(element));
	var oBp = cBB (document.getElementById("cd"));
	document.getElementById("cd").style.left = oBo.r+5;
	document.getElementById("cd").style.top = oBo.t-10-(oBp.b-oBp.t);
}
function bx(x,y,w,h)
{
	this.l=x;
	this.r=x+w;
	this.t=y;
	this.b=y+h;
}
function cBB(o)
{
	var b=new bx(0,-10,0,0);
	if(!o) return b;
	var x=0,y=0,p=o;
	while(p)
		{
		x+=p.offsetLeft;
		y+=p.offsetTop;
		p=p.offsetParent;
		}
	b.l=x;
	b.t=y;
	b.r=x+o.offsetWidth;
	b.b=y+o.offsetHeight;
	return b;
}