function fHomeSlideShow(){

	//
	// slide control
	var nIndex = 0;
	var oContainer = $("galleryProductsSlide");
	var aProduct = oContainer.getChildren();
	var oSlider =$("galleryProductsInner");
	oSlider.scrollTo(0, 0);
	oSlider.fx = new Fx.Scroll(oSlider, {
		duration: 600,
		transition: Fx.Transitions.Quad.easeInOut
	});
	//
	$("btnNext").addEvent('click', function(event) {
		new Event(event).stop();
		nIndex = Math.min(nIndex+3, aProduct.length-3);
		if (aProduct[nIndex]) {
			oSlider.fx.stop().toElement(aProduct[nIndex]);
		}
	});
	$("btnPre").addEvent('click', function(event) {
		new Event(event).stop();
		nIndex = Math.max(0,nIndex-3);
		if (aProduct[nIndex]) {
			oSlider.fx.toElement(aProduct[nIndex]);
		}
	});
}
//
window.addEvent("load", function(e){
	
	var oContainer = $("galleryProductsSlide");
	var aProduct = oContainer.getChildren();
	var oSlider =$("galleryProductsInner");
	if(oSlider.length != 0)
	{
		fHomeSlideShow();
	}
	else
	{
			document.getElementById("mention").style.display="none"
			document.getElementById("galleryProducts").style.display="none"
		
	}
});