// Always 
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);
}
// KhanhTQ : Customize
$(document).ready(function(){
	$('#SanPham').show().galleryView({
		filmstrip_size: 5,
		panel_width: 895,
		panel_height: 140,
		frame_width: 160,
		frame_height: 135,
		background_color: 'transparent',
		nav_theme: 'dark',
		border: 'none',
		show_captions:false,
		caption_text_color: 'black'
	});
});
// Khanttq : Customize
$(function(){
   Cufon.replace('h3.title', {color: '-linear-gradient(#15aaf7,#06567f)'});
   
   $("#select-wrapper").jqTransform();
});
function formatText(index, panel) {
return index + "";
}
$("#slider").easySlider({
	auto: true,
	continuous: true,
	pause : 6000,
	controlsShow : false
});
$(function() {
    var galleries = $('.ad-gallery').adGallery();
    $('#switch-effect').change(
      function() {
        galleries[0].settings.effect = $(this).val();
        return false;
      }
    );
    $('#toggle-slideshow').click(
      function() {
        galleries[0].slideshow.toggle();
        return false;
      }
    );
  });
