// JavaScript Document
function todo(){this.action=new Array();this.execute=function(){for(var i in this.action){try{todo.action[i]();}catch(er){alert('todo >> "'+er.message+'" in "'+er.fileName+'" on "'+er.lineNumber+'"');}}};var onLoadAction=function(o){return function(){o.execute();}}(this);if(typeof document.attachEvent!='undefined')window.attachEvent('onload',onLoadAction);else window.addEventListener('load',onLoadAction,false);};
todo.prototype.get=function(id){return document.getElementById(id);};
todo.prototype.isTag=function(e){try{if(e.nodeName.toLowerCase()!='#text' && e.nodeName.toLowerCase()!='#comment')return true;}catch(er){};return false;};
todo.prototype.getNextNode=function(e){try{var n=e;while(n=n.nextSibling)if(todo.isTag(n))return n;}catch(er){};return null;};
todo.prototype.getFirstChild=function(e){if(todo.isTag(e.firstChild))return e.firstChild;return todo.getNextNode(e.firstChild);};
todo.prototype.create=function(tag,attrs,text,style){var e=document.createElement(tag);if(attrs)for(var i in attrs)switch(i){case 'class': e.className=attrs[i];break;case 'id': e.id=attrs[i];break;default: e.setAttribute(i,attrs[i]);break;};if(text)e.appendChild(document.createTextNode(text));if(style)for(var i in style)e.style[i]=style[i];return e;};
todo.prototype.onload=function(func){this.action[this.action.length]=func;};
todo.prototype.importScript=function(src){document.getElementsByTagName('head')[0].appendChild(this.create('script',{'type':'text/javascript','src':src}));};
todo=new todo();
