/* ============= functions ============= */ function toggle(element) { var el = $(element); if ( el.style.display == 'none' ) { el.style.display = 'block'; } else { el.style.display = 'none'; } } function fprint(e) { var myEvent = new Event(e); window.print(); myEvent.stop(); } function f_protect(mailto, domain) { email = mailto + '@' + domain; document.write('' + email + ''); } function smoothScroll(e) { var event = new Event(e); var target = (!event.target.href) ? event.target.parentNode : event.target; var divToScrollTo = target.href.split('#')[1]; new Fx.Scroll(window).toElement(divToScrollTo); event.stop(); } function addBookmark(url, title) { if (window.sidebar) { // Firefox window.sidebar.addPanel(title, url,""); } else if ( document.all ) { // MSIE window.external.AddFavorite( url, title); } else if (navigator.userAgent.indexOf('Opera') != -1) { // Opéra alert ("CTRL + T pour bookmarquer ce site !"); } else if (navigator.userAgent.indexOf('Opera') != -1) { // netscape 4.x alert ("CTRL + D pour bookmarquer ce site !") } else { alert("Sorry, your browser doesn't support this"); } } function fbs_click() { u=location.href; t=document.title; window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436'); return false; } /* ========== Init functions ========== */ function print_init() { if (!$$('a.print')) return; // test to see if we have to launch the function var print_buttons = $$('a.print'); for (i = 0; i