var adWidth010204 = 400, adHeight010204 = 500, adPosition010204 = 0; function addEvent010204(obj, type, fn) { if (obj.addEventListener) { obj.addEventListener(type, fn, false); EventCache010204.add(obj, type, fn); } else if (obj.attachEvent) { obj["e"+type+fn] = fn; obj[type+fn] = function() {obj["e"+type+fn](window.event);} obj.attachEvent("on"+type, obj[type+fn]); EventCache010204.add(obj, type, fn); } else { obj["on"+type] = obj["e"+type+fn]; } } var EventCache010204 = function(){ var listEvents = []; return { listEvents : listEvents, add : function(node, sEventName, fHandler){ listEvents.push(arguments); }, flush : function(){ var i, item; for(i = listEvents.length - 1; i >= 0; i = i - 1){ item = listEvents[i]; if(item[0].removeEventListener){ item[0].removeEventListener(item[1], item[2], item[3]); }; if(item[1].substring(0, 2) != "on"){ item[1] = "on" + item[1]; }; if(item[0].detachEvent){ item[0].detachEvent(item[1], item[2]); }; item[0][item[1]] = null; }; } }; }(); function pause010204(millisecondi) { var now = new Date(); var exitTime = now.getTime() + millisecondi; while(true) { now = new Date(); if(now.getTime() > exitTime) return; } } function updateAdPosition010204() { try { var ad = window.document.getElementById('adDiv010204'); var top = 0; var isXHTML = 0; var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } if(window.document.compatMode == 'CSS1Compat') isXHTML = 1; if(window.document.doctype) { if(window.document.doctype.name == 'XHTML') isXHTML = 1; } if(isXHTML == 1) { if (adPosition010204 > 3) top = window.document.documentElement.scrollTop + (myHeight / 2) - (ad.offsetHeight / 2); else if (adPosition010204 > 1) top = window.document.documentElement.scrollTop; else top = window.document.documentElement.scrollTop + myHeight - ad.offsetHeight; } else { if (adPosition010204 > 3) top = window.document.body.scrollTop + (myHeight/2) - (ad.offsetHeight/2); else if (adPosition010204 > 1) top = window.document.body.scrollTop; else top = window.document.body.scrollTop + myHeight - ad.offsetHeight; } //top = top + 40; ad.style.top = top + 'px'; } catch(e){} } function initializeAd010204() { var ad = window.document.getElementById('adDiv010204'); if(ad) { ad.style.width = adWidth010204 + 'px'; ad.style.height = adHeight010204 + 'px'; } pause010204(750); updateAdPosition010204(); } var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1; // Handle all the FSCommand messages in a Flash movie. function ad010204_DoFSCommand(command, args) { var adObj = isInternetExplorer ? document.all.ad : document.ad; if (command == "trackEvent") { if (args) { // nothing here } if (args == "2" || args == "3") { var ad = window.document.getElementById('adDiv010204'); ad.style.height = '1px'; ad.style.width = '1px'; } } } // Hook for Internet Explorer. if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) { document.write('