// AJAX INIT
function $$$(id) {
	return document.getElementById(id);
}
function khoitao_ajax()
{
	var x;
	try 
	{
		x	=	new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
    	try 
		{
			x	=	new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(f) { x	=	null; }
  	}
	if	((!x)&&(typeof XMLHttpRequest!="undefined"))
	{
		x=new XMLHttpRequest();
  	}
	return  x;
}
function	Forward(url)
{
	window.location.href = url;
}
function	_postback()
{
	return void(1);
}
//cuongnt - dat phong

/*So sanh height cua 2 the div tgp_body_content & tgp_right*/
function EqualHeight(elements) { 
    //Xác định chiều cao của cột cao nhất 
    tallest = 0; 
    elements.each(function() { 
        elementHeight = jQuery(this).height(); 
        if(elementHeight > tallest) { 
            tallest = elementHeight; 
        } 
    }); 
    //Chỉnh chiều cao cho tất cả các cột 
    //theo chiều cao của cột cao nhất 
    elements.height(tallest); 
} 
//Áp đặt chiều cao cho các cột khi trang 
//đã được load hoàn tất. 
jQuery(window).load(function(){ 
    EqualHeight(jQuery(".wrap_container .wrap_body .tgp_body .tgp_left,.wrap_container .wrap_body .tgp_body .tgp_right")); 
    //Tự động điều chỉnh lại chiều cao sau khi 
    //resize browser. Nếu không quan tâm đến việc 
    //resize browser, bạn có thể gỡ bỏ hàm này 
    jQuery(window).resize(function(){ 
        EqualHeight(jQuery(".wrap_container .wrap_body .tgp_body .tgp_left,.wrap_container .wrap_body .tgp_body .tgp_right")); 
    }); 
	//Cufon.replace('.title, .tgp_body .div_4 .box_3 .panel_1 .counter', {fontFamily: 'Verdana'});
}); 
//Áp đặt chiều cao cho các cột khi trang 
//đã được load hoàn tất. 

jQuery(window).load(function(){ 
	
	

   // EqualHeight(jQuery(".tgp_container .tgp_body .b_footer,.tgp_container .tgp_right .space")); 
 
    //Tự động điều chỉnh lại chiều cao sau khi 
    //resize browser. Nếu không quan tâm đến việc 
    //resize browser, bạn có thể gỡ bỏ hàm này 
    jQuery(window).resize(function(){ 
       // EqualHeight(jQuery(".tgp_container .tgp_body .b_footer,.tgp_container .tgp_right .space")); 
    }); 
	ddsmoothmenu.init({
	mainmenuid: "smoothmenu1",
	orientation: 'h',
	classname: 'ddsmoothmenu', 
	contentsource: "markup" 
	});
}); 
//Slider


