/* AJOUTER AU PANIER ET AFFICHER LA MULTIBOX ADÉQUATE */
var boxBanner; 
var time;
window.addEvent("load",function(){
	boxBanner = new MultiBox('addProductBanner',{useOverlay:true,showControls:false,openFromLink:true});
	$$(".addProductBanner").addEvent("click",function(e){										  	
		e.stop()	
		var id_product=this.get("id")
		var rid=this.get("id").substr(15)
		var rqst = new Request({
			url:'/wabs/catalog2006/basketHandler.jsp',
			method:'get',
			data:'rid='+rid+'&qty=1',
			 onSuccess:function(txt,x){    
						  /* var status=x.firstChild.getAttribute("status")
						   if(status=="ok"){
							   var node=x.getElementsByTagName('addref');
							   
								var qat = node[0].getElementsByTagName('quantity')[0].firstChild.data;       
								var ref = node[0].getElementsByTagName('reference')[0].firstChild.data;
								var stock = node[0].getElementsByTagName('stock')[0].firstChild.data;
								
							//	alert(id_product)
								// box.open();
						   }else if(status=="error"){
							//box = new MultiBox('mb', {descClassName:'multiBoxDesc',useOverlay:true,showControls:false});
							 //box.open($('popup_addToBasket'));
						   }     */
						  }
		}).send()	
	})				
});
function changePage(page){						
	window.location = page
	clearTimeout(time);
}
function startChangePage(page){		

			time = setTimeout("changePage('"+page+"')",500)
			closeBox()
	
}
function closeBox(){
		try{
				box.close()
			}catch(e){};
			
			try{
				boxBanner.close();
			}catch(e){};
}