/***********************************************************************/
/*                                                                     */
/*   Copyright (C) 2008-2010  Ready Technology.                        */
/*   Author     : rocachi - Do Van Chien - rocachien@yahoo.com.        */
/*   Powered By : Ready Technology Co.,Ltd. http://23vn.com            */
/*                                                                     */
/*   Created    : 16-08-2008 11:02:05.                                 */
/*   Modified   : 16-04-2008 11:02:05.                                 */
/*                                                                     */  
/***********************************************************************/
//alert("da vao readyLoader");
function GetXmlHttpObject(){
	var xmlHttp=null;
	var e=document.getElementById;
	try	  {
	  // Firefox, Opera 8.0+, Safari
	  xmlHttp=new XMLHttpRequest();
	}
	catch (e)  {
	  // Internet Explorer
	  try {
		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	  }
	  catch (e)	{
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	}
	return xmlHttp;
}
function readyLoader(url,id)//,effect)
{
	var x=GetXmlHttpObject();
	//el = document.all ? document.all[""+id+""] : document.getElementById ? document.getElementById(""+id+"") : "";

	if (x){
		x.onreadystatechange = function(){
			el = document.getElementById(id);
			el.style.display = "block";
			//if(effect==1)
			//	new Effect.Appear(el);				
			//if(effect==2)
			//	new Effect.Shake(el);
			if ((x.readyState == 4) && (x.status == 200)){
				el.innerHTML = x.responseText;
			}
		}
			
		x.open("GET", url, true);
		x.send(null);
	}	
}
function readyClose(id){
  var objClose = document.getElementById(id);
  //var objClose = document.all ? document.all[""+id+""] : document.getElementById ? document.getElementById(""+id+"") : "";
  jQuery.noConflict();
	jQuery(document).ready(function($) {
		$("#"+id).show("normal",
			function()
			{
				$("#"+id).fadeOut(1000);
			}
			);
	}); 
  //s.innerHTML = '';
}
function readyclose(id){

  var s = document.getElementById(id);
  s.innerHTML = '';
}
