Object.prototype.extend=function(){for(var i=0;i<arguments.length;i++){var ext=arguments[i];if(typeof this=="function"&&typeof ext=="function"){var $this=this;return function(){return $this.apply(null,arguments)||ext.apply(null,arguments)}}else if(typeof ext=="object"){for(var j in ext)this[j]=ext[j];return this}}};
falseFunc=function(){return false};trueFunc=function(){return true};nullFunc=function(){return null};emptyFunc=function(){};
Object.prototype.isFunc=function(){if(typeof this==="function")return true;return false};Object.prototype.isArray=function(){return!!this&&typeof this==="object"&&typeof this.length==="number"&&typeof this.splice==="function"&&!(this.propertyIsEnumerable("length"))};Object.prototype.isString=function(){return!!this&&typeof this==="string"&&typeof this.length==="number"};Object.prototype.isNumber=function(){return!!this&&typeof this==="number"};Object.prototype.isRegExp=function(){return!!this&&(typeof this==="object"||typeof this==="function")&&typeof this.test==="function"&&this instanceof RegExp};
addEvHandler=function($event,$function,$bubble){if(!$function||!$function.isFunc())return false;if(!!$bubble)$bubble=true;else $bubble=false;var $elements;if(!this.isArray||!this.isArray())$elements=[this];else $elements=this;if(!$event)return false;if(!$event.isArray())$event=[$event];var i,j,error;for(i=0;i<$event.length;i++){for(j=0;j<$elements.length;j++){try{$elements[j].addEventListener($event[i],$function,$bubble)}catch(error){try{if($bubble)var $func=function(){var e=window.event;$function.call(e.srcElement)};else var $func=function(){var e=window.event;e.cancelBubble=true;$function.call(e.srcElement)};$elements[j].attachEvent("on"+$event[i],$func);return $func}catch(error){$elements[j]["on"+$event[i]]=$function}}}}return true};
window.addOnload=function($func){if(typeof $func!="function")return false;if(typeof window.onload!="undefined")addEvHandler.call(window,"load",$func);else window.onload=$func;return true};
document.objectModel=function(){if(!init){if(document.addEventListener)document.addEventListener("DOMContentLoaded",function(){onLoad()},false);else if(/WebKit/i.test(navigator.userAgent)){var _domLoadTimer=setInterval(function(){if(/^loaded|complete$/.test(document.readyState)){clearInterval(_domLoadTimer);onload()}},10)}else if(/MSIE/i.test(navigator.userAgent)){/*@cc_on@*//*@if(@_win32||@_win64)var script=document.createElement("script");script.setAttribute("defer","defer");script.setAttribute("src","javascript: void(0);");script.setAttribute("id","__msie_dom_onload");document.getElementsByTagName("head")[0].appendChild(script);var script=document.getElementById("__msie_dom_onload");script.onreadystatechange=function(){if(/^loaded|complete$/.test(this.readyState)){setTimeout(onLoad,1);this.onreadystatechange=null}};/*@end@*/}else window.addOnload(function(){onLoad()});function onLoad(){try{if(arguments.callee.done)return false;else arguments.callee.done=true;return __onLoadOnce()||__onLoad()}catch(e){if(document.objectModel.debug)alert(e);return false}};var __onLoadOnce=emptyFunc;var __onLoad=emptyFunc;document.objectModel.addOnLoad=function($func,$once){if(!$func||!$func.isFunc())return false;if($once)__onLoadOnce=__onLoadOnce.extend($func);else __onLoad=__onLoad.extend($func);return true};document.objectModel.onLoad=function(){__onLoad()}}var init=true};document.objectModel.debug=false;document.objectModel();
require.loadedLibs.push("lib/object.extend.js","lib/lib.functions.js","lib/object.is_type.js","lib/element.add_ev_handler.js","window.add_onload_handler.js");
