function cleanUp(id){
	document.getElementById(id).innerHTML = '';
}
function Loading()
{
   document.getElementById('mainBody').innerHTML = "<span style='width:100%;text-align:center;'><div id='loaderAjax'><img src=images/loading.gif hspace=2 align=absbottom><b><font color='#FF0000'>Ðang t&#7843;i d&#7919; li&#7879;u....<br></div></span>";
}

function CreateObject()
{
 var http;
 if(window.ActiveXObject){
	http = new ActiveXObject("Microsoft.XMLHTTP");
 }else if(window.XMLHttpRequest){
	http = new XMLHttpRequest();
	}
  return http;
}

var xmlhttp = CreateObject();
 
if(!xmlhttp) alert('Sorry we can not creat an ActiveX on your browser');

function loadDetail(url) 
    { 
				scroll(0,0);
				xmlhttp.open("GET", url, true);
        xmlhttp.onreadystatechange = result;
				xmlhttp.send(null);
} 
function result() {
   if(xmlhttp.readyState == 1 || xmlhttp.readyState == 2)
   {
	  Loading();
   }
   else if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
		 var bodyDetail = document.getElementById("mainBody");
     bodyDetail.innerHTML = xmlhttp.responseText;
   }
}
function onclickcollspan(ID)
	{
		var rlParent = document.getElementById('Cha'+ID);
		var rlChild = document.getElementById('Con'+ID);
		var lengthTR  = document.all.tags('TR');
		for (var i=0;i<lengthTR.length;i++)
		{
			if (lengthTR(i).id!="")
			{
				if (lengthTR(i).id == "Con"+ID)
				{
					if (rlChild.style.display=="")
						rlChild.style.display="none";
					else
						rlChild.style.display="";
				}
				else
				{	
					if (lengthTR(i).id.substr(0,3)=="Con"&&lengthTR(i).id!="Con"+ID)
					{
						lengthTR(i).style.display="none";
					}						
				}				
				
	    	 }	
		 }
	}		
	

function MM_reloadPage(init) 
{  //reloads the window if Nav4 resized
  if (init==true) with (navigator)
  {
	  if ((appName=="Netscape")&&(parseInt(appVersion)==4)) 
	  {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
	}
  }
  else if(innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

sfHover = function() 
{
	var sfEls = document.getElementsByTagName("LI");
//var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) 
	{
	sfEls[i].onmouseover=function() 
	{
	this.className+=" ie_does_hover";
	}
	sfEls[i].onmouseout=function()
	{
	this.className=this.className.replace(new RegExp(" ie_does_hover\\b"), "");
	}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

        function show_menu(id)
        {
                var men="menu"+id;
                document.getElementById(men).style.display='';
                
        }
        function hiden_menu(id)
        {
                var men="menu"+id;
                document.getElementById(men).style.display='none';
        }