// Change Status Bar text

function hidestatus(){
window.status=''
return true
}

if (document.layers)
window.document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

window.document.onmouseover=hidestatus;
window.document.onmouseout=hidestatus;

// End

function applyHomeBG(){
	
	document.body.style.background="url(images/bg-body-theme1.jpg) no-repeat center top";
	document.getElementById('wrapper').style.backgroundColor='transparent';
	document.getElementById("rightBar").style.display = "block";
	if(document.getElementById("aroundTheGlobe") != null){
		document.getElementById("aroundTheGlobe").style.display = "block";
	}
	//alert(document.getElementById("rightBar").style.visibility)
}

function applyHomeBGTest(){
	
	document.body.style.background="url(images/bg-body-theme2.jpg) no-repeat center top";
	document.getElementById('wrapper').style.backgroundColor='transparent';
	document.getElementById("rightBar").style.display = "block";
	if(document.getElementById("aroundTheGlobe") != null){
		document.getElementById("aroundTheGlobe").style.display = "block";
	}
	//alert(document.getElementById("rightBar").style.visibility)
}

/*function applyHomeBGTest1(){
	
	document.body.style.background="url(images/bg-body-backg2.png) no-repeat center top";
	document.getElementById('wrapper').style.backgroundColor='transparent';
	document.getElementById("rightBar").style.display = "block";
	if(document.getElementById("aroundTheGlobe") != null){
		document.getElementById("aroundTheGlobe").style.display = "block";
	}
	//alert(document.getElementById("rightBar").style.visibility)
}

function applyHomeBGTest2(){
	
	document.body.style.background="url(images/bg-body-backg3.png) no-repeat center top";
	document.getElementById('wrapper').style.backgroundColor='transparent';
	document.getElementById("rightBar").style.display = "block";
	if(document.getElementById("aroundTheGlobe") != null){
		document.getElementById("aroundTheGlobe").style.display = "block";
	}
	//alert(document.getElementById("rightBar").style.visibility)
}

function applyHomeBGTest3(){
	
	document.body.style.background="url(images/bg-body-backg4.png) no-repeat center top";
	document.getElementById('wrapper').style.backgroundColor='transparent';
	document.getElementById("rightBar").style.display = "block";
	if(document.getElementById("aroundTheGlobe") != null){
		document.getElementById("aroundTheGlobe").style.display = "block";
	}
	//alert(document.getElementById("rightBar").style.visibility)
}

function applyHomeBGTest4(){
	
	document.body.style.background="url(images/bg-body-backg5.png) no-repeat center top";
	document.getElementById('wrapper').style.backgroundColor='transparent';
	document.getElementById("rightBar").style.display = "block";
	if(document.getElementById("aroundTheGlobe") != null){
		document.getElementById("aroundTheGlobe").style.display = "block";
	}
	//alert(document.getElementById("rightBar").style.visibility)
}

function applyHomeBGTest5(){
	
	document.body.style.background="url(images/background1.jpg) no-repeat center top";
	document.getElementById('wrapper').style.backgroundColor='transparent';
	document.getElementById("rightBar").style.display = "block";
	if(document.getElementById("aroundTheGlobe") != null){
		document.getElementById("aroundTheGlobe").style.display = "block";
	}
	//alert(document.getElementById("rightBar").style.visibility)
}
*/
function showGlobalSportsTab(targetTab){
	document.getElementById("aroundTheGlobe").style.display="none";
	document.getElementById("allSports").style.display="none";
	document.getElementById("newsFlash").style.display="none";
	document.getElementById("linkAroundTheGlobe").className="current2";
	document.getElementById("linkAllSports").className="current2";
	document.getElementById("linkNewsFlash").className="current2";
	switch(targetTab){
		case 'aroundTheGlobe':
			document.getElementById("aroundTheGlobe").style.display="block";
			document.getElementById("linkAroundTheGlobe").className="current";
			so.write("aroundTheGlobe");
		break;
		case 'allSports':
			document.getElementById("allSports").style.display="block";
			document.getElementById("linkAllSports").className="current";
		break;
		case 'newsFlash':
			document.getElementById("newsFlash").style.display="block";
			document.getElementById("linkNewsFlash").className="current";
		break;
	}
}

function showJumpTo(){
	if(window.document.getElementById("jumpToMenu").style.display=='block'){
		window.document.getElementById("jumpToMenu").style.display='none'
	}
	else{
		window.document.getElementById("jumpToMenu").style.display='block'
	}
}

function showRssFeeds(){
	if(window.document.getElementById("titleList").style.display=='block'){
		window.document.getElementById("titleList").style.display='none';
		window.document.getElementById("rssFeeds").style.display='block';
	}
	else{
		window.document.getElementById("titleList").style.display='block';
		window.document.getElementById("rssFeeds").style.display='none';
	}
}

function showRssTitles(continent,country,sport){
	//alert(continent+"---"+country+"---"+sport);
	if(window.document.getElementById("titleResults").style.display!='block'){
		window.document.getElementById("titleResults").style.display='block';
	}
}

function updateGlobalTagline(continentName, cntCountries, cntSports){
	//alert(continentName+"---"+ cntCountries+"---"+cntSports);
	//window.document.getElementById("globalSportsValues").innerHTML= continentName + ' . ' + cntCountries + ' Countries . ' + cntSports + ' Sports . ' + 'Millions of Fans...';
	if(!isNaN(cntCountries))
	{
		window.document.getElementById("globalSportsValues").innerHTML= continentName + ' . ' + cntCountries + ' Countries. ' + cntSports + ' Sports . ' + 'Millions of Fans...';
	}
	else
	{
	window.document.getElementById("globalSportsValues").innerHTML= continentName + ' . ' + cntCountries + ' . ' + cntSports + ' Sports . ' + 'Millions of Fans...';
	}
}

function showHideFilters(){
	if(document.getElementById("filters").style.display == 'block'){
		document.getElementById("filters").style.display = 'none';
		document.getElementById("filterLink").className = 'filterHeadClose';
	}
	else{
		document.getElementById("filters").style.display = 'block';
		document.getElementById("filterLink").className = 'filterHeadOpen';
	}
}

function showHideDropDown(){
	if(document.getElementById("dropDownMenu").style.display == 'block'){
		document.getElementById("dropDownMenu").style.display = 'none';
	}
	else{
		document.getElementById("dropDownMenu").style.display = 'block';
	}
}

function showHideDIV(_divName){
	if(document.getElementById(_divName).style.display == 'block'){
		document.getElementById(_divName).style.display = 'none';
	}
	else{
		document.getElementById(_divName).style.display = 'block';
	}
}
//------------Drop Down Menu Start-------------
var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();
	// close old layer
	if(ddmenuitem) ddmenuitem.style.display = 'none';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.display = 'block';
	

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.display = 'none';
}

// 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; 
//------------Drop Down Menu End---------------




