function del( Obj ) { var label = ( Obj.title ) ? Obj.title : 'Etes vous sûr de vouloir supprimer cet élément ?'; return confirm( label ); } function popup( href, name, h, l ) { var hauteur = Math.round( ( screen.availHeight - h ) / 2 ); var largeur = Math.round( ( screen.availWidth - l ) / 2 ); var popup = window.open( href, name, 'toolbar=0,location=0,directories=0,status=0, scrollbars=1,resizable=1,menubar=0,top='+hauteur+',left='+largeur+',width='+l+',height='+h); popup.focus(); return false; } function popupOrder( Obj ) { return popup( Obj.href, 'order', 640, 650 ); } function marqueeBoxInit(){ if($('marqueebox')){ new mooMarquee($('marqueebox'), $$('#marqueebox .marquee'), {'waitDuration': 5000, fps: 28}); } } window.addEvent('domready', marqueeBoxInit); function marqueeNewsInit(){ if($('marqueenews')){ new mooMarquee($('marqueenews'), $$('#marqueenews p'), {'waitDuration': 6000, 'direction': 'horizontal', 'transitionInDuration': 2000, 'transitionOutDuration': 2000, fps: 28}); } } window.addEvent('domready', marqueeNewsInit); function menuCatalog(){ if($('menu-catalog')){ var open = Cookie.get('menuCatalogOpen') || 0; new Accordion('#menu-catalog span', '#menu-catalog ul', { opacity: false, width: false, show: open.toInt(), onActive: function(toggler, element){ var open; this.elements.each(function(el, i){ if( el==element ){ open = i; } }, this); Cookie.set('menuCatalogOpen', open); }, fps: 28, duration: 300 } ); } } window.addEvent('domready', menuCatalog); function highlightCatalog(){ if($('CatalogueProduct') && window.ie6 == true){ $$('#CatalogueProduct tbody tr').each(function(el){ el.addEvents({ 'mouseover': function(){ el.toggleClass( 'overTR' ); }, 'mouseout': function(){ el.toggleClass( 'overTR' ); } }) }); } } window.addEvent('domready', highlightCatalog); function fCountDown(){ var diffServer = 1280579254 * 1000 - new Date().getTime(); $$('.countdown').each(function(element){ new mooCountdown(element, { 'display': '%%D%% jours %%H%%:%%M%%:%%S%%', 'diffServer' : diffServer }); }); } window.addEvent('domready', fCountDown); function fImageTips(){ $$('.imagetips').each(function(element){ new ImageTips(element); }); } window.addEvent('domready', fImageTips);