Changeset 5700

Show
Ignore:
Timestamp:
03/12/08 13:28:50 (9 months ago)
Author:
kinoshita
Message:

2111

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinelz/trunk/compress/javascripts/spinelz_lib/spinelz_util.js

    r5693 r5700  
    1818_c=($(_c)||document.body); 
    1919var _f=_c.childNodes; 
    20 var _10=[]; 
    21 for(var i=0;i<_f.length;i++){ 
     20var _10=_f.length; 
     21var _11=[]; 
     22for(var i=0;i<_10;i++){ 
    2223if(_f[i].nodeType==_d){ 
    23 _10.push(_f[i]); 
     24_11.push(_f[i]); 
    2425} 
    2526if(_e&&Element.isElementNode(_f[i])){ 
    26 _10=_10.concat(this.getElementsByNodeType(_f[i],_d,_e)); 
    27 } 
    28 } 
    29 return _10
    30 },getParentByClassName:function(_12,_13){ 
    31 var _14=_13.parentNode; 
    32 if(!_14||(_14.tagName=="BODY")){ 
     27_11=_11.concat(this.getElementsByNodeType(_f[i],_d,_e)); 
     28} 
     29} 
     30return _11
     31},getParentByClassName:function(_13,_14){ 
     32var _15=_14.parentNode; 
     33if(!_15||(_15.tagName=="BODY")){ 
    3334return null; 
    3435}else{ 
    35 if(!_14.className){ 
    36 return Element.getParentByClassName(_12,_14); 
    37 }else{ 
    38 if(Element.hasClassName(_14,_12)){ 
    39 return _14
    40 }else{ 
    41 return Element.getParentByClassName(_12,_14); 
    42 } 
    43 } 
    44 } 
    45 },getParentByTagName:function(_15,_16){ 
    46 var _17=_16.parentNode; 
    47 if(_17.tagName=="BODY"){ 
     36if(!_15.className){ 
     37return Element.getParentByClassName(_13,_15); 
     38}else{ 
     39if(Element.hasClassName(_15,_13)){ 
     40return _15
     41}else{ 
     42return Element.getParentByClassName(_13,_15); 
     43} 
     44} 
     45} 
     46},getParentByTagName:function(_16,_17){ 
     47var _18=_17.parentNode; 
     48if(_18.tagName=="BODY"){ 
    4849return null; 
    4950} 
    50 var _18=_15.join("/").toUpperCase().indexOf(_17.tagName.toUpperCase(),0); 
    51 if(_18>=0){ 
    52 return _17; 
    53 }else{ 
    54 return Element.getParentByTagName(_15,_17); 
    55 
    56 },getFirstElementByClassNames:function(_19,_1a,_1b){ 
    57 if(!_19||!((typeof (_1a)=="object")&&(_1a.constructor==Array))){ 
     51var _19=_16.join("/").toUpperCase().indexOf(_18.tagName.toUpperCase(),0); 
     52if(_19>=0){ 
     53return _18; 
     54}else{ 
     55return Element.getParentByTagName(_16,_18); 
     56
     57},getFirstElementNode:function(_1a){ 
     58return $A(($(_1a)||document.body).childNodes).detect(function(_1b){ 
     59return Element.isElementNode(_1b); 
     60}); 
     61},getFirstElementByClassNames:function(_1c,_1d,_1e){ 
     62if(!_1c||!((typeof (_1d)=="object")&&(_1d.constructor==Array))){ 
    5863return; 
    5964} 
    60 _19=(_19||document.body); 
    61 var _1c=_19.childNodes; 
    62 for(var i=0;i<_1c.length;i++){ 
    63 for(var j=0;j<_1a.length;j++){ 
    64 if(!Element.isElementNode(_1c[i])){ 
     65_1c=(_1c||document.body); 
     66var _1f=_1c.childNodes; 
     67for(var i=0;i<_1f.length;i++){ 
     68for(var j=0;j<_1d.length;j++){ 
     69if(!Element.isElementNode(_1f[i])){ 
    6570continue; 
    6671}else{ 
    67 if(Element.hasClassName(_1c[i],_1a[j])){ 
    68 return _1c[i]; 
    69 }else{ 
    70 if(_1b){ 
    71 var _1f=this.getFirstElementByClassNames(_1c[i],_1a,_1b); 
    72 if(_1f){ 
    73 return _1f
     72if(Element.hasClassName(_1f[i],_1d[j])){ 
     73return _1f[i]; 
     74}else{ 
     75if(_1e){ 
     76var _22=this.getFirstElementByClassNames(_1f[i],_1d,_1e); 
     77if(_22){ 
     78return _22
    7479} 
    7580} 
     
    7984} 
    8085return; 
    81 },getElementsByClassNames:function(_20,_21){ 
    82 if(!_20||!((typeof (_21)=="object")&&(_21.constructor==Array))){ 
     86},getElementsByClassNames:function(_23,_24){ 
     87if(!_23||!((typeof (_24)=="object")&&(_24.constructor==Array))){ 
    8388return; 
    8489} 
    85 var _22=[]; 
    86 _21.each(function(c){ 
    87 _22=_22.concat(document.getElementsByClassName(c,_20)); 
    88 }); 
    89 return _22
     90var _25=[]; 
     91_24.each(function(c){ 
     92_25=_25.concat(document.getElementsByClassName(c,_23)); 
     93}); 
     94return _25
    9095},getWindowHeight:function(){ 
    9196if(window.innerHeight){ 
     
    106111} 
    107112return 0; 
    108 },getMaxZindex:function(_24){ 
    109 _24=$(_24); 
    110 if(!_24){ 
    111 _24=document.body; 
    112 } 
    113 if(!Element.isElementNode(_24)){ 
     113},getMaxZindex:function(_27){ 
     114_27=$(_27); 
     115if(!_27){ 
     116_27=document.body; 
     117} 
     118if(!Element.isElementNode(_27)){ 
    114119return 0; 
    115120} 
    116 var _25=0; 
    117 if(_24.style){ 
    118 _25=parseInt(Element.getStyle(_24,"z-index")); 
    119 
    120 if(isNaN(_25)){ 
    121 _25=0; 
    122 
    123 var _26=0; 
    124 var _27=_24.childNodes; 
    125 for(var i=0;i<_27.length;i++){ 
    126 if(_27[i]&&_27[i].tagName){ 
    127 _26=Element.getMaxZindex(_27[i]); 
    128 if(_25<_26){ 
    129 _25=_26; 
    130 
    131 
    132 
    133 return _25; 
    134 },select:function(_29,_2a){ 
    135 $A($(_29).options).each(function(opt){ 
    136 opt.selected=(opt.value==_2a); 
    137 }); 
    138 },selectAll:function(_2c){ 
     121var _28=0; 
     122if(_27.style){ 
     123_28=parseInt(Element.getStyle(_27,"z-index")); 
     124
     125if(isNaN(_28)){ 
     126_28=0; 
     127
     128var _29=0; 
     129var _2a=_27.childNodes; 
     130for(var i=0;i<_2a.length;i++){ 
     131if(_2a[i]&&_2a[i].tagName){ 
     132_29=Element.getMaxZindex(_2a[i]); 
     133if(_28<_29){ 
     134_28=_29; 
     135
     136
     137
     138return _28; 
     139},select:function(_2c,_2d){ 
    139140$A($(_2c).options).each(function(opt){ 
     141opt.selected=(opt.value==_2d); 
     142}); 
     143},selectAll:function(_2f){ 
     144$A($(_2f).options).each(function(opt){ 
    140145opt.selected=true; 
    141146}); 
    142 },removeOptions:function(_2e){ 
    143 $A($(_2e).options).each(function(opt){ 
     147},removeOptions:function(_31){ 
     148$A($(_31).options).each(function(opt){ 
    144149if(opt.selected){ 
    145150Element.remove(opt); 
    146151} 
    147152}); 
    148 },getSelectedOptions:function(_30){ 
    149 return $A($(_30).options).select(function(opt){ 
     153},getSelectedOptions:function(_33){ 
     154return $A($(_33).options).select(function(opt){ 
    150155return opt.selected; 
    151156}); 
    152 },check:function(_32,id){ 
    153 _32.each(function(_34){ 
    154 _34=$(_34); 
    155 if(_34){ 
    156 _34.checked=(_34.id==id); 
    157 } 
    158 }); 
    159 },outerHTML:function(_35){ 
    160 _35=$(_35); 
    161 var _36=""; 
    162 if(Element.isTextNode(_35)){ 
    163 _36=_35.nodeValue; 
    164 }else{ 
    165 if(Element.isElementNode(_35)){ 
    166 if(_35.outerHTML){ 
    167 _36=_35.outerHTML; 
    168 }else{ 
    169 var _37=[_35.tagName]; 
    170 var _38=_35.attributes; 
    171 if(_38){ 
    172 $A(_38).each(function(_39){ 
    173 _37.push(_39.name+"=\""+_39.value.escapeHTML().replace(/"/,"&quot;")+"\""); 
    174 }); 
    175 } 
    176 _36="<"+_37.join(" ")+">"+_35.innerHTML+"</"+_35.tagName+">"; 
    177 } 
    178 } 
    179 } 
    180 return _36
    181 },eventHTML:function(_3a){ 
    182 return $A(_3a.attributes).map(function(_3b){ 
    183 if(_3b.name.match(/^on(\w)+/)){ 
    184 return _3b.name+"=\""+_3b.value+"\""; 
     157},check:function(_35,id){ 
     158_35.each(function(_37){ 
     159_37=$(_37); 
     160if(_37){ 
     161_37.checked=(_37.id==id); 
     162} 
     163}); 
     164},outerHTML:function(_38){ 
     165_38=$(_38); 
     166var _39=""; 
     167if(Element.isTextNode(_38)){ 
     168_39=_38.nodeValue; 
     169}else{ 
     170if(Element.isElementNode(_38)){ 
     171if(_38.outerHTML){ 
     172_39=_38.outerHTML; 
     173}else{ 
     174var _3a=[_38.tagName]; 
     175var _3b=_38.attributes; 
     176if(_3b){ 
     177$A(_3b).each(function(_3c){ 
     178_3a.push(_3c.name+"=\""+_3c.value.escapeHTML().replace(/"/,"&quot;")+"\""); 
     179}); 
     180} 
     181_39="<"+_3a.join(" ")+">"+_38.innerHTML+"</"+_38.tagName+">"; 
     182} 
     183} 
     184} 
     185return _39
     186},eventHTML:function(_3d){ 
     187return $A(_3d.attributes).map(function(_3e){ 
     188if(_3e.name.match(/^on(\w)+/)){ 
     189return _3e.name+"=\""+_3e.value+"\""; 
    185190}else{ 
    186191return ""; 
    187192} 
    188193}).join(" "); 
    189 },attributeHTML:function(_3c,_3d){ 
    190 var _3e=""; 
    191 if(_3c[_3d]){ 
    192 _3e=_3c[_3d].toString().replace(/\'/g,"\""); 
    193 _3e=_3d+"='("+_3e+")()'"; 
    194 } 
    195 return _3e
    196 },replaceOptions:function(_3f,_40){ 
    197 _3f=$(_3f); 
    198 _3f.innerHTML=""; 
     194},attributeHTML:function(_3f,_40){ 
     195var _41=""; 
     196if(_3f[_40]){ 
     197_41=_3f[_40].toString().replace(/\'/g,"\""); 
     198_41=_40+"='("+_41+")()'"; 
     199} 
     200return _41
     201},replaceOptions:function(_42,_43){ 
     202_42=$(_42); 
     203_42.innerHTML=""; 
    199204var df=document.createDocumentFragment(); 
    200 _40.each(function(_42){ 
    201 df.appendChild(Builder.node("option",{value:_42.last()},[_42.first().unescapeHTML()])); 
    202 }); 
    203 $(_3f).appendChild(df); 
     205_43.each(function(_45){ 
     206df.appendChild(Builder.node("option",{value:_45.last()},[_45.first().unescapeHTML()])); 
     207}); 
     208$(_42).appendChild(df); 
    204209},body:function(){ 
    205210return document.documentElement||document.body; 
     
    208213},scrollLeft:function(){ 
    209214return Element.body().scrollLeft; 
    210 },appendToBody:function(_43){ 
    211 _43=$(_43); 
    212 Element.removeFromBody(_43.id); 
    213 document.body.appendChild(_43); 
    214 },removeFromBody:function(_44){ 
    215 $A(document.body.childNodes).each(function(_45){ 
    216 if(_45.id==_44){ 
    217 _45.remove(); 
     215},appendToBody:function(_46){ 
     216_46=$(_46); 
     217Element.removeFromBody(_46.id); 
     218document.body.appendChild(_46); 
     219},removeFromBody:function(_47){ 
     220$A(document.body.childNodes).each(function(_48){ 
     221if(_48.id==_47){ 
     222_48.remove(); 
    218223} 
    219224}); 
    220225}}); 
    221 Object.extend(Array.prototype,{insert:function(_46,_47){ 
    222 this.splice(_46,0,_47); 
    223 },remove:function(_48){ 
    224 this.splice(_48,1); 
     226Object.extend(Array.prototype,{insert:function(_49,_4a){ 
     227this.splice(_49,0,_4a); 
     228},remove:function(_4b){ 
     229this.splice(_4b,1); 
    225230}}); 
    226 Object.extend(String.prototype,{_mb_space:decodeURIComponent("%E3%80%80"),_rb:new RegExp(decodeURIComponent("[%E3%80%80]+$"),"gmi"),_rf:new RegExp(decodeURIComponent("^[%E3%80%80]+"),"gmi"),appendPrefix:function(_49,_4a){ 
    227 if(!_4a){ 
    228 _4a="_"; 
    229 } 
    230 return this+_4a+_49
    231 },appendSuffix:function(_4b,_4c){ 
    232 if(!_4c){ 
    233 _4c="_"; 
    234 } 
    235 return this+_4c+_4b
     231Object.extend(String.prototype,{_mb_space:decodeURIComponent("%E3%80%80"),_rb:new RegExp(decodeURIComponent("[%E3%80%80]+$"),"gmi"),_rf:new RegExp(decodeURIComponent("^[%E3%80%80]+"),"gmi"),appendPrefix:function(_4c,_4d){ 
     232if(!_4d){ 
     233_4d="_"; 
     234} 
     235return this+_4d+_4c
     236},appendSuffix:function(_4e,_4f){ 
     237if(!_4f){ 
     238_4f="_"; 
     239} 
     240return this+_4f+_4e
    236241},compressSpaces:function(){ 
    237242return this.normalizeSpaces().gsub(/\s+/," "); 
    238243},cutSpaces:function(){ 
    239244return this.normalizeSpaces().gsub(/[\s]/,""); 
    240 },getPrefix:function(_4d){ 
    241 if(!_4d){ 
    242 _4d="_"; 
    243 } 
    244 return this.split(_4d)[0]; 
    245 },getSuffix:function(_4e){ 
    246 if(!_4e){ 
    247 _4e="_"; 
    248 } 
    249 return this.split(_4e).pop(); 
     245},getPrefix:function(_50){ 
     246if(!_50){ 
     247_50="_"; 
     248} 
     249return this.split(_50)[0]; 
     250},getSuffix:function(_51){ 
     251if(!_51){ 
     252_51="_"; 
     253} 
     254return this.split(_51).pop(); 
    250255},normalizeSpaces:function(){ 
    251256return this.gsub(this._mb_space," "); 
     
    253258return this.strip().gsub(this._rf,"").gsub(this._rb,""); 
    254259},toElement:function(){ 
    255 var _4f=document.createElement("div"); 
    256 _4f.innerHTML=this; 
    257 return _4f.firstChild; 
     260var _52=document.createElement("div"); 
     261_52.innerHTML=this; 
     262return _52.firstChild; 
    258263}}); 
    259264var CssUtil=Class.create(); 
    260 CssUtil.getInstance=function(_50,_51){ 
    261 var _52=CssUtil.appendPrefix(_50,_51); 
    262 return new CssUtil([_51,_52]); 
     265CssUtil.getInstance=function(_53,_54){ 
     266var _55=CssUtil.appendPrefix(_53,_54); 
     267return new CssUtil([_54,_55]); 
    263268}; 
    264 CssUtil.appendPrefix=function(_53,_54){ 
    265 var _55={}; 
    266 $H(_54).each(function(_56){ 
    267 _55[_56[0]]=_53+_54[_56[0]]; 
    268 }); 
    269 return _55
     269CssUtil.appendPrefix=function(_56,_57){ 
     270var _58={}; 
     271$H(_57).each(function(_59){ 
     272_58[_59[0]]=_56+_57[_59[0]]; 
     273}); 
     274return _58
    270275}; 
    271 CssUtil.getCssRules=function(_57){ 
    272 return _57.rules||_57.cssRules; 
     276CssUtil.getCssRules=function(_5a){ 
     277return _5a.rules||_5a.cssRules; 
    273278}; 
    274 CssUtil.getCssRuleBySelectorText=function(_58){ 
    275 var _59=null; 
     279CssUtil.getCssRuleBySelectorText=function(_5b){ 
     280var _5c=null; 
    276281$A(document.styleSheets).each(function(s){ 
    277 var _5b=CssUtil.getCssRules(s); 
    278 _59=$A(_5b).detect(function(r){ 
     282var _5e=CssUtil.getCssRules(s); 
     283_5c=$A(_5e).detect(function(r){ 
    279284if(!r.selectorText){ 
    280285return false; 
    281286} 
    282 return r.selectorText.toLowerCase()==_58.toLowerCase(); 
    283 }); 
    284 if(_59){ 
     287return r.selectorText.toLowerCase()==_5b.toLowerCase(); 
     288}); 
     289if(_5c){ 
    285290throw $break; 
    286291} 
    287292}); 
    288 return _59
     293return _5c
    289294}; 
    290 CssUtil.prototype={initialize:function(_5d){ 
    291 if(!((typeof (_5d)=="object")&&(_5d.constructor==Array))){ 
     295CssUtil.prototype={initialize:function(_60){ 
     296if(!((typeof (_60)=="object")&&(_60.constructor==Array))){ 
    292297throw "CssUtil#initialize: argument must be a Array object!"; 
    293298} 
    294 this.styles=_5d
     299this.styles=_60
    295300},getClasses:function(key){ 
    296301return this.styles.collect(function(s){ 
     
    300305return this.getClasses(key).join(" "); 
    301306},allJoinClassNames:function(){ 
    302 var _61={}; 
    303 $H(this.styles.first()).each(function(_62){ 
    304 _61[_62.key]=this.joinClassNames(_62.key); 
     307var _64={}; 
     308$H(this.styles.first()).each(function(_65){ 
     309_64[_65.key]=this.joinClassNames(_65.key); 
    305310}.bind(this)); 
    306 return _61
    307 },addClassNames:function(_63,key){ 
     311return _64
     312},addClassNames:function(_66,key){ 
    308313this.styles.each(function(s){ 
    309 Element.addClassName(_63,s[key]); 
    310 }); 
    311 },removeClassNames:function(_66,key){ 
     314Element.addClassName(_66,s[key]); 
     315}); 
     316},removeClassNames:function(_69,key){ 
    312317this.styles.each(function(s){ 
    313 Element.removeClassName(_66,s[key]); 
    314 }); 
    315 },refreshClassNames:function(_69,key){ 
    316 _69.className=""; 
    317 this.addClassNames(_69,key); 
    318 },hasClassName:function(_6b,key){ 
     318Element.removeClassName(_69,s[key]); 
     319}); 
     320},refreshClassNames:function(_6c,key){ 
     321_6c.className=""; 
     322this.addClassNames(_6c,key); 
     323},hasClassName:function(_6e,key){ 
    319324return this.styles.any(function(s){ 
    320 return Element.hasClassName(_6b,s[key]); 
     325return Element.hasClassName(_6e,s[key]); 
    321326}); 
    322327}}; 
    323328var Hover=Class.create(); 
    324 Hover.prototype={initialize:function(_6e){ 
     329Hover.prototype={initialize:function(_71){ 
    325330this.options=Object.extend({defaultClass:"",hoverClass:"",cssUtil:"",list:false,beforeToggle:function(){ 
    326331return true; 
    327332}},arguments[1]||{}); 
    328 var _6e=$(_6e); 
     333var _71=$(_71); 
    329334if(this.options.list){ 
    330 var _6f=_6e.childNodes; 
    331 for(var i=0;i<_6f.length;i++){ 
    332 if(Element.isElementNode(_6f[i])){ 
    333 this.build(_6f[i]); 
    334 } 
    335 } 
    336 }else{ 
    337 this.build(_6e); 
    338 } 
    339 this.element=_6e
    340 },build:function(_71){ 
    341 this.normal=this.getNormalClass(_71); 
     335var _72=_71.childNodes; 
     336for(var i=0;i<_72.length;i++){ 
     337if(Element.isElementNode(_72[i])){ 
     338this.build(_72[i]); 
     339} 
     340} 
     341}else{ 
     342this.build(_71); 
     343} 
     344this.element=_71
     345},build:function(_74){ 
     346this.normal=this.getNormalClass(_74); 
    342347this.hover=this.getHoverClass(this.normal); 
    343348if(this.options.cssUtil){ 
     
    345350this.hover=this.options.cssUtil.joinClassNames(hover); 
    346351} 
    347 this.setHoverEvent(_71); 
    348 },setHoverEvent:function(_72){ 
    349 this.mouseout=this.toggle.bindAsEventListener(this,_72,this.normal); 
    350 this.mouseover=this.toggle.bindAsEventListener(this,_72,this.hover); 
    351 Event.observe(_72,"mouseout",this.mouseout); 
    352 Event.observe(_72,"mouseover",this.mouseover); 
    353 },toggle:function(_73,_74,_75){ 
    354 Event.stop(_73); 
     352this.setHoverEvent(_74); 
     353},setHoverEvent:function(_75){ 
     354this.mouseout=this.toggle.bindAsEventListener(this,_75,this.normal); 
     355this.mouseover=this.toggle.bindAsEventListener(this,_75,this.hover); 
     356Event.observe(_75,"mouseout",this.mouseout); 
     357Event.observe(_75,"mouseover",this.mouseover); 
     358},toggle:function(_76,_77,_78){ 
     359Event.stop(_76); 
    355360if(this.options.beforeToggle()){ 
    356 _74.className=_75
    357 } 
    358 },getNormalClass:function(_76){ 
    359 var _77=(this.options.defaultClass||_76.className); 
    360 return (_77||""); 
    361 },getHoverClass:function(_78){ 
    362 var _79=this.options.hoverClass; 
    363 if(!_79){ 
    364 _79=_78.split(" ").collect(function(c){ 
     361_77.className=_78
     362} 
     363},getNormalClass:function(_79){ 
     364var _7a=(this.options.defaultClass||_79.className); 
     365return (_7a||""); 
     366},getHoverClass:function(_7b){ 
     367var _7c=this.options.hoverClass; 
     368if(!_7c){ 
     369_7c=_7b.split(" ").collect(function(c){ 
    365370return c+"Hover"; 
    366371}).join(" "); 
    367372} 
    368 return _79
     373return _7c
    369374},destroy:function(){ 
    370375Event.stopObserving(this.element,"mouseout",this.mouseout); 
     
    378383Object.extend(Date.prototype,{msPerDay:function(){ 
    379384return 24*60*60*1000; 
    380 },advance:function(_7b){ 
    381 return new Date(this.getTime()+this.msPerDay()*_7b.days); 
     385},advance:function(_7e){ 
     386return new Date(this.getTime()+this.msPerDay()*_7e.days); 
    382387},days:function(){ 
    383 var _7c=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0); 
    384 return Math.round(_7c.getTime()/this.msPerDay()); 
     388var _7f=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0); 
     389return Math.round(_7f.getTime()/this.msPerDay()); 
    385390},toHash:function(){ 
    386391return {year:this.getFullYear(),month:this.getMonth(),day:this.getDate(),hour:this.getHours(),min:this.getMinutes(),sec:this.getSeconds()}; 
    387 },sameYear:function(_7d){ 
    388 return this.getFullYear()==_7d.getFullYear(); 
    389 },sameMonth:function(_7e){ 
    390 return this.sameYear(_7e)&&this.getMonth()==_7e.getMonth(); 
    391 },sameDate:function(_7f){ 
    392 return this.sameYear(_7f)&&this.sameMonth(_7f)&&this.getDate()==_7f.getDate(); 
    393 },betweenDate:function(_80,_81){ 
    394 var _82=this.days(); 
    395 return (_80.days()<=_82&&_82<=_81.days()); 
    396 },betweenTime:function(_83,_84){ 
    397 var _85=this.getTime(); 
    398 return (_83.getTime()<=_85&&_85<=_84.getTime()); 
    399 },strftime:function(_86){ 
    400 return DateUtil.simpleFormat(_86)(this); 
     392},sameYear:function(_80){ 
     393return this.getFullYear()==_80.getFullYear(); 
     394},sameMonth:function(_81){ 
     395return this.sameYear(_81)&&this.getMonth()==_81.getMonth(); 
     396},sameDate:function(_82){ 
     397return this.sameYear(_82)&&this.sameMonth(_82)&&this.getDate()==_82.getDate(); 
     398},betweenDate:function(_83,_84){ 
     399var _85=this.days(); 
     400return (_83.days()<=_85&&_85<=_84.days()); 
     401},betweenTime:function(_86,_87){ 
     402var _88=this.getTime(); 
     403return (_86.getTime()<=_88&&_88<=_87.getTime()); 
     404},strftime:function(_89){ 
     405return DateUtil.simpleFormat(_89)(this); 
    401406}}); 
    402 var DateUtil={dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],daysOfMonth:[31,28,31,30,31,30,31,31,30,31,30,31],numberOfDays:function(_87,_88){ 
    403 return _88.days()-_87.days(); 
    404 },isLeapYear:function(_89){ 
    405 if(((_89%4==0)&&(_89%100!=0))||(_89%400==0)){ 
     407var DateUtil={dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],daysOfMonth:[31,28,31,30,31,30,31,31,30,31,30,31],numberOfDays:function(_8a,_8b){ 
     408return _8b.days()-_8a.days(); 
     409},isLeapYear:function(_8c){ 
     410if(((_8c%4==0)&&(_8c%100!=0))||(_8c%400==0)){ 
    406411return true; 
    407412} 
    408413return false; 
    409 },nextDate:function(_8a){ 
    410 return new Date(_8a.getFullYear(),_8a.getMonth(),_8a.getDate()+1); 
    411 },previousDate:function(_8b){ 
    412 return new Date(_8b.getFullYear(),_8b.getMonth(),_8b.getDate()-1); 
    413 },afterDays:function(_8c,_8d){ 
    414 return new Date(_8c.getFullYear(),_8c.getMonth(),_8c.getDate()+_8d); 
    415 },getLastDate:function(_8e,_8f){ 
    416 var _90=this.daysOfMonth[_8f]; 
    417 if((_8f==1)&&this.isLeapYear(_8e)){ 
    418 return new Date(_8e,_8f,_90+1); 
    419 } 
    420 return new Date(_8e,_8f,_90); 
    421 },getFirstDate:function(_91,_92){ 
    422 if(_91.constructor==Date){ 
    423 return new Date(_91.getFullYear(),_91.getMonth(),1); 
    424 } 
    425 return new Date(_91,_92,1); 
    426 },getWeekTurn:function(_93,_94){ 
    427 var _95=6-_94+1; 
    428 var _96=0; 
    429 while(_95<_93){ 
    430 _93-=7; 
    431 _96++; 
    432 } 
    433 return _96
    434 },toDateString:function(_97){ 
    435 return _97.toDateString(); 
    436 },toLocaleDateString:function(_98){ 
    437 return _98.toLocaleDateString(); 
    438 },simpleFormat:function(_99){ 
    439 return function(_9a){ 
    440 var _9b=_99.replace(/M+/g,DateUtil.zerofill((_9a.getMonth()+1).toString(),2)); 
    441 _9b=_9b.replace(/d+/g,DateUtil.zerofill(_9a.getDate().toString(),2)); 
    442 _9b=_9b.replace(/y{4}/g,_9a.getFullYear()); 
    443 _9b=_9b.replace(/y{1,3}/g,new String(_9a.getFullYear()).substr(2)); 
    444 _9b=_9b.replace(/E+/g,DateUtil.dayOfWeek[_9a.getDay()]); 
    445 return _9b
     414},nextDate:function(_8d){ 
     415return new Date(_8d.getFullYear(),_8d.getMonth(),_8d.getDate()+1); 
     416},previousDate:function(_8e){ 
     417return new Date(_8e.getFullYear(),_8e.getMonth(),_8e.getDate()-1); 
     418},afterDays:function(_8f,_90){ 
     419return new Date(_8f.getFullYear(),_8f.getMonth(),_8f.getDate()+_90); 
     420},getLastDate:function(_91,_92){ 
     421var _93=this.daysOfMonth[_92]; 
     422if((_92==1)&&this.isLeapYear(_91)){ 
     423return new Date(_91,_92,_93+1); 
     424} 
     425return new Date(_91,_92,_93); 
     426},getFirstDate:function(_94,_95){ 
     427if(_94.constructor==Date){ 
     428return new Date(_94.getFullYear(),_94.getMonth(),1); 
     429} 
     430return new Date(_94,_95,1); 
     431},getWeekTurn:function(_96,_97){ 
     432var _98=6-_97+1; 
     433var _99=0; 
     434while(_98<_96){ 
     435_96-=7; 
     436_99++; 
     437} 
     438return _99
     439},toDateString:function(_9a){ 
     440return _9a.toDateString(); 
     441},toLocaleDateString:function(_9b){ 
     442return _9b.toLocaleDateString(); 
     443},simpleFormat:function(_9c){ 
     444return function(_9d){ 
     445var _9e=_9c.replace(/M+/g,DateUtil.zerofill((_9d.getMonth()+1).toString(),2)); 
     446_9e=_9e.replace(/d+/g,DateUtil.zerofill(_9d.getDate().toString(),2)); 
     447_9e=_9e.replace(/y{4}/g,_9d.getFullYear()); 
     448_9e=_9e.replace(/y{1,3}/g,new String(_9d.getFullYear()).substr(2)); 
     449_9e=_9e.replace(/E+/g,DateUtil.dayOfWeek[_9d.getDay()]); 
     450return _9e
    446451}; 
    447 },zerofill:function(_9c,_9d){ 
    448 var _9e=_9c
    449 if(_9c.length<_9d){ 
    450 var tmp=_9d-_9c.length; 
     452},zerofill:function(_9f,_a0){ 
     453var _a1=_9f
     454if(_9f.length<_a0){ 
     455var tmp=_a0-_9f.length; 
    451456for(i=0;i<tmp;i++){ 
    452 _9e="0"+_9e
    453 } 
    454 } 
    455 return _9e
    456 },toDate:function(_a0){ 
    457 return new Date(_a0.year,_a0.month,_a0.day,_a0.hour||0,_a0.min||0,_a0.sec||0); 
     457_a1="0"+_a1
     458} 
     459} 
     460return _a1
     461},toDate:function(_a3){ 
     462return new Date(_a3.year,_a3.month,_a3.day,_a3.hour||0,_a3.min||0,_a3.sec||0); 
    458463}}; 
    459 var ZindexManager={zIndex:1000,getIndex:function(_a1){ 
    460 if(_a1){ 
    461 if(isNaN(_a1)){ 
    462 _a1=Element.getMaxZindex()+1; 
    463 }else{ 
    464 if(ZindexManager.zIndex>_a1){ 
    465 _a1=ZindexManager.zIndex; 
    466 } 
    467 } 
    468 }else{ 
    469 _a1=ZindexManager.zIndex; 
    470 } 
    471 ZindexManager.zIndex=_a1+1; 
    472 return _a1
     464var ZindexManager={zIndex:1000,getIndex:function(_a4){ 
     465if(_a4){ 
     466if(isNaN(_a4)){ 
     467_a4=Element.getMaxZindex()+1; 
     468}else{ 
     469if(ZindexManager.zIndex>_a4){ 
     470_a4=ZindexManager.zIndex; 
     471} 
     472} 
     473}else{ 
     474_a4=ZindexManager.zIndex; 
     475} 
     476ZindexManager.zIndex=_a4+1; 
     477return _a4
    473478}}; 
    474 var Modal={maskId:"modalMask",maskClass:"modal_mask",maskClassIE:"modal_mask_ie",element:null,snaps:null,listener:null,resizeListener:null,cover:null,excepteds:null,maskCallbacks:[],unmaskCallbacks:[],count:0,tabKey:9,timer:null,mask:function(_a2,_a3,_a4){ 
    475 this._mask.callAfterLoading(this,_a2,_a3,_a4); 
     479var Modal={maskId:"modalMask",maskClass:"modal_mask",maskClassIE:"modal_mask_ie",element:null,snaps:null,listener:null,resizeListener:null,cover:null,excepteds:null,maskCallbacks:[],unmaskCallbacks:[],count:0,tabKey:9,timer:null,mask:function(_a5,_a6,_a7){ 
     480this._mask.callAfterLoading(this,_a5,_a6,_a7); 
    476481this._control_tab_key(); 
    477482},unmask:function(){ 
     
    480485},unmaskAll:function(){ 
    481486var max=10; 
    482 var _a6=0; 
    483 while(this._isMasked()&&(_a6<max)){ 
     487var _a9=0; 
     488while(this._isMasked()&&(_a9<max)){ 
    484489this._unmask(); 
    485 _a6++; 
     490_a9++; 
    486491} 
    487492this._control_tab_key(); 
    488 },addMaskCallback:function(_a7){ 
     493},addMaskCallback:function(_aa){ 
    489494if(!this.maskCallbacks.any(function(c){ 
    490 return c==_a7
     495return c==_aa
    491496})){ 
    492 this.maskCallbacks.push(_a7); 
    493 } 
    494 },removeMaskCallback:function(_a9){ 
     497this.maskCallbacks.push(_aa); 
     498} 
     499},removeMaskCallback:function(_ac){ 
    495500this.maskCallbacks=this.maskCallbacks.reject(function(c){ 
    496 return c==_a9
     501return c==_ac
    497502}); 
    498503},clearMaskCallback:function(){ 
    499504this.maskCallbacks=[]; 
    500 },addUnmaskCallback:function(_ab){ 
     505},addUnmaskCallback:function(_ae){ 
    501506if(!this.unmaskCallbacks.any(function(c){ 
    502 return c==_ab
     507return c==_ae
    503508})){ 
    504 this.unmaskCallbacks.push(_ab); 
    505 } 
    506 },removeUnmaskCallback:function(_ad){ 
     509this.unmaskCallbacks.push(_ae); 
     510} 
     511},removeUnmaskCallback:function(_b0){ 
    507512this.unmaskCallbacks=this.unmaskCallbacks.reject(function(c){ 
    508 return c==_ad
     513return c==_b0
    509514}); 
    510515},clearUnmaskCallback:function(){ 
    511516this.unmaskCallbacks=[]; 
    512 },_mask:function(_af){ 
    513 var _b0=Object.extend({cssPrefix:"custom_",zIndex:null},arguments[1]||{}); 
    514 var _b1=arguments[2]; 
     517},_mask:function(_b2){ 
     518var _b3=Object.extend({cssPrefix:"custom_",zIndex:null},arguments[1]||{}); 
     519var _b4=arguments[2]; 
    515520if(Modal.element){ 
    516 Modal._snap(_af); 
     521Modal._snap(_b2); 
    517522Modal._rebuildMask(); 
    518523}else{ 
    519524Modal.snaps=[]; 
    520525Modal.excepteds=[]; 
    521 Modal._buildMask(_b0.cssPrefix); 
     526Modal._buildMask(_b3.cssPrefix); 
    522527Modal.cover=new IECover(Modal.element,{transparent:true}); 
    523528} 
    524 if(_b1){ 
     529if(_b4){ 
    525530Element.setStyle(Modal.element,{position:"absolute"}); 
    526531this._setModalPosition(); 
     
    529534} 
    530535} 
    531 Modal._setZindex(_af,_b0.zIndex); 
     536Modal._setZindex(_b2,_b3.zIndex); 
    532537Modal._setFullSize(); 
    533 if(!Modal.hasExcepted(_af)){ 
    534 Modal.excepteds.push(_af); 
     538if(!Modal.hasExcepted(_b2)){ 
     539Modal.excepteds.push(_b2); 
    535540} 
    536541this.count++; 
    537 this.maskCallbacks.each(function(_b2){ 
    538 _b2(_af); 
     542this.maskCallbacks.each(function(_b5){ 
     543_b5(_b2); 
    539544}); 
    540545},_unmask:function(){ 
     
    552557} 
    553558this.count++; 
    554 this.unmaskCallbacks.each(function(_b3){ 
    555 _b3(); 
     559this.unmaskCallbacks.each(function(_b6){ 
     560_b6(); 
    556561}); 
    557562},_setModalPosition:function(){ 
     
    583588},_isMasked:function(){ 
    584589return Modal.element&&Element.visible(Modal.element); 
    585 },_snap:function(_b4){ 
    586 var _b5=Element.getStyle(Modal.element,"zIndex"); 
    587 if(_b5&&Modal._isMasked()&&!Modal.hasExcepted(_b4)){ 
    588 Modal.snaps.push(_b5); 
    589 } 
    590 },_setZindex:function(_b6,_b7){ 
    591 _b7=ZindexManager.getIndex(_b7); 
    592 Element.setStyle(Modal.element,{zIndex:_b7}); 
    593 _b6=Element.makePositioned($(_b6)); 
    594 Element.setStyle(_b6,{zIndex:++_b7}); 
     590},_snap:function(_b7){ 
     591var _b8=Element.getStyle(Modal.element,"zIndex"); 
     592if(_b8&&Modal._isMasked()&&!Modal.hasExcepted(_b7)){ 
     593Modal.snaps.push(_b8); 
     594} 
     595},_setZindex:function(_b9,_ba){ 
     596_ba=ZindexManager.getIndex(_ba); 
     597Element.setStyle(Modal.element,{zIndex:_ba}); 
     598_b9=Element.makePositioned($(_b9)); 
     599Element.setStyle(_b9,{zIndex:++_ba}); 
    595600},_setFullSize:function(){ 
    596601Modal.element.setStyle({width:Element.getWindowWidth()+"px",height:Element.getWindowHeight()+"px"}); 
     
    598603Modal.cover.resetSize(); 
    599604} 
    600 },_buildMask:function(_b8){ 
    601 var _b9=Builder.node("div",{id:Modal.maskId}); 
    602 Modal._setClassNames(_b9,_b8); 
    603 document.body.appendChild(_b9); 
    604 Modal.element=_b9
     605},_buildMask:function(_bb){ 
     606var _bc=Builder.node("div",{id:Modal.maskId}); 
     607Modal._setClassNames(_bc,_bb); 
     608document.body.appendChild(_bc); 
     609Modal.element=_bc
    605610Modal._addEvent(); 
    606 },_setClassNames:function(_ba,_bb){ 
    607 var _bc=(UserAgent.isIE())?Modal.maskClassIE:Modal.maskClass; 
    608 Element.addClassName(_ba,_bc); 
    609 Element.addClassName(_ba,_bb+_bc); 
     611},_setClassNames:function(_bd,_be){ 
     612var _bf=(UserAgent.isIE())?Modal.maskClassIE:Modal.maskClass; 
     613Element.addClassName(_bd,_bf); 
     614Element.addClassName(_bd,_be+_bf); 
    610615},_rebuildMask:function(){ 
    611616document.body.appendChild(Modal.element); 
     
    618623return src.spinelzMaskResult; 
    619624} 
    620 var _be=false; 
    621 var _bf=this.excepteds.last(); 
    622 var _c0=src; 
    623 if(_bf&&Element.descendantOf(src,_bf)){ 
    624 _be=true; 
    625 }else{ 
    626 var _c1=Element.getStyle(Modal.element,"zIndex"); 
    627 var _c2=null; 
     625var _c1=false; 
     626var _c2=this.excepteds.last(); 
     627var _c3=src; 
     628if(_c2&&Element.descendantOf(src,_c2)){ 
     629_c1=true; 
     630}else{ 
     631var _c4=Element.getStyle(Modal.element,"zIndex"); 
     632var _c5=null; 
    628633while((src=src.parentNode)&&src!=document.body){ 
    629 if(src.style&&(_c2=Element.getStyle(src,"zIndex"))){ 
    630 _be=(_c2>_c1); 
     634if(src.style&&(_c5=Element.getStyle(src,"zIndex"))){ 
     635_c1=(_c5>_c4); 
    631636break; 
    632637} 
    633638} 
    634639} 
    635 _c0.spinelzMaskCount=this.count; 
    636 _c0.spinelzMaskResult=_be
    637 return _be
    638 },_handleEvent:function(_c3){ 
    639 var src=Event.element(_c3); 
    640 if(!(Modal._isOutOfModal(src)||(_c3.keyCode&&(_c3.keyCode==this.tabKey)))){ 
    641 Event.stop(_c3); 
    642 } 
    643 },_onResize:function(_c5){ 
     640_c3.spinelzMaskCount=this.count; 
     641_c3.spinelzMaskResult=_c1
     642return _c1
     643},_handleEvent:function(_c6){ 
     644var src=Event.element(_c6); 
     645if(!(Modal._isOutOfModal(src)||(_c6.keyCode&&(_c6.keyCode==this.tabKey)))){ 
     646Event.stop(_c6); 
     647} 
     648},_onResize:function(_c8){ 
    644649Modal._setFullSize(); 
    645 },hasExcepted:function(_c6){ 
    646 return (Modal.excepteds||[]).any(function(_c7){ 
    647 return _c7.id==_c6.id; 
    648 }); 
    649 },_control_tab_key:function(_c8){ 
    650 if(!_c8){ 
    651 _c8=$A(document.body.getElementsByTagName("form")); 
    652 } 
    653 _c8.each(function(_c9){ 
    654 if(!Modal._isOutOfModal(_c9)){ 
    655 Form.getElements(_c9).each(function(el){ 
     650},hasExcepted:function(_c9){ 
     651return (Modal.excepteds||[]).any(function(_ca){ 
     652return _ca.id==_c9.id; 
     653}); 
     654},_control_tab_key:function(_cb){ 
     655if(!_cb){ 
     656_cb=$A(document.body.getElementsByTagName("form")); 
     657} 
     658_cb.each(function(_cc){ 
     659if(!Modal._isOutOfModal(_cc)){ 
     660Form.getElements(_cc).each(function(el){ 
    656661el.tabIndex=-1; 
    657662}); 
    658663}else{ 
    659 Form.getElements(_c9).each(function(el){ 
     664Form.getElements(_cc).each(function(el){ 
    660665el.tabIndex=null; 
    661666}); 
     
    665670var IECover=Class.create(); 
    666671IECover.src="javascript:false;"; 
    667 IECover.prototype={idSuffix:"iecover",initialize:function(_cc){ 
     672IECover.prototype={idSuffix:"iecover",initialize:function(_cf){ 
    668673this.options=Object.extend({transparent:false,padding:0},arguments[1]||{}); 
    669674if(document.all){ 
    670 _cc=$(_cc); 
    671 this.id=_cc.id.appendSuffix(this.idSuffix); 
    672 this._build(_cc); 
     675_cf=$(_cf); 
     676this.id=_cf.id.appendSuffix(this.idSuffix); 
     677this._build(_cf); 
    673678this.resetSize(); 
    674679} 
    675680},resetSize:function(){ 
    676681if(this.element){ 
    677 var _cd=this.element.parentNode; 
    678 var _ce=this.options.padding; 
    679 this.element.width=_cd.offsetWidth-_ce+"px"; 
    680 this.element.height=Element.getHeight(_cd)-_ce+"px"; 
    681 } 
    682 },_build:function(_cf){ 
    683 var _d0=this.options.padding/2; 
    684 var _d1={position:"absolute",top:_d0+"px",left:_d0+"px"}; 
     682var _d0=this.element.parentNode; 
     683var _d1=this.options.padding; 
     684this.element.width=_d0.offsetWidth-_d1+"px"; 
     685this.element.height=Element.getHeight(_d0)-_d1+"px"; 
     686} 
     687},_build:function(_d2){ 
     688var _d3=this.options.padding/2; 
     689var _d4={position:"absolute",top:_d3+"px",left:_d3+"px"}; 
    685690if(this.options.transparent){ 
    686 _d1.filter="alpha(opacity=0)"; 
    687 } 
    688 if(_cf.buildedIECover&&$(this.id)){ 
     691_d4.filter="alpha(opacity=0)"; 
     692} 
     693if(_d2.buildedIECover&&$(this.id)){ 
    689694this.element=$(this.id); 
    690695}else{ 
    691696this.element=Builder.node("iframe",{src:IECover.src,id:this.id,frameborder:0}); 
    692697} 
    693 Element.setStyle(this.element,_d1); 
    694 var _d2=Element.down(_cf,0); 
    695 if(_d2){ 
    696 Element.makePositioned(_d2); 
    697 } 
    698 _cf.insertBefore(this.element,_cf.firstChild); 
    699 _cf.buildedIECover=true; 
     698Element.setStyle(this.element,_d4); 
     699var _d5=Element.down(_d2,0); 
     700if(_d5){ 
     701Element.makePositioned(_d5); 
     702} 
     703_d2.insertBefore(this.element,_d2.firstChild); 
     704_d2.buildedIECover=true; 
    700705}}; 
    701706var UserAgent={getUserAgent:function(){ 
     
    712717var ShortcutManager=Class.create(); 
    713718ShortcutManager.prototype={initialize:function(){ 
    714 var _d3={detectKeyup:false,initialStarted:true,preventDefault:true}; 
    715 this.options=Object.extend(_d3,arguments[0]||{}); 
     719var _d6={detectKeyup:false,initialStarted:true,preventDefault:true}; 
     720this.options=Object.extend(_d6,arguments[0]||{}); 
    716721this.keydownListener=this.eventKeydown.bindAsEventListener(this); 
    717722if(this.options.detectKeyup){ 
     
    739744Event.observe(document,"keyup",this.keyupListener); 
    740745} 
    741 },add:function(c1,c2,_d6){ 
     746},add:function(c1,c2,_d9){ 
    742747if(c1.constructor==Array){ 
    743 var _d7=this; 
    744 c1.each(function(_d8){ 
    745 _d7._add_or_remove_function(_d8[0],_d8[1],_d6); 
    746 }); 
    747 }else{ 
    748 this._add_or_remove_function(c1,c2,_d6); 
     748var _da=this; 
     749c1.each(function(_db){ 
     750_da._add_or_remove_function(_db[0],_db[1],_d9); 
     751}); 
     752}else{ 
     753this._add_or_remove_function(c1,c2,_d9); 
    749754} 
    750755},destroy:function(){ 
     
    753758Event.stopObserving(document,"keyup",this.keyupListener); 
    754759} 
    755 },eventKeydown:function(_d9){ 
     760},eventKeydown:function(_dc){ 
    756761if(this.executable){ 
    757 var _da
     762var _dd
    758763var key=""; 
    759 _d9=_d9||window.event; 
    760 if(_d9.keyCode){ 
    761 if(_d9.altKey){ 
     764_dc=_dc||window.event; 
     765if(_dc.keyCode){ 
     766if(_dc.altKey){ 
    762767key+="a"; 
    763768} 
    764 if(_d9.ctrlKey){ 
     769if(_dc.ctrlKey){ 
    765770key+="c"; 
    766771} 
    767 if(_d9.shiftKey){ 
     772if(_dc.shiftKey){ 
    768773key+="s"; 
    769774} 
     
    771776key="n"; 
    772777} 
    773 _da=this._mergeNumKey(_d9.keyCode); 
    774 if(this.keydownFunc[key][_da]){ 
    775 this.keydownFunc[key][_da](); 
    776 if(this.options.preventDefault){ 
    777 Event.stop(_d9); 
    778 } 
    779 } 
    780 } 
    781 } 
    782 },eventKeyup:function(_dc){ 
    783 if(this.executable){ 
    784 var _dd; 
    785 _dc=_dc||window.event; 
    786 if(_dc.keyCode){ 
    787778_dd=this._mergeNumKey(_dc.keyCode); 
    788 if(this.keyupFunc[_dd]){ 
    789 this.keyupFunc[_dd](); 
     779if(this.keydownFunc[key][_dd]){ 
     780this.keydownFunc[key][_dd](); 
    790781if(this.options.preventDefault){ 
    791782Event.stop(_dc); 
     
    794785} 
    795786} 
    796 },remove:function(_de){ 
    797 this._add_or_remove_function(_de); 
     787},eventKeyup:function(_df){ 
     788if(this.executable){ 
     789var _e0; 
     790_df=_df||window.event; 
     791if(_df.keyCode){ 
     792_e0=this._mergeNumKey(_df.keyCode); 
     793if(this.keyupFunc[_e0]){ 
     794this.keyupFunc[_e0](); 
     795if(this.options.preventDefault){ 
     796Event.stop(_df); 
     797
     798
     799
     800
     801},remove:function(_e1){ 
     802this._add_or_remove_function(_e1); 
    798803},start:function(){ 
    799804this.executable=true; 
    800805},stop:function(){ 
    801806this.executable=false; 
    802 },_add_or_remove_function:function(_df,_e0,_e1){ 
    803 var _e2
    804 var _e3=new Array(); 
    805 var _e4=this; 
    806 $A(_df.toLowerCase().split("+")).each(function(key){ 
     807},_add_or_remove_function:function(_e2,_e3,_e4){ 
     808var _e5
     809var _e6=new Array(); 
     810var _e7=this; 
     811$A(_e2.toLowerCase().split("+")).each(function(key){ 
    807812if(key=="alt"){ 
    808 _e3.push("a"); 
     813_e6.push("a"); 
    809814}else{ 
    810815if(key=="ctrl"){ 
    811 _e3.push("c"); 
     816_e6.push("c"); 
    812817}else{ 
    813818if(key=="shift"){ 
    814 _e3.push("s"); 
    815 }else{ 
    816 _e2=_e4.keyCode[key]; 
    817 } 
    818 } 
    819 } 
    820 }); 
    821 var key=_e3.sortBy(function(_e7,_e8){ 
    822 return _e7
     819_e6.push("s"); 
     820}else{ 
     821_e5=_e7.keyCode[key]; 
     822} 
     823} 
     824} 
     825}); 
     826var key=_e6.sortBy(function(_ea,_eb){ 
     827return _ea
    823828}).join(""); 
    824829if(key==""){ 
    825830key="n"; 
    826831} 
    827 if(_e0){ 
    828 if(_e1){ 
    829 this.keyupFunc[_e2]=_e0
    830 }else{ 
    831 this.keydownFunc[key][_e2]=_e0
    832 } 
    833 }else{ 
    834 if(_e1){ 
    835 this.keyupFunc[_e2]=null; 
    836 }else{ 
    837 this.keydownFunc[key][_e2]=null; 
    838 } 
    839 } 
    840 },_mergeNumKey:function(_e9){ 
    841 return (this.numKeys[_e9])?this.numKeys[_e9]:_e9
     832if(_e3){ 
     833if(_e4){ 
     834this.keyupFunc[_e5]=_e3
     835}else{ 
     836this.keydownFunc[key][_e5]=_e3
     837} 
     838}else{ 
     839if(_e4){ 
     840this.keyupFunc[_e5]=null; 
     841}else{ 
     842this.keydownFunc[key][_e5]=null; 
     843} 
     844} 
     845},_mergeNumKey:function(_ec){