function menu_click(href)
{
	window.location = href;
}

function show_sub_menu(ID)
{
	document.getElementById(ID).style.display = "block";
}

function hide_sub_menu(ID)
{
	document.getElementById(ID).style.display = "none";
}

function checkBrowserName(name)
{  
  var agent = navigator.userAgent.toLowerCase();  
  if (agent.indexOf(name.toLowerCase())>-1) {  
    return true;  
  }  
  return false;  
}  

var statusWidth = 0;
var status = false;

var sDivObj = document.getElementById('statusDiv');
var sHeadObj = document.getElementById('statusHeader');
var sFootObj = document.getElementById('statusFooter');

function show_status()
{
	statusWidth+=32;
	sDivObj.style.width = statusWidth+5 + "px";
	sHeadObj.style.width = statusWidth+31 + "px";
	sFootObj.style.width = statusWidth+31 + "px";	
	
	if(statusWidth < 220)
		window.setTimeout("show_status()", 1);
	
	window.scrollBy(220, 0);
	status = true;	
}

function hide_status()
{
	statusWidth-=32;
	sDivObj.style.width = statusWidth+5 + "px";
	sHeadObj.style.width = statusWidth+31 + "px";
	sFootObj.style.width = statusWidth+31 + "px";	
	
	if(statusWidth > 0)
		window.setTimeout("hide_status()", 1);
	status = false;	
}

function change_status()
{
	sDivObj = document.getElementById('statusDiv');
	sHeadObj = document.getElementById('statusHeader');
	sFootObj = document.getElementById('statusFooter');
	
	if(status)
	{
		hide_status();
		document.getElementById('statusImg').src = "res/status.png";
	}
	else if(!status)
	{
		show_status();
		document.getElementById('statusImg').src = "res/status2.png";
	}
}

function onload()
{
	if(screen.width >= 1280)
		change_status();
}
