function hl(obj) {
	obj.style.color = '#000000';
}
function norm(obj) {
	obj.style.color = '#ffffff';
}
function hl2(obj) {
	obj.style.color = 'red';
}
function norm2(obj) {
	obj.style.color = '#faef92';
}

var menuID;
var timer = null;

function showMenu(level1,level2) 
{
	var obj = document.getElementById(level1);
	var num_x = getX(obj);
	var num_y = getY(obj) + 20;
	
	if (timer != null) 
	{
		clearTimeout(timer);
		hideMenu(menuID);
	}
	
	var obj = document.getElementById(level2);

	obj.style.visibility = 'visible';
	obj.style.left = num_x;
	obj.style.top = num_y;

	menuID = level2;
}

function hideMenu(level2)
{
	var obj = document.getElementById(level2);	
	obj.style.visibility = 'hidden';
}

function getX(obj)
{
	var leftOffset = 0;
	
	while (obj.offsetParent)
	{
		leftOffset += obj.offsetLeft;
		obj = obj.offsetParent;
	}
	
	return leftOffset;
}

function getY(obj)
{
	var topOffset = 0;
	
	while (obj.offsetParent)
	{
		topOffset += obj.offsetTop;
		obj = obj.offsetParent;
	}
	
	return topOffset;
}

function menuOver(obj)
{
	//obj.style.backgroundColor = '#2d220e';
	obj.style.background = '#2d220e';
	clearTimeout(timer);
}

function menuOut(obj) 
{
	//obj.style.backgroundColor = '#513621';
	obj.style.background = 'url(images/dropnavbar.jpg)';
	timer = setTimeout("hideMenu(menuID)", 100);
}

document.write('<div class="navbarsnormalspace" onMouseOver="hl2(this)" onMouseOut="norm2(this)" onClick="location.href=\'AboutUs.php\'">About 1Africa </div>');
document.write('<b><div class="navbarsnormal" onMouseOver="hl(this)" onMouseOut="norm(this)" onClick="location.href=\'index.php\'">Home</div>');
document.write('<div class="navbarsnormal" onMouseOver="hl(this)" onMouseOut="norm(this)" onClick="location.href=\'top20.php\'">TOP 20</div>');
document.write('<div class="navbarsnormal" onMouseOver="hl(this)" onMouseOut="norm(this)" onClick="location.href=\'schedules.php\'">Schedules</div>');
document.write('<div class="navbarsnormal">');
document.write('	<div id="BlogMenuTitle" onmouseover="showMenu(\'BlogMenuTitle\',\'BlogMenu\')">DJ Blogs</div>');
document.write('	<div id="BlogMenu" style="width:146px;margin-top:10px;position:absolute;border:solid 1px black;visibility:hidden;z-index:1">');
document.write('		<a href="kickstartBlog.php" style="color:white"><div class="menuitem" onmouseout="menuOut(this)" onmouseover="menuOver(this)">Brad & Terence</div></a>');
document.write('		<a href="upsideBlog.php" style="color:white" ><div class="menuitem" onmouseout="menuOut(this)" onmouseover="menuOver(this)">Xena</div></a>');
document.write('		<a href="pulseBlog.php" style="color:white" ><div class="menuitem" onmouseout="menuOut(this)" onmouseover="menuOver(this)">Tshego</div></a>');
document.write('		<a href="streettalkBlog.php" style="color:white" ><div class="menuitem" onmouseout="menuOut(this)" onmouseover="menuOver(this)">Street Talk</div></a>');
document.write('	</div>');
document.write('</div>');
document.write('<div class="navbarsnormal" onMouseOver="hl(this)" onMouseOut="norm(this)" onClick="location.href=\'gallery.php\'">Gallery</div>');
document.write('<div class="navbarsnormal" onMouseOver="hl(this)" onMouseOut="norm(this)" onClick="location.href=\'affiliate.php\'">Affiliates</div></b>');
document.write('<div class="navbarsnormallisten" onMouseOver="hl2(this)" onMouseOut="norm2(this)" onClick="location.href=\'download.php?f=1Africa.m3u\'">Listen Live</div>');