if(!Array.prototype.pop){
Array.prototype.pop=function(){
if(!this.length){
return null;
}
var _1=this[this.length-1];
--this.length;
return _1;
};
}
if(!Array.prototype.push){
Array.prototype.push=function(){
for(var i=0,n=arguments.length;i<n;i++){
this[this.length]=arguments[i];
}
return this.length;
};
}
if(!Array.prototype.indexOf){
Array.prototype.indexOf=function(_4,_5){
if(typeof (_5)!="number"){
_5=0;
}else{
if(_5<0){
_5=this.length+_5;
}
}
for(var i=_5,n=this.length;i<n;i++){
if(this[i]===_4){
return i;
}
}
return -1;
};
}
function Browser(){
this.name=navigator.userAgent;
this.isWinIE=this.isMacIE=false;
this.isGecko=this.name.match(/Gecko\//);
this.isSafari=this.name.match(/AppleWebKit/);
this.isKHTML=this.isSafari||navigator.appVersion.match(/Konqueror|KHTML/);
this.isOpera=window.opera;
this.hasNS=(document.documentElement)?document.documentElement.namespaceURI:null;
if(document.all&&!this.isGecko&&!this.isSafari&&!this.isOpera){
this.isWinIE=this.name.match(/Win/);
this.isMacIE=this.name.match(/Mac/);
}
}
var Browser=new Browser();
if(!window.Event){
var Event=new Object;
}
Event={cache:false,getEvent:function(_8){
return (_8)?_8:((window.event)?window.event:null);
},getKey:function(_9){
_9=this.getEvent(_9);
return (_9.which)?_9.which:_9.keyCode;
},stop:function(_a){
try{
_a.stopPropagation();
}
catch(err){
}
_a.cancelBubble=true;
try{
_a.preventDefault();
}
catch(err){
}
return (_a.returnValue=false);
},register:function(_b,_c,_d){
if(_c=="keypress"&&(Browser.isKHTML||_b.attachEvent)){
_c="keydown";
}
if(_c=="mousewheel"&&Browser.isGecko){
_c="DOMMouseScroll";
}
if(!this.cache){
this.cache=[];
}
if(_b.addEventListener){
this.cache.push([_b,_c,_d]);
_b.addEventListener(_c,_d,false);
}else{
if(_b.attachEvent){
this.cache.push([_b,_c,_d]);
_b.attachEvent(["on",_c].join(""),_d);
}else{
_b[["on",_c].join("")]=_d;
}
}
},deregister:function(_e,_f,_10){
if(_f=="keypress"&&(Browser.isKHTML||_e.attachEvent)){
_f="keydown";
}
if(_f=="mousewheel"&&Browser.isGecko){
_f="DOMMouseScroll";
}
if(_e.removeEventListener){
_e.removeEventListener(_f,_10,false);
}else{
if(_e.detachEvent){
_e.detachEvent(["on",_f].join(""),_10);
}else{
_e[["on",_f].join("")]=null;
}
}
},deregisterAll:function(){
if(!Event.cache){
return;
}
for(var i=0,n=Event.cache.length;i<n;i++){
Event.deregister(Event.cache[i]);
Event.cache[i][0]=null;
}
Event.cache=false;
}};
Event.register(window,"unload",Event.deregisterAll);
document.getElemetsByClassName=function(_13,_14){
var _15=[];
var _16=null;
var _17=new RegExp(["(^|\\s)",_13,"(\\s|$)"].join(""));
if(_14&&_14.getElementsByTagName){
_16=_14.getElementsByTagName("*");
}
if(!_16){
_16=document.getElementsByTagName?document.getElementsByTagName("*"):document.all;
}
for(var i=0,n=_16.length;i<n;i++){
var _1a=_16[i].getAttribute("class")||_16[i].className;
if(_1a.match(_17)){
_15.push(_16[i]);
}
}
return _15;
};
function Library(){
this._path="";
this._cache=[];
this.lang="";
this.base="";
return this._init();
}
Library.prototype={_init:function(){
var _1b=document.getElementsByName("X-Resource-Dir")[0];
var _1c=document.getElementsByName("X-Script-Dir")[0];
if(_1b){
this.base=this._check_path(_1b.getAttribute("content"));
if(!_1c){
this._path=[this.base,"js/"].join("");
}
}
if(_1c){
this._path=this._check_path(_1c.getAttribute("content"));
}
return this;
},_initLang:function(){
var _1d=document.getElementsByTagName("html")[0];
if(!_1d){
return;
}
this.lang=_1d.getAttribute("xml:lang")||_1d.getAttribute("lang");
},_check_path:function(_1e){
if(!_1e){
return "";
}
if(!_1e.match(/\/$/)){
_1e=[_1e,"/"].join("");
}
return _1e;
},require:function(_1f){
var pre="\n<script type=\"text/javascript\" src=\"";
var _21=".js\"></script>";
for(var i=0,n=_1f.length;i<n;i++){
if(this._cache.indexOf(_1f[i])>-1){
continue;
}
document.write([pre,this._path,_1f[i],_21].join(""));
this._cache.push(_1f[i]);
}
},path:function(_24){
this._path=this._check_path(_24);
}};
var Library=new Library();
Event.register(window,"load",function(){
Library._initLang();
});
