document.scriptPath="js/lib/ScriptSheet/";
(function(){
if(!window.Event){
Event={CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3};
}
if(!window.EventException){
function EventException(_1,_2){
this.code=_1;
this.message=_2;
}
EventException.UNSPECIFIED_EVENT_TYPE_ERR=0;
EventException.prototype=new Error;
}
if(!window.addEventListener&&document.all&&window.attachEvent){
var _3={mouseover:1,mouseout:1,mousemove:1,mousedown:1,mouseup:1,click:1,change:1,focus:1,blur:1,load:1,unload:1,keypress:1,keyup:1,keydown:1};
function grabEventAttributes(_4){
if(!_4.attachEvent){
return;
}
if(_4.nodeType!=1){
return;
}
for(var _5 in _3){
var _6=(_4.getAttribute)?_4.getAttribute("on"+_5):null;
if(_6){
_4["IEtoW3C_on"+_5]=_4["on"+_5];
_4.addEventListener(_5,execAttrEvent,false);
_4["on"+_5]=null;
}
}
}
function execAttrEvent(_7){
var _8=this["IEtoW3C_on"+_7.type].toString();
var _9=_8.substring(_8.indexOf("{")+1,_8.lastIndexOf("}"));
_9=_9.replace(/([\W])this([\W])/,"$1event.currentTarget$2");
_9="(function(event) {"+_9+"})(evt);";
var _a=eval(_9);
if(_a==false){
_7.preventDefault();
}
}
function stopPropagation(){
this.IEtoW3C_canceled=true;
}
function preventDefault(){
this.returnValue=false;
}
function handleEvent(_b,_c){
if(!_c){
var _c=window.event;
}
if(!_c.currentTarget){
_c.currentTarget=_b;
}
if(!_c.target){
_c.target=_c.srcElement||_b;
}
if(_c.bubbles==null){
_c.bubbles=true;
}
if(_c.cancelable==null){
_c.cancelable=true;
}
_c.stopPropagation=stopPropagation;
_c.preventDefault=preventDefault;
if(!_c.relatedTarget){
_c.relatedTarget=_c.fromElement||_c.toElement||null;
}
_c.pageX=_c.clientX+document.body.scrollLeft;
_c.pageY=_c.clientY+document.body.scrollTop;
_c.timeStamp=new Date().valueOf();
if(String.fromCharCode(_c.keyCode).match(/[\w\d]/)){
_c.charCode=_c.keyCode;
_c.keyCode=0;
}else{
_c.charCode=0;
}
_c.returnValue=true;
_c.IEtoW3C_canceled=false;
if(_c.target.nodeType&&_c.target.disabled&&_c.target.tagName.match(/^(input|button|textarea|select)$/i)){
return;
}
_c.cancelBubble=true;
var _d=[];
var _e=_c.target;
while(_e){
hookupDOMEventsOn(_e);
_d[_d.length]=_e;
_e=_e.parentNode;
}
_e=_d[_d.length-1];
if(_e===document.documentElement){
_e=_d[_d.length]=document;
}
if(_e===document){
_d[_d.length]=window;
}
_c.eventPhase=Event.CAPTURING_PHASE;
for(var i=_d.length-1;(_e=_d[i])&&(!_c.cancelable||!_c.IEtoW3C_canceled);i--){
if(i==0){
_c.eventPhase=Event.AT_TARGET;
}
_c.currentTarget=_e;
var _10=_e.IEtoW3C_onevent[_c.type];
for(var j=0,h;_10&&(h=_10.capture[j]);j++){
h.invoke(_c);
}
}
for(var i=0;(_e=_d[i])&&(!_c.cancelable||!_c.IEtoW3C_canceled);i++){
_c.currentTarget=_e;
var _10=_e.IEtoW3C_onevent[_c.type];
for(var j=0,h;_10&&(h=_10.bubble[j]);j++){
h.invoke(_c);
}
if(i==0){
if(!_c.bubbles){
break;
}
_c.eventPhase=Event.BUBBLING_PHASE;
}
}
if(_c.charCode>0&&_c.keyCode==0){
_c.keyCode=_c.charCode;
}
}
function ListenerWrapper(elt,lst){
this.element=elt;
this.listener=lst;
}
ListenerWrapper.prototype.invoke=function(evt){
var lst=this.listener;
if(typeof lst=="function"){
var elt=this.element;
elt._lstnr=lst;
elt._lstnr(evt);
elt._lstnr=null;
}else{
lst.handleEvent(evt);
}
};
function addEventListener(_17,_18,_19){
var _1a=this.IEtoW3C_onevent[_17];
if(!_1a){
_1a=this.IEtoW3C_onevent[_17]={capture:[],bubble:[]};
if(_17 in _3){
var _1b=this;
if(!this.IEtoW3C_listen){
this.IEtoW3C_listen={};
}
var _1c=this.IEtoW3C_listen[_17]=function(){
handleEvent(_1b);
};
if(this.attachEvent){
this.attachEvent("on"+_17,_1c);
}else{
this["on"+evtType]=_1c;
}
}
}
var _1d=new ListenerWrapper(this,_18);
this.removeEventListener(_17,_18,_19);
var _1e=(_19)?_1a.capture:_1a.bubble;
_1e[_1e.length]=_1d;
}
function removeEventListener(_1f,_20,_21){
var _22=this.IEtoW3C_onevent[_1f];
if(!_22){
return;
}
var _23=(_21)?_22.capture:_22.bubble;
for(var i=0;i<_23.length;i++){
if(_23[i].listener===_20){
for(var j=i;j<_23.length-1;j++){
_23[j]=_23[j+1];
}
_23.length--;
}
}
}
function dispatchEvent(evt){
if(!evt.type){
throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR);
}
evt.target=evt.currentTarget=this;
handleEvent(this,evt);
}
function hookupDOMEventsOn(elt){
if(elt.IEtoW3C_onevent){
return;
}
elt.IEtoW3C_onevent={};
elt.addEventListener=addEventListener;
elt.removeEventListener=removeEventListener;
elt.dispatchEvent=dispatchEvent;
grabEventAttributes(elt);
}
function unhookDOMEventsFrom(elt){
if(elt.IEtoW3C_listen){
for(var i in elt.IEtoW3C_listen){
if(elt.detachEvent){
elt.detachEvent("on"+i,elt.IEtoW3C_listen[i]);
}else{
elt["on"+i]=null;
}
}
}
for(var _2a in _3){
elt["IEtoW3C_on"+_2a]=null;
}
elt.IEtoW3C_listen=elt.IEtoW3C_onevent=elt.addEventListener=elt.removeEventListener=elt.dispatchEvent=null;
}
document.createEvent=function(_2b){
var evt={};
if(_2b=="UIEvents"){
evt.initUIEvent=function(){
var _2d=["type","bubbles","cancelable","view","detail"];
for(var i=0,x;(x=_2d[i]);i++){
this[x]=arguments[i];
}
};
}else{
if(_2b=="MouseEvents"){
evt.initMouseEvent=function(){
var _2f=["type","bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget"];
for(var i=0,x;(x=_2f[i]);i++){
this[x]=arguments[i];
}
};
}else{
if(_2b=="MutationEvents"){
evt.initMutationEvent=function(){
var _31=["type","bubbles","cancelable","relatedNode","prevValue","newValue","attrName","attrChange"];
for(var i=0,x;(x=_31[i]);i++){
this[x]=arguments[i];
}
};
}else{
evt.initEvent=function(_33,bub,can){
this.type=_33;
this.bubbles=bub;
this.cancelable=can;
};
}
}
}
return evt;
};
hookupDOMEventsOn(window);
hookupDOMEventsOn(document);
window.addEventListener("load",function(){
var all=document.all;
for(var i=0;i<all.length;i++){
hookupDOMEventsOn(all[i]);
}
var _38=["click","mouseover","mouseout","mousemove"];
for(var i=0;i<_38.length;i++){
document.addEventListener(_38[i],function(){
},false);
}
},false);
var _39=function(){
unhookDOMEventsFrom(window);
unhookDOMEventsFrom(document);
var all=document.all;
for(var i=0;i<all.length;i++){
unhookDOMEventsFrom(all[i]);
}
document.createEvent=document.IEtoW3C_createElement=document.createElement=IEtoW3C=null;
};
window.addEventListener("unload",function(){
window.addEventListener("unload",_39,false);
},false);
document.IEtoW3C_createElement=document.createElement;
document.createElement=function(_3c){
var _3d=document.IEtoW3C_createElement(_3c);
hookupDOMEventsOn(_3d);
return _3d;
};
}
if(!document.implementation){
document.implementation={hasFeature:function(_3e,_3f){
},createDocumentType:function(_40,_41,_42){
}};
}
var _43=(document.documentElement&&document.documentElement.namespaceURI)?true:false;
if(_43&&!document.createElementNS&&document.createElement){
document.createElementNS=function(ns,_45){
var elt=document.createElement(_45);
elt.namespaceURI=ns;
return elt;
};
}
if(_43&&!document.getElementsByTagNameNS&&document.getElementsByTagName){
function hookupNamespaceMethodsOn(elt){
elt.getElementsByTagNameNS=function(ns,_49){
var _4a=this.getElementsByTagName(_49);
var _4b=[];
for(var i=0;i<_4a.length;i++){
if(_4a[i].namespaceURI==ns){
_4b[_4b.length]=_4a[i];
}
}
return _4b;
};
}
window.addEventListener("load",function(evt){
var all=document.all;
for(var i=0;i<all.length;i++){
hookupNamespaceMethodsOn(all[i]);
}
hookupNamespaceMethodsOn(document);
},false);
}
if(!document.defaultView){
document.defaultView=window;
}
if(!window.getComputedStyle){
window.getComputedStyle=function(elt,_51){
return {getPropertyValue:function(_52){
var _53=elt["offset"+_52.charAt(0).toUpperCase()+_52.substring(1)];
if(_53){
return _53+"px";
}
if(elt.currentStyle){
var _54="";
for(var i=0;i<_52.length;i++){
if(_52.charAt(i)=="-"){
_54+=_52.charAt(++i).toUpperCase();
}else{
_54+=_52.charAt(i);
}
}
return elt.currentStyle[_54];
}
return elt.style[_54];
}};
};
}
})();

