/*
	Event.observe(window, 'load', function(){											   
	
		new LoaderSlideShow({
			container:"#scrollContainer",
			timer:$("timer").getValue(),
			pas:$("product_pas").getValue(),
			url:"/FRONT/LONGCHAMP/include/showroom_load.php"
		});
		
	});
	
	
	LoaderSlideShow = new Class.create();
	
	LoaderSlideShow.prototype = {
		container:false,
		timer:2000,
		pas:6,
		url:false,
		slide:{
			visible:false
		},
		ready:true,
		initialize:function(globalVar,slideVar) {
			// global
			this.container = $$(globalVar.container);
			this.timer = globalVar.timer*1000;
			this.url = globalVar.url;
			if(globalVar.pas != undefined) this.pas = globalVar.pas;
			
			// slider
			this.slide.visible = this.pas;
			
			// gestion du chargement
			this.setLoading();
		},
		setLoading:function() {
			var ref = this;
			setTimeout(function() {
				ref.next();
			},ref.timer)
			
		},
		next:function() {
			var ref = this;
			new Ajax.Request(ref.url, {
				method: "POST",
				parameters: { 
	  				_post: $('_post').value,
	  				_get: $('_get').value
	  				
	  			},
				encoding:"UTF-8",
				onLoaded: function() {
					//alert("D�but du chargement");
				},
				onComplete: function(msg) {
					//alert("Fin du chargement");
				},
				onFailure: function(msg) {
					//alert("Erreur");
				},
				onSuccess: function(msg) {
					var myResult = msg.responseText.evalJSON();					
					myResult.product.each(function(elmt,e) { 
						if(ref.ready) ref.writePicture(elmt);							
					});
				}
			});
		},
		writePicture:function(objImg) {
			var ref = this;
			
			setTimeout(function() {
				ref.container.each(function(content,s){
					ref.ready = false;

					var myOldImg = content.getElementsBySelector("td")[ref.slide.visible].getElementsBySelector("img")[0];

					myOldImg.up().update('<img src="'+objImg.src+'" alt="'+objImg.alt+'" />');	
					
					// une fois l'image ecrite, on met a jour les variables
					ref.ready = true;
					ref.slide.visible++;
				});
			},ref.timer);
		}
	};
        */
