function NewPostedecoute(mypage, myname, w, h, scroll) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll; win = window.open(mypage, myname, winprops) if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function PrintPlayButton(id) { document.write('Écouter cet album'); } function addEventToObject(obj, evt, func) { var oldhandler = obj[evt]; obj[evt] = (typeof obj[evt] != 'function') ? func : function(){oldhandler();func();}; } function addPopupHandlers() { links = document.getElementsByTagName('a'); for (i = 0; i < links.length; i++) { link = links[i] if (/http:\/\/www.postedecoute.ca\/([a-z_-]+\/)*player/.test(link.href)) { addEventToObject(link,'onclick',function() { NewPostedecoute(this.href,'postedecoute','580','550','no');return false; }); } } } // Faster load: bypasses the window.onload event, starts when DOM is done function init() { // quit if this function has already been called if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); // do stuff addPopupHandlers(); }; /* for Mozilla/Opera9 */ if (document.addEventListener) { document.addEventListener("DOMContentLoaded", init, false); } /* for Internet Explorer */ /*@cc_on @*/ /*@if (@_win32) document.write("