var timeout	= 100;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen()
{	
	id = 'sub';
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose; 

document.write('<div id="afaqs-logo"><a href="http://www.afaqs.com"><img src="http://www.afaqs.com/events/images/28032008_af_logo.gif" width="250" height="86" border="0" /></a></div>');
document.write('<div id="events-menu">');
document.write('<div id="eventmenu"><ul><li><a href="http://www.afaqs.com/events/index.html">Home</a></li><li><a href="http://buzz.afaqs.com">Buzz Convention</a></li><li><a href="/events/job_fair/index.html">Job Fair</a></li><li><a href="http://afaqs.com/events/mobile_conversation/index.html">Mobile Conversations</a></li><li><a href="http://www.afaqs.com/events/future_of_news/index.html">The Future of News</a></li><li><a href="/events/brand_activation/index.html">Brand Activation Summit</a></li><li><ul id="cssdropdown"><li class="mainitems"><a href="#" onmouseover="mopen()" onmouseout="mclosetime()">Other Events</a></li></ul></li></ul>');
document.write('</div>');
document.write('</div>');
document.write('<div id="sub" style="visibility:hidden" onmouseover="mcancelclosetime()" onmouseout="mclosetime()"><ul class="sublink"><li><a href="http://www.afaqs.com/events/sportzmarketing/index.html">Sports Marketing</a></li><li><a href="/events/speed_to_market/index.html">Speed to Market</a></li><li><a href="/events/101markets/index.html">101 Markets</a></li></ul></div>');