// JavaScript Document
function loadXMLDoc(page,obj){//added by trung.le 04/21/2011 to using Ajax
var xmlhttp;
var obj= document.getElementById(obj);
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    obj.innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET",page,true);
xmlhttp.send();
}
function ShowClass(id){
	tmp= document.getElementById(id);
	document.getElementById(id).className = "menu_select";
}
function HideClass(id){
	tmp= document.getElementById(id);
	document.getElementById(id).className = "";
}
function Show(id){
	tmp= document.getElementById(id);
	if(tmp.style.display=="none")
		tmp.style.display="block";
}
function Hide(id){
	tmp= document.getElementById(id);
	if(tmp.style.display=="block")
		tmp.style.display="none";
}
function ShowMN(id, idcurr, n){
	for(i=1; i<=n; i++){
		tmp= document.getElementById(id+i);
		if((id+i)==idcurr){
			tmp.style.display= "block";
		}
		else{
			tmp.style.display= "none";
		}
	}
}
function HideMN(id,n){
	for(i=1; i<=n; i++){
		tmp= document.getElementById(id+i);
		tmp.style.display= "none";
		
	}
}
function ChangeClass(id, tclass){
	tmp= document.getElementById(id);
	tmp.className=tclass;
}
var tour_id="tour";
function ShowTour(id){
	var prev_obj = document.getElementById("item_" + tour_id);
	var obj = document.getElementById("item_" + id);
	if(prev_obj){
		prev_obj.style.display = "none";
	}
	document.getElementById("tab_" + tour_id).className = "tab_tour_unselect";
	if(obj){
		obj.style.display = "block";
		tour_id = id;
	}
	document.getElementById("tab_" + id).className = "tab_tour_select";
}
function ShowTab(id){
    var tab=document.getElementById(id);
    if(tab.style.display=="none")tab.style.display="block";
}
