function initMenu() {
  $('#listmenu ul').hide();
  $('#listmenu li a').click(
    function() {
        $(this).next().slideToggle('normal');	
      }
    );
  }
$(document).ready(function() {initMenu();});

loadstatustext = 'Loading...';
function ajaxLoad(url,id)
{
	if (document.getElementById) {
	   var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
	}
	if (x)
	{
		x.onreadystatechange = function()
		{
			el = document.getElementById(id);
			el.innerHTML = loadstatustext;
		 	if (x.readyState == 4 && x.status == 200)
			{
				   el.innerHTML = x.responseText;
			   }
			   }
		   x.open("GET", url, true);
		   x.send(null);
	}
}

function ajaxchangePage(x,file,id)      
{
   ajaxLoad(file+'?curPg='+x,id);
}
//Begin change color functions
var curbgColor;
var curfgColor;
function active(obj,bcolor,fcolor)
{
	if(bcolor==null) bcolor = "#CEECF6";
	if(fcolor==null) fcolor = "#0047FE";
	
	curbgColor = obj.style.backgroundColor;
	curfgColor = obj.style.color;
	obj.style.backgroundColor = bcolor;
	obj.style.color = fcolor;
}

function deactive(obj)
{
	obj.style.backgroundColor = curbgColor;
	obj.style.color = curfgColor;
}
//end
function goPage(fileName)
{
	location.href = fileName;
}
function checkfaq()
{
	myFrm = document.frmFaq;
	if(myFrm.fullname.value=='')
	{
		alert("Vui long go ten cua ban!");
		myFrm.fullname.focus();
		return false;
	}
	if(!isEmail(myFrm.email.value))
	{
		alert("Hay kiem tra lai dia chi email cua ban!");
		myFrm.email.focus();
		return false;
	}
}
function setBGTD(id, src) {
	document.getElementById(id).style.background = src;
}
function _openWin(url, target) {
	open(url, target);
}

//-->
