2016-03-30 08:21:59 +02:00
|
|
|
|
|
|
|
var readyListAeo=[];function onReadyAeo(handler){function executeHandlers(){for(var i=0;i<readyListAeo.length;i++){readyListAeo[i]();}}
|
|
|
|
if(!readyListAeo.length){bindReady(executeHandlers);}
|
|
|
|
readyListAeo.push(handler);}
|
|
|
|
function bindReady(handler){var called=false;function ready(){if(called)
|
|
|
|
return
|
|
|
|
called=true;handler();}
|
|
|
|
if(document.addEventListener){document.addEventListener("DOMContentLoaded",ready,false);}else if(document.attachEvent){try{var isFrame=window.frameElement!=null;}catch(e){}
|
|
|
|
if(document.documentElement.doScroll&&!isFrame){function tryScroll(){if(called)
|
|
|
|
return;try{document.documentElement.doScroll("left");ready();}catch(e){setTimeout(tryScroll,10);}}
|
|
|
|
tryScroll();}
|
|
|
|
document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){ready();}});}
|
|
|
|
if(window.addEventListener)
|
|
|
|
window.addEventListener('load',ready,false);else if(window.attachEvent)
|
2015-04-02 08:23:59 +02:00
|
|
|
window.attachEvent('onload',ready);else{var fn=window.onload;window.onload=function(){fn&&fn();ready();};}}
|