var UI_TOP_MENU=0;
var UI_bubble=false;
var UI_showmainnav=false;
var UI_alwaysshow=false;

function Bubble( mode )
{
	if(mode==1)
	{
		$("#topnavbubble").show();
		UI_bubble=true;
	}
	else
	{
		$("#topnavbubble").hide();
		UI_bubble=false;
	}
//		$("#"+xdiv).slideDown('slow', function(){});
}

function showDiv(divname1)
{
	document.getElementById(divname1).style.display="block";
	UI_bubble=true;
}

var topmenu_timer=0;
function popMainNav( mode )
{
	if(UI_alwaysshow) return 0;
	
	if( mode == 0 )
	{	
		$("#mainTitle").hide();
		$("#mainTab").show();
		clearTimeout(topmenu_timer);
		UI_showmainnav=true;
	}
	else
	{
		topmenu_timer=setTimeout("doHideMain()",1000); 	
		UI_showmainnav=false;
	}
}

function doHideMain()
{
		if(UI_bubble) 
		{
			topmenu_timer=setTimeout("doHideMain()",1000); 
		}
		else
		{
			$("#mainTab").hide();
			$("#mainTitle").show();
		}
}





function callback(code)
{
	$("#FooterPopup_Plugins").fadeOut("slow",function(){}	);
	window.focus();
}

function footerpopup(n)
{
	hidePopup("frame1");
	hidePopup("frame2");
	showPopup("frame"+n);
//	$("#FooterPopup_Plugins").slideDown("slow",function(){}	);
    $('#FooterPopup_Plugins').fadeIn('slow', function() { });
}

function hidePopup(divname1){		var obj =document.getElementById(divname1);		obj.style.display="none";		}
function showPopup(divname1){		var obj =document.getElementById(divname1);		obj.style.display="block";	}





var deviceAndroid = "android";

//**************************
// Detects if the current device is an Android OS-based device.
function DetectAndroid()
{
   if (uagent.search(deviceAndroid) > -1)
      return true;
   else
      return false;
}


//**************************
// Detects if the current device is an Android OS-based device and
//   the browser is based on WebKit.
function DetectAndroidWebKit()
{
   if (DetectAndroid())
   {
     if (DetectWebkit())
        return true;
     else
        return false;
   }
   else
      return false;
}



onload=init
function init()
{
 	if(!UI_alwaysshow)
 	{
 		hidePopup("mainTab");
		showPopup("mainTitle");
	}
}	


