var menu_status = true;
function show_tab(arr_tab,arr_div)
{
	document.getElementById(arr_tab[0]).className="selected";
	document.getElementById(arr_div[0]).style.display="block";
	for(var i=1;i < arr_tab.length;i++)
	{
		document.getElementById(arr_tab[i]).className="unselected";
		document.getElementById(arr_div[i]).style.display="none";
	}
}
function show_link_tab(arr_tab,arr_div,arr_link)
{
	document.getElementById(arr_tab[0]).className="selected";
	document.getElementById(arr_div[0]).style.display="block";
	document.getElementById(arr_link[0]).style.display="block";
	for(var i=1;i < arr_tab.length;i++)
	{
		document.getElementById(arr_tab[i]).className="unselected";
		document.getElementById(arr_div[i]).style.display="none";
		document.getElementById(arr_link[i]).style.display="none";
	}
}

function showDetail(url,width,height){      
	$.dialog(url+"&date="+new Date().toLocaleString(),"MODAL",{arguments:[window],height:height,width:width});
}

function openDetail(detailUrl)
{
	window.open(detailUrl);
}

function show_menu(menuType,menus)
{
	clear_menu(menus);
	document.all('menu_'+menuType).style.display = 'block';
}
function clear_menu(menus)
{
	$('#'+menus).find('div').each(function(){
		this.style.display = 'none';
	});
}
function close_menu(menuType)
{
	setTimeout(function(){if(menu_status==false) document.all('menu_'+menuType).style.display = 'none';},3000);
}

