Changeset 5904

Show
Ignore:
Timestamp:
08/05/08 13:17:33 (4 months ago)
Author:
kinoshita
Message:

5392

Files:

Legend:

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

    r5903 r5904  
    138138return _28; 
    139139},select:function(_2c,_2d){ 
    140 $A($(_2c).options).each(function(opt){ 
    141 opt.selected=(opt.value==_2d); 
    142 }); 
    143 },selectAll:function(_2f){ 
    144 $A($(_2f).options).each(function(opt){ 
    145 opt.selected=true; 
    146 }); 
    147 },removeOptions:function(_31){ 
    148 $A($(_31).options).each(function(opt){ 
    149 if(opt.selected){ 
    150 Element.remove(opt); 
    151 
    152 }); 
    153 },getSelectedOptions:function(_33){ 
    154 return $A($(_33).options).select(function(opt){ 
    155 return opt.selected; 
    156 }); 
    157 },check:function(_35,id){ 
    158 _35.each(function(_37){ 
    159 _37=$(_37); 
     140SelectElement.select(_2c,_2d); 
     141},selectAll:function(_2e){ 
     142SelectElement.selectAll(_2e); 
     143},removeOptions:function(_2f){ 
     144SelectElement.destroyAll(_2f); 
     145},getSelectedOptions:function(_30){ 
     146SelectElement.getSelelcted(_30); 
     147},check:function(_31,id){ 
     148_31.each(function(_33){ 
     149_33=$(_33); 
     150if(_33){ 
     151_33.checked=(_33.id==id); 
     152
     153}); 
     154},outerHTML:function(_34){ 
     155_34=$(_34); 
     156var _35=""; 
     157if(Element.isTextNode(_34)){ 
     158_35=_34.nodeValue; 
     159}else{ 
     160if(Element.isElementNode(_34)){ 
     161if(_34.outerHTML){ 
     162_35=_34.outerHTML; 
     163}else{ 
     164var _36=[_34.tagName]; 
     165var _37=_34.attributes; 
    160166if(_37){ 
    161 _37.checked=(_37.id==id); 
    162 
    163 }); 
    164 },outerHTML:function(_38){ 
    165 _38=$(_38); 
    166 var _39=""; 
    167 if(Element.isTextNode(_38)){ 
    168 _39=_38.nodeValue; 
    169 }else{ 
    170 if(Element.isElementNode(_38)){ 
    171 if(_38.outerHTML){ 
    172 _39=_38.outerHTML; 
    173 }else{ 
    174 var _3a=[_38.tagName]; 
    175 var _3b=_38.attributes; 
    176 if(_3b){ 
    177 $A(_3b).each(function(_3c){ 
    178 _3a.push(_3c.name+"=\""+_3c.value.escapeHTML().replace(/"/,""")+"\""); 
    179 }); 
    180 
    181 _39="<"+_3a.join(" ")+">"+_38.innerHTML+"</"+_38.tagName+">"; 
    182 
    183 
    184 
    185 return _39; 
    186 },eventHTML:function(_3d){ 
    187 return $A(_3d.attributes).map(function(_3e){ 
    188 if(_3e.name.match(/^on(\w)+/)){ 
    189 return _3e.name+"=\""+_3e.value+"\""; 
     167$A(_37).each(function(_38){ 
     168_36.push(_38.name+"=\""+_38.value.escapeHTML().replace(/"/,"&quot;")+"\""); 
     169}); 
     170
     171_35="<"+_36.join(" ")+">"+_34.innerHTML+"</"+_34.tagName+">"; 
     172
     173
     174
     175return _35; 
     176},eventHTML:function(_39){ 
     177return $A(_39.attributes).map(function(_3a){ 
     178if(_3a.name.match(/^on(\w)+/)){ 
     179return _3a.name+"=\""+_3a.value+"\""; 
    190180}else{ 
    191181return ""; 
    192182} 
    193183}).join(" "); 
    194 },attributeHTML:function(_3f,_40){ 
    195 var _41=""; 
    196 if(_3f[_40]){ 
    197 _41=_3f[_40].toString().replace(/\'/g,"\""); 
    198 _41=_40+"='("+_41+")()'"; 
    199 
    200 return _41; 
    201 },replaceOptions:function(_42,_43){ 
    202 _42=$(_42); 
    203 _42.innerHTML=""; 
    204 var df=document.createDocumentFragment(); 
    205 _43.each(function(_45){ 
    206 var _46=_45.first().unescapeHTML(); 
    207 var op=Builder.node("option",{value:_45.last()},[_46]); 
    208 op.title=_46; 
    209 df.appendChild(op); 
    210 }); 
    211 $(_42).appendChild(df); 
     184},attributeHTML:function(_3b,_3c){ 
     185var _3d=""; 
     186if(_3b[_3c]){ 
     187_3d=_3b[_3c].toString().replace(/\'/g,"\""); 
     188_3d=_3c+"='("+_3d+")()'"; 
     189
     190return _3d; 
     191},replaceOptions:function(_3e,_3f){ 
     192_3f=_3f.map(function(_40){ 
     193return {text:_40.first(),value:_40.last()}; 
     194}); 
     195SelectElement.replace(_3e,_3f); 
    212196},body:function(){ 
    213197return document.documentElement||document.body; 
     
    216200},scrollLeft:function(){ 
    217201return Element.body().scrollLeft; 
    218 },appendToBody:function(_48){ 
     202},appendToBody:function(_41){ 
    219203(function(){ 
    220 _48=$(_48); 
    221 Element.removeFromBody(_48.id); 
    222 document.body.appendChild(_48); 
     204_41=$(_41); 
     205Element.removeFromBody(_41.id); 
     206document.body.appendChild(_41); 
    223207}).callAfterLoading(this); 
    224 },removeFromBody:function(_49){ 
    225 $A(document.body.childNodes).each(function(_4a){ 
    226 if(_4a.id==_49){ 
    227 _4a.remove(); 
    228 } 
    229 }); 
    230 },positionedByCursor:function(_4b,_4c,_4d){ 
    231 _4d=Object.extend({top:0,left:0},_4d||{}); 
    232 var _4e=Element.getDimensions(_4b); 
    233 var x=Event.pointerX(_4c); 
    234 var _50=x+_4e.width+_4d.left; 
    235 var _51=Element.getWindowWidth()+Element.scrollLeft(); 
    236 if(_50>_51){ 
    237 x-=(_50-_51); 
    238 } 
    239 Element.setStyle(_4b,{position:"absolute",left:x+"px",top:Event.pointerY(_4c)+_4d.top+"px"}); 
    240 },alignTop:function(_52,_53,_54){ 
    241 if(!_54){ 
    242 _54=0; 
    243 } 
    244 var _55=Position.cumulativeOffset(Position.offsetParent($(_52))); 
    245 var _56=Position.cumulativeOffset($(_53)); 
    246 Element.setStyle(_52,{top:_56[1]-_55[1]+"px"}); 
    247 },alignRight:function(_57,_58,_59){ 
    248 if(!_59){ 
    249 _59=0; 
    250 } 
    251 var _5a=Position.cumulativeOffset(Position.offsetParent($(_57))); 
    252 var _5b=Position.cumulativeOffset($(_58)); 
    253 var _5c=Element.getDimensions(_58); 
    254 var _5d=Element.getDimensions(_57); 
    255 var _5e=Element.getWindowWidth()+Element.scrollLeft(); 
    256 var x=_5b[0]+_5c.width-_5a[0]+_59
    257 var _60=x+_5d.width; 
    258 if(_60>_5e){ 
    259 x-=(_5c.width+_5d.width); 
    260 } 
    261 Element.setStyle(_57,{left:x+"px"}); 
     208},removeFromBody:function(_42){ 
     209$A(document.body.childNodes).each(function(_43){ 
     210if(_43.id==_42){ 
     211_43.remove(); 
     212} 
     213}); 
     214},positionedByCursor:function(_44,_45,_46){ 
     215_46=Object.extend({top:0,left:0},_46||{}); 
     216var _47=Element.getDimensions(_44); 
     217var x=Event.pointerX(_45); 
     218var _49=x+_47.width+_46.left; 
     219var _4a=Element.getWindowWidth()+Element.scrollLeft(); 
     220if(_49>_4a){ 
     221x-=(_49-_4a); 
     222} 
     223Element.setStyle(_44,{position:"absolute",left:x+"px",top:Event.pointerY(_45)+_46.top+"px"}); 
     224},alignTop:function(_4b,_4c,_4d){ 
     225if(!_4d){ 
     226_4d=0; 
     227} 
     228var _4e=Position.cumulativeOffset(Position.offsetParent($(_4b))); 
     229var _4f=Position.cumulativeOffset($(_4c)); 
     230Element.setStyle(_4b,{top:_4f[1]-_4e[1]+"px"}); 
     231},alignRight:function(_50,_51,_52){ 
     232if(!_52){ 
     233_52=0; 
     234} 
     235var _53=Position.cumulativeOffset(Position.offsetParent($(_50))); 
     236var _54=Position.cumulativeOffset($(_51)); 
     237var _55=Element.getDimensions(_51); 
     238var _56=Element.getDimensions(_50); 
     239var _57=Element.getWindowWidth()+Element.scrollLeft(); 
     240var x=_54[0]+_55.width-_53[0]+_52
     241var _59=x+_56.width; 
     242if(_59>_57){ 
     243x-=(_55.width+_56.width); 
     244} 
     245Element.setStyle(_50,{left:x+"px"}); 
    262246}}); 
    263 Object.extend(Array.prototype,{insert:function(_61,_62){ 
    264 this.splice(_61,0,_62); 
    265 },remove:function(_63){ 
    266 this.splice(_63,1); 
     247SelectElement={select:function(_5a,_5b){ 
     248_5b=(_5b.constructor==Array)?_5b:[_5b]; 
     249$A($(_5a).options).each(function(opt){ 
     250opt.selected=_5b.include(opt.value); 
     251}); 
     252},selectAll:function(_5d){ 
     253$A($(_5d).options).each(function(opt){ 
     254opt.selected=true; 
     255}); 
     256},deselect:function(_5f,_60){ 
     257_60=(_60.constructor==Array)?_60:[_60]; 
     258$A($(_5f).options).each(function(opt){ 
     259if(opt.selected&&_60.include(opt.value)){ 
     260opt.selected=false; 
     261
     262}); 
     263},deselectAll:function(_62){ 
     264$A($(_62).options).each(function(opt){ 
     265opt.selected=false; 
     266}); 
     267},get:function(_64,_65){ 
     268_64=$(_64); 
     269_65=(_65.constructor==Array)?_65:[_65]; 
     270var _66=$A(_64.options).select(function(opt){ 
     271return _65.include(opt.value); 
     272}); 
     273return _64.multiple?_66:_66[0]; 
     274},getSelelcted:function(_68){ 
     275_68=$(_68); 
     276var _69=$A(_68.options).select(function(opt){ 
     277return opt.selected; 
     278}); 
     279return _68.multiple?_69:_69[0]; 
     280},append:function(_6b,_6c,_6d){ 
     281_6b=$(_6b); 
     282_6c=(_6c.constructor==Array)?_6c:[_6c]; 
     283if(_6d){ 
     284_6b.destroy(_6c.map(function(o){ 
     285return o.value; 
     286})); 
     287
     288var df=document.createDocumentFragment(); 
     289_6c.each(function(_70){ 
     290var _71=_70.text.unescapeHTML(); 
     291var _72=_70.title; 
     292if(_72){ 
     293delete _70.title; 
     294_72=_72.unescapeHTML(); 
     295}else{ 
     296_72=_71; 
     297
     298delete _70.text; 
     299var op=Builder.node("option",_70,[_71]); 
     300op.title=_72; 
     301_6b.appendChild(op); 
     302}); 
     303$(_6b).appendChild(df); 
     304},replace:function(_74,_75){ 
     305_74=$(_74); 
     306_74.destroyAll(); 
     307_74.append(_75); 
     308},destroy:function(_76,_77){ 
     309_77=(_77.constructor==Array)?_77:[_77]; 
     310$A($(_76).options).each(function(opt){ 
     311if(_77.include(opt.value)){ 
     312Element.remove(opt); 
     313
     314}); 
     315},destroySelected:function(_79){ 
     316_79=$(_79); 
     317$A(_79.options).each(function(opt){ 
     318if(opt.selected){ 
     319Element.remove(opt); 
     320if(!_79.multiple){ 
     321throw $break; 
     322
     323
     324}); 
     325},destroyAll:function(_7b){ 
     326$A($(_7b).options).each(function(opt){ 
     327Element.remove(opt); 
     328}); 
     329},cache:function(_7d){ 
     330_7d=$(_7d); 
     331var _7e=[]; 
     332$A(_7d.options).each(function(opt){ 
     333_7e.push({value:opt.value,text:opt.innerHTML}); 
     334}); 
     335_7d.optionsCache=_7e; 
     336},reset:function(_80){ 
     337_80=$(_80); 
     338if(_80.optionsCache){ 
     339_80.replace(_80.optionsCache.map(function(o){ 
     340return Object.clone(o); 
     341})); 
     342
     343}}; 
     344Object.extend(Array.prototype,{insert:function(_82,_83){ 
     345this.splice(_82,0,_83); 
     346},remove:function(_84){ 
     347this.splice(_84,1); 
    267348}}); 
    268 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(_64,_65){ 
    269 if(!_65){ 
    270 _65="_"; 
    271 } 
    272 return this+_65+_64
    273 },appendSuffix:function(_66,_67){ 
    274 if(!_67){ 
    275 _67="_"; 
    276 } 
    277 return this+_67+_66
     349Object.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(_85,_86){ 
     350if(!_86){ 
     351_86="_"; 
     352} 
     353return this+_86+_85
     354},appendSuffix:function(_87,_88){ 
     355if(!_88){ 
     356_88="_"; 
     357} 
     358return this+_88+_87
    278359},compressSpaces:function(){ 
    279360return this.normalizeSpaces().gsub(/\s+/," "); 
     
    287368} 
    288369return r; 
    289 },getPrefix:function(_6b){ 
    290 if(!_6b){ 
    291 _6b="_"; 
    292 } 
    293 return this.split(_6b)[0]; 
    294 },getSuffix:function(_6c){ 
    295 if(!_6c){ 
    296 _6c="_"; 
    297 } 
    298 return this.split(_6c).pop(); 
     370},getPrefix:function(_8c){ 
     371if(!_8c){ 
     372_8c="_"; 
     373} 
     374return this.split(_8c)[0]; 
     375},getSuffix:function(_8d){ 
     376if(!_8d){ 
     377_8d="_"; 
     378} 
     379return this.split(_8d).pop(); 
    299380},normalizeSpaces:function(){ 
    300381return this.gsub(this._mb_space," "); 
     
    302383return this.strip().gsub(this._rf,"").gsub(this._rb,""); 
    303384},toElement:function(){ 
    304 var _6d=document.createElement("div"); 
    305 _6d.innerHTML=this; 
    306 return _6d.firstChild; 
     385var _8e=document.createElement("div"); 
     386_8e.innerHTML=this; 
     387return _8e.firstChild; 
     388},toElements:function(){ 
     389var _8f=document.createElement("div"); 
     390_8f.innerHTML=this; 
     391return Element.getTagNodes(_8f); 
    307392}}); 
    308393var CssUtil=Class.create(); 
    309 CssUtil.getInstance=function(_6e,_6f){ 
    310 var _70=CssUtil.appendPrefix(_6e,_6f); 
    311 return new CssUtil([_6f,_70]); 
     394CssUtil.getInstance=function(_90,_91){ 
     395var _92=CssUtil.appendPrefix(_90,_91); 
     396return new CssUtil([_91,_92]); 
    312397}; 
    313 CssUtil.appendPrefix=function(_71,_72){ 
    314 var _73={}; 
    315 $H(_72).each(function(_74){ 
    316 _73[_74[0]]=_71+_72[_74[0]]; 
    317 }); 
    318 return _73
     398CssUtil.appendPrefix=function(_93,_94){ 
     399var _95={}; 
     400$H(_94).each(function(_96){ 
     401_95[_96[0]]=_93+_94[_96[0]]; 
     402}); 
     403return _95
    319404}; 
    320 CssUtil.getCssRules=function(_75){ 
    321 return _75.rules||_75.cssRules; 
     405CssUtil.getCssRules=function(_97){ 
     406return _97.rules||_97.cssRules; 
    322407}; 
    323 CssUtil.getCssRuleBySelectorText=function(_76){ 
    324 var _77=null; 
     408CssUtil.getCssRuleBySelectorText=function(_98){ 
     409var _99=null; 
    325410$A(document.styleSheets).each(function(s){ 
    326 var _79=CssUtil.getCssRules(s); 
    327 _77=$A(_79).detect(function(r){ 
     411var _9b=CssUtil.getCssRules(s); 
     412_99=$A(_9b).detect(function(r){ 
    328413if(!r.selectorText){ 
    329414return false; 
    330415} 
    331 return r.selectorText.toLowerCase()==_76.toLowerCase(); 
    332 }); 
    333 if(_77){ 
     416return r.selectorText.toLowerCase()==_98.toLowerCase(); 
     417}); 
     418if(_99){ 
    334419throw $break; 
    335420} 
    336421}); 
    337 return _77
     422return _99
    338423}; 
    339 CssUtil.prototype={initialize:function(_7b){ 
    340 if(!((typeof (_7b)=="object")&&(_7b.constructor==Array))){ 
     424CssUtil.prototype={initialize:function(_9d){ 
     425if(!((typeof (_9d)=="object")&&(_9d.constructor==Array))){ 
    341426throw "CssUtil#initialize: argument must be a Array object!"; 
    342427} 
    343 this.styles=_7b
     428this.styles=_9d
    344429},getClasses:function(key){ 
    345430return this.styles.collect(function(s){ 
     
    349434return this.getClasses(key).join(" "); 
    350435},allJoinClassNames:function(){ 
    351 var _7f={}; 
    352 $H(this.styles.first()).each(function(_80){ 
    353 _7f[_80.key]=this.joinClassNames(_80.key); 
     436var _a1={}; 
     437$H(this.styles.first()).each(function(_a2){ 
     438_a1[_a2.key]=this.joinClassNames(_a2.key); 
    354439}.bind(this)); 
    355 return _7f
    356 },addClassNames:function(_81,key){ 
     440return _a1
     441},addClassNames:function(_a3,key){ 
    357442this.styles.each(function(s){ 
    358 Element.addClassName(_81,s[key]); 
    359 }); 
    360 },removeClassNames:function(_84,key){ 
     443Element.addClassName(_a3,s[key]); 
     444}); 
     445},removeClassNames:function(_a6,key){ 
    361446this.styles.each(function(s){ 
    362 Element.removeClassName(_84,s[key]); 
    363 }); 
    364 },refreshClassNames:function(_87,key){ 
    365 _87.className=""; 
    366 this.addClassNames(_87,key); 
    367 },hasClassName:function(_89,key){ 
     447Element.removeClassName(_a6,s[key]); 
     448}); 
     449},refreshClassNames:function(_a9,key){ 
     450_a9.className=""; 
     451this.addClassNames(_a9,key); 
     452},hasClassName:function(_ab,key){ 
    368453return this.styles.any(function(s){ 
    369 return Element.hasClassName(_89,s[key]); 
     454return Element.hasClassName(_ab,s[key]); 
    370455}); 
    371456}}; 
    372457var Hover=Class.create(); 
    373 Hover.prototype={initialize:function(_8c){ 
     458Hover.prototype={initialize:function(_ae){ 
    374459this.options=Object.extend({defaultClass:"",hoverClass:"",cssUtil:"",list:false,beforeToggle:function(){ 
    375460return true; 
    376461}},arguments[1]||{}); 
    377 var _8c=$(_8c); 
     462var _ae=$(_ae); 
    378463if(this.options.list){ 
    379 var _8d=_8c.childNodes; 
    380 for(var i=0;i<_8d.length;i++){ 
    381 if(Element.isElementNode(_8d[i])){ 
    382 this.build(_8d[i]); 
    383 } 
    384 } 
    385 }else{ 
    386 this.build(_8c); 
    387 } 
    388 this.element=_8c
    389 },build:function(_8f){ 
    390 this.normal=this.getNormalClass(_8f); 
     464var _af=_ae.childNodes; 
     465for(var i=0;i<_af.length;i++){ 
     466if(Element.isElementNode(_af[i])){ 
     467this.build(_af[i]); 
     468} 
     469} 
     470}else{ 
     471this.build(_ae); 
     472} 
     473this.element=_ae
     474},build:function(_b1){ 
     475this.normal=this.getNormalClass(_b1); 
    391476this.hover=this.getHoverClass(this.normal); 
    392477if(this.options.cssUtil){ 
     
    394479this.hover=this.options.cssUtil.joinClassNames(hover); 
    395480} 
    396 this.setHoverEvent(_8f); 
    397 },setHoverEvent:function(_90){ 
    398 this.mouseout=this.toggle.bindAsEventListener(this,_90,this.normal); 
    399 this.mouseover=this.toggle.bindAsEventListener(this,_90,this.hover); 
    400 Event.observe(_90,"mouseout",this.mouseout); 
    401 Event.observe(_90,"mouseover",this.mouseover); 
    402 },toggle:function(_91,_92,_93){ 
    403 Event.stop(_91); 
     481this.setHoverEvent(_b1); 
     482},setHoverEvent:function(_b2){ 
     483this.mouseout=this.toggle.bindAsEventListener(this,_b2,this.normal); 
     484this.mouseover=this.toggle.bindAsEventListener(this,_b2,this.hover); 
     485Event.observe(_b2,"mouseout",this.mouseout); 
     486Event.observe(_b2,"mouseover",this.mouseover); 
     487},toggle:function(_b3,_b4,_b5){ 
     488Event.stop(_b3); 
    404489if(this.options.beforeToggle()){ 
    405 _92.className=_93
    406 } 
    407 },getNormalClass:function(_94){ 
    408 var _95=(this.options.defaultClass||_94.className); 
    409 return (_95||""); 
    410 },getHoverClass:function(_96){ 
    411 var _97=this.options.hoverClass; 
    412 if(!_97){ 
    413 _97=_96.split(" ").collect(function(c){ 
     490_b4.className=_b5
     491} 
     492},getNormalClass:function(_b6){ 
     493var _b7=(this.options.defaultClass||_b6.className); 
     494return (_b7||""); 
     495},getHoverClass:function(_b8){ 
     496var _b9=this.options.hoverClass; 
     497if(!_b9){ 
     498_b9=_b8.split(" ").collect(function(c){ 
    414499return c+"Hover"; 
    415500}).join(" "); 
    416501} 
    417 return _97
     502return _b9
    418503},destroy:function(){ 
    419504Event.stopObserving(this.element,"mouseout",this.mouseout); 
     
    427512Object.extend(Date.prototype,{msPerDay:function(){ 
    428513return 24*60*60*1000; 
    429 },advance:function(_99){ 
    430 return new Date(this.getTime()+this.msPerDay()*_99.days); 
     514},advance:function(_bb){ 
     515return new Date(this.getTime()+this.msPerDay()*_bb.days); 
    431516},days:function(){ 
    432 var _9a=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0); 
    433 return Math.round(_9a.getTime()/this.msPerDay()); 
     517var _bc=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0); 
     518return Math.round(_bc.getTime()/this.msPerDay()); 
    434519},minutes:function(){ 
    435520return Math.round(this.getTime()/(60*1000)); 
    436521},toHash:function(){ 
    437522return {year:this.getFullYear(),month:this.getMonth(),day:this.getDate(),hour:this.getHours(),min:this.getMinutes(),sec:this.getSeconds()}; 
    438 },sameYear:function(_9b){ 
    439 return this.getFullYear()==_9b.getFullYear(); 
    440 },sameMonth:function(_9c){ 
    441 return this.sameYear(_9c)&&this.getMonth()==_9c.getMonth(); 
    442 },sameDate:function(_9d){ 
    443 return this.sameYear(_9d)&&this.sameMonth(_9d)&&this.getDate()==_9d.getDate(); 
    444 },betweenDate:function(_9e,_9f){ 
    445 var _a0=this.days(); 
    446 return (_9e.days()<=_a0&&_a0<=_9f.days()); 
    447 },betweenTime:function(_a1,_a2){ 
    448 var _a3=this.getTime(); 
    449 return (_a1.getTime()<=_a3&&_a3<=_a2.getTime()); 
    450 },strftime:function(_a4){ 
    451 return DateUtil.simpleFormat(_a4)(this); 
     523},sameYear:function(_bd){ 
     524return this.getFullYear()==_bd.getFullYear(); 
     525},sameMonth:function(_be){ 
     526return this.sameYear(_be)&&this.getMonth()==_be.getMonth(); 
     527},sameDate:function(_bf){ 
     528return this.sameYear(_bf)&&this.sameMonth(_bf)&&this.getDate()==_bf.getDate(); 
     529},betweenDate:function(_c0,_c1){ 
     530var _c2=this.days(); 
     531return (_c0.days()<=_c2&&_c2<=_c1.days()); 
     532},betweenTime:function(_c3,_c4){ 
     533var _c5=this.getTime(); 
     534return (_c3.getTime()<=_c5&&_c5<=_c4.getTime()); 
     535},strftime:function(_c6){ 
     536return DateUtil.simpleFormat(_c6)(this); 
    452537}}); 
    453 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(_a5,_a6){ 
    454 return _a6.days()-_a5.days(); 
    455 },isLeapYear:function(_a7){ 
    456 if(((_a7%4==0)&&(_a7%100!=0))||(_a7%400==0)){ 
     538var 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(_c7,_c8){ 
     539return _c8.days()-_c7.days(); 
     540},isLeapYear:function(_c9){ 
     541if(((_c9%4==0)&&(_c9%100!=0))||(_c9%400==0)){ 
    457542return true; 
    458543} 
    459544return false; 
    460 },nextDate:function(_a8){ 
    461 return new Date(_a8.getFullYear(),_a8.getMonth(),_a8.getDate()+1); 
    462 },previousDate:function(_a9){ 
    463 return new Date(_a9.getFullYear(),_a9.getMonth(),_a9.getDate()-1); 
    464 },afterDays:function(_aa,_ab){ 
    465 return new Date(_aa.getFullYear(),_aa.getMonth(),_aa.getDate()+_ab); 
    466 },getLastDate:function(_ac,_ad){ 
    467 var _ae=this.daysOfMonth[_ad]; 
    468 if((_ad==1)&&this.isLeapYear(_ac)){ 
    469 return new Date(_ac,_ad,_ae+1); 
    470 } 
    471 return new Date(_ac,_ad,_ae); 
    472 },getFirstDate:function(_af,_b0){ 
    473 if(_af.constructor==Date){ 
    474 return new Date(_af.getFullYear(),_af.getMonth(),1); 
    475 } 
    476 return new Date(_af,_b0,1); 
    477 },getWeekTurn:function(_b1,_b2){ 
    478 var _b3=6-_b2+1; 
    479 var _b4=0; 
    480 while(_b3<_b1){ 
    481 _b1-=7; 
    482 _b4++; 
    483 } 
    484 return _b4
    485 },toDateString:function(_b5){ 
    486 return _b5.toDateString(); 
    487 },toLocaleDateString:function(_b6){ 
    488 return _b6.toLocaleDateString(); 
    489 },simpleFormat:function(_b7){ 
    490 return function(_b8){ 
    491 var _b9=_b7.replace(/M+/g,DateUtil.zerofill((_b8.getMonth()+1).toString(),2)); 
    492 _b9=_b9.replace(/d+/g,DateUtil.zerofill(_b8.getDate().toString(),2)); 
    493 _b9=_b9.replace(/y{4}/g,_b8.getFullYear()); 
    494 _b9=_b9.replace(/y{1,3}/g,new String(_b8.getFullYear()).substr(2)); 
    495 _b9=_b9.replace(/E+/g,DateUtil.dayOfWeek[_b8.getDay()]); 
    496 return _b9
     545},nextDate:function(_ca){ 
     546return new Date(_ca.getFullYear(),_ca.getMonth(),_ca.getDate()+1); 
     547},previousDate:function(_cb){ 
     548return new Date(_cb.getFullYear(),_cb.getMonth(),_cb.getDate()-1); 
     549},afterDays:function(_cc,_cd){ 
     550return new Date(_cc.getFullYear(),_cc.getMonth(),_cc.getDate()+_cd); 
     551},getLastDate:function(_ce,_cf){ 
     552var _d0=this.daysOfMonth[_cf]; 
     553if((_cf==1)&&this.isLeapYear(_ce)){ 
     554return new Date(_ce,_cf,_d0+1); 
     555} 
     556return new Date(_ce,_cf,_d0); 
     557},getFirstDate:function(_d1,_d2){ 
     558if(_d1.constructor==Date){ 
     559return new Date(_d1.getFullYear(),_d1.getMonth(),1); 
     560} 
     561return new Date(_d1,_d2,1); 
     562},getWeekTurn:function(_d3,_d4){ 
     563var _d5=6-_d4+1; 
     564var _d6=0; 
     565while(_d5<_d3){ 
     566_d3-=7; 
     567_d6++; 
     568} 
     569return _d6
     570},toDateString:function(_d7){ 
     571return _d7.toDateString(); 
     572},toLocaleDateString:function(_d8){ 
     573return _d8.toLocaleDateString(); 
     574},simpleFormat:function(_d9){ 
     575return function(_da){ 
     576var _db=_d9.replace(/M+/g,DateUtil.zerofill((_da.getMonth()+1).toString(),2)); 
     577_db=_db.replace(/d+/g,DateUtil.zerofill(_da.getDate().toString(),2)); 
     578_db=_db.replace(/y{4}/g,_da.getFullYear()); 
     579_db=_db.replace(/y{1,3}/g,new String(_da.getFullYear()).substr(2)); 
     580_db=_db.replace(/E+/g,DateUtil.dayOfWeek[_da.getDay()]); 
     581return _db
    497582}; 
    498 },zerofill:function(_ba,_bb){ 
    499 var _bc=_ba
    500 if(_ba.length<_bb){ 
    501 var tmp=_bb-_ba.length; 
     583},zerofill:function(_dc,_dd){ 
     584var _de=_dc
     585if(_dc.length<_dd){ 
     586var tmp=_dd-_dc.length; 
    502587for(i=0;i<tmp;i++){ 
    503 _bc="0"+_bc
    504 } 
    505 } 
    506 return _bc
    507 },toDate:function(_be){ 
    508 return new Date(_be.year,_be.month,_be.day,_be.hour||0,_be.min||0,_be.sec||0); 
     588_de="0"+_de
     589} 
     590} 
     591return _de
     592},toDate:function(_e0){ 
     593return new Date(_e0.year,_e0.month,_e0.day,_e0.hour||0,_e0.min||0,_e0.sec||0); 
    509594}}; 
    510 var ZindexManager={zIndex:1000,getIndex:function(_bf){ 
    511 if(_bf){ 
    512 if(isNaN(_bf)){ 
    513 _bf=Element.getMaxZindex()+1; 
    514 }else{ 
    515 if(ZindexManager.zIndex>_bf){ 
    516 _bf=ZindexManager.zIndex; 
    517 } 
    518 } 
    519 }else{ 
    520 _bf=ZindexManager.zIndex; 
    521 } 
    522 ZindexManager.zIndex=_bf+1; 
    523 return _bf
     595var ZindexManager={zIndex:1000,getIndex:function(_e1){ 
     596if(_e1){ 
     597if(isNaN(_e1)){ 
     598_e1=Element.getMaxZindex()+1; 
     599}else{ 
     600if(ZindexManager.zIndex>_e1){ 
     601_e1=ZindexManager.zIndex; 
     602} 
     603} 
     604}else{ 
     605_e1=ZindexManager.zIndex; 
     606} 
     607ZindexManager.zIndex=_e1+1; 
     608return _e1
    524609}}; 
    525 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(_c0,_c1,_c2){ 
    526 this._mask.callAfterLoading(this,_c0,_c1,_c2); 
     610var 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(_e2,_e3,_e4){ 
     611this._mask.callAfterLoading(this,_e2,_e3,_e4); 
    527612this._control_tab_key(); 
    528 },unmask:function(_c3){ 
    529 this._unmask($(_c3)); 
     613},unmask:function(_e5){ 
     614this._unmask($(_e5)); 
    530615this._control_tab_key(); 
    531616},unmaskAll:function(){ 
    532617var max=10; 
    533 var _c5=0; 
    534 while(this._isMasked()&&(_c5<max)){ 
     618var _e7=0; 
     619while(this._isMasked()&&(_e7<max)){ 
    535620this._unmask(); 
    536 _c5++; 
     621_e7++; 
    537622} 
    538623this._control_tab_key(); 
    539 },addMaskCallback:function(_c6){ 
     624},addMaskCallback:function(_e8){ 
    540625if(!this.maskCallbacks.any(function(c){ 
    541 return c==_c6
     626return c==_e8
    542627})){ 
    543 this.maskCallbacks.push(_c6); 
    544 } 
    545 },removeMaskCallback:function(_c8){ 
     628this.maskCallbacks.push(_e8); 
     629} 
     630},removeMaskCallback:function(_ea){ 
    546631this.maskCallbacks=this.maskCallbacks.reject(function(c){ 
    547 return c==_c8
     632return c==_ea
    548633}); 
    549634},clearMaskCallback:function(){ 
    550635this.maskCallbacks=[]; 
    551 },addUnmaskCallback:function(_ca){ 
     636},addUnmaskCallback:function(_ec){ 
    552637if(!this.unmaskCallbacks.any(function(c){ 
    553 return c==_ca
     638return c==_ec
    554639})){ 
    555 this.unmaskCallbacks.push(_ca); 
    556 } 
    557 },removeUnmaskCallback:function(_cc){ 
     640this.unmaskCallbacks.push(_ec); 
     641} 
     642},removeUnmaskCallback:function(_ee){ 
    558643this.unmaskCallbacks=this.unmaskCallbacks.reject(function(c){ 
    559 return c==_cc
     644return c==_ee
    560645}); 
    561646},clearUnmaskCallback:function(){ 
     
    563648},existTarget:function(){ 
    564649if(this.target){ 
    565 var _ce=(this.target.id)?$(this.target.id):$(this.target); 
    566 return (_ce)?Element.visible(_ce):false; 
     650var _f0=(this.target.id)?$(this.target.id):$(this.target); 
     651return (_f0)?Element.visible(_f0):false; 
    567652} 
    568653return false; 
    569654},isMasked:function(){ 
    570655return Modal.element&&Element.visible(Modal.element); 
    571 },_mask:function(_cf){ 
    572 var _d0=Object.extend({cssPrefix:"custom_",zIndex:null},arguments[1]||{}); 
    573 var _d1=arguments[2]; 
     656},_mask:function(_f1){ 
     657var _f2=Object.extend({cssPrefix:"custom_",zIndex:null},arguments[1]||{}); 
     658var _f3=arguments[2]; 
    574659if(Modal.element){ 
    575 Modal._snap(_cf); 
     660Modal._snap(_f1); 
    576661Modal._rebuildMask(); 
    577662}else{ 
    578663Modal.snaps=[]; 
    579664Modal.excepteds=[]; 
    580 Modal._buildMask(_d0.cssPrefix); 
     665Modal._buildMask(_f2.cssPrefix); 
    581666Modal.cover=new IECover(Modal.element,{transparent:true}); 
    582667} 
    583 if(_d1){ 
     668if(_f3){ 
    584669Element.setStyle(Modal.element,{position:"absolute"}); 
    585670this._setModalPosition(); 
     
    588673} 
    589674} 
    590 Modal._setZindex(_cf,_d0.zIndex); 
     675Modal._setZindex(_f1,_f2.zIndex); 
    591676Modal._setFullSize(); 
    592 if(!Modal.hasExcepted(_cf)){ 
    593 Modal.excepteds.push(_cf); 
     677if(!Modal.hasExcepted(_f1)){ 
     678Modal.excepteds.push(_f1); 
    594679} 
    595680this.count++; 
    596 this.maskCallbacks.each(function(_d2){ 
    597 _d2(_cf); 
    598 }); 
    599 this.target=_cf
    600 if(!_cf.id){ 
    601 _cf.id="modal_tmp_id_"+new Date().getTime(); 
    602 } 
    603 },_unmask:function(_d3){ 
    604 var _d4=null; 
     681this.maskCallbacks.each(function(_f4){ 
     682_f4(_f1); 
     683}); 
     684this.target=_f1
     685if(!_f1.id){ 
     686_f1.id="modal_tmp_id_"+new Date().getTime(); 
     687} 
     688},_unmask:function(_f5){ 
     689var _f6=null; 
    605690if(Modal.element){ 
    606691if(Modal.snaps.length==0){ 
     
    612697}else{ 
    613698Element.setStyle(Modal.element,{zIndex:Modal.snaps.pop()}); 
    614 if(_d3){ 
     699if(_f5){ 
    615700Modal.excepteds=(Modal.excepteds||[]).reject(function(e){ 
    616 return e==_d3
     701return e==_f5
    617702}); 
    618703}else{ 
     
    622707} 
    623708this.count++; 
    624 this.unmaskCallbacks.each(function(_d6){ 
    625 _d6(); 
     709this.unmaskCallbacks.each(function(_f8){ 
     710_f8(); 
    626711}); 
    627712this.target=Modal.excepteds?Modal.excepteds.last():false; 
     
    654739},_isMasked:function(){ 
    655740return Modal.element&&Element.visible(Modal.element); 
    656 },_snap:function(_d7){ 
    657 var _d8=Element.getStyle(Modal.element,"zIndex"); 
    658 if(_d8&&Modal._isMasked()&&!Modal.hasExcepted(_d7)){ 
    659 Modal.snaps.push(_d8); 
    660 } 
    661 },_setZindex:function(_d9,_da){ 
    662 _da=ZindexManager.getIndex(_da); 
    663 Element.setStyle(Modal.element,{zIndex:_da}); 
    664 _d9=Element.makePositioned($(_d9)); 
    665 Element.setStyle(_d9,{zIndex:++_da}); 
     741},_snap:function(_f9){ 
     742var _fa=Element.getStyle(Modal.element,"zIndex"); 
     743if(_fa&&Modal._isMasked()&&!Modal.hasExcepted(_f9)){ 
     744Modal.snaps.push(_fa); 
     745} 
     746},_setZindex:function(_fb,_fc){ 
     747_fc=ZindexManager.getIndex(_fc); 
     748Element.setStyle(Modal.element,{zIndex:_fc}); 
     749_fb=Element.makePositioned($(_fb)); 
     750Element.setStyle(_fb,{zIndex:++_fc}); 
    666751},_setFullSize:function(){ 
    667752Modal.element.setStyle({width:Element.getWindowWidth()+"px",height:Element.getWindowHeight()+"px"}); 
     
    669754Modal.cover.resetSize(); 
    670755} 
    671 },_buildMask:function(_db){ 
    672 var _dc=Builder.node("div",{id:Modal.maskId}); 
    673 Modal._setClassNames(_dc,_db); 
    674 document.body.appendChild(_dc); 
    675 Modal.element=_dc
     756},_buildMask:function(_fd){ 
     757var _fe=Builder.node("div",{id:Modal.maskId}); 
     758Modal._setClassNames(_fe,_fd); 
     759document.body.appendChild(_fe); 
     760Modal.element=_fe
    676761Modal._addEvent(); 
    677 },_setClassNames:function(_dd,_de){ 
    678 var _df=(UserAgent.isIE())?Modal.maskClassIE:Modal.maskClass; 
    679 Element.addClassName(_dd,_df); 
    680 Element.addClassName(_dd,_de+_df); 
     762},_setClassNames:function(_ff,_100){ 
     763var _101=(UserAgent.isIE())?Modal.maskClassIE:Modal.maskClass; 
     764Element.addClassName(_ff,_101); 
     765Element.addClassName(_ff,_100+_101); 
    681766},_rebuildMask:function(){ 
    682767document.body.appendChild(Modal.element); 
     
    689774return src.spinelzMaskResult; 
    690775} 
    691 var _e1=false; 
    692 var _e2=this.excepteds.last(); 
    693 var _e3=src; 
    694 if(_e2&&Element.descendantOf(src,_e2)){ 
    695 _e1=true; 
    696 }else{ 
    697 var _e4=Element.getStyle(Modal.element,"zIndex"); 
    698 var _e5=null; 
     776var _103=false; 
     777var _104=this.excepteds.last(); 
     778var _105=src; 
     779if(_104&&Element.descendantOf(src,_104)){ 
     780_103=true; 
     781}else{ 
     782var _106=Element.getStyle(Modal.element,"zIndex"); 
     783var _107=null; 
    699784while((src=src.parentNode)&&src!=document.body){ 
    700 if(src.style&&(_e5=Element.getStyle(src,"zIndex"))){ 
    701 _e1=(_e5>_e4); 
     785if(src.style&&(_107=Element.getStyle(src,"zIndex"))){ 
     786_103=(_107>_106); 
    702787break; 
    703788} 
    704789} 
    705790} 
    706 _e3.spinelzMaskCount=this.count; 
    707 _e3.spinelzMaskResult=_e1
    708 return _e1
    709 },_handleEvent:function(_e6){ 
    710 var src=Event.element(_e6); 
    711 if(!(Modal._isOutOfModal(src)||(_e6.keyCode&&(_e6.keyCode==this.tabKey)))){ 
    712 Event.stop(_e6); 
    713 } 
    714 },_onResize:function(_e8){ 
     791_105.spinelzMaskCount=this.count; 
     792_105.spinelzMaskResult=_103
     793return _103
     794},_handleEvent:function(_108){ 
     795var src=Event.element(_108); 
     796if(!(Modal._isOutOfModal(src)||(_108.keyCode&&(_108.keyCode==this.tabKey)))){ 
     797Event.stop(_108); 
     798} 
     799},_onResize:function(_10a){ 
    715800Modal._setFullSize(); 
    716 },hasExcepted:function(_e9){ 
    717 return (Modal.excepteds||[]).any(function(_ea){ 
    718 return _ea.id==_e9.id; 
    719 }); 
    720 },_control_tab_key:function(_eb){ 
    721 if(!_eb){ 
    722 _eb=$A(document.body.getElementsByTagName("form")); 
    723 } 
    724 _eb.each(function(_ec){ 
    725 if(!Modal._isOutOfModal(_ec)){ 
    726 Form.getElements(_ec).each(function(el){ 
     801},hasExcepted:function(_10b){ 
     802return (Modal.excepteds||[]).any(function(_10c){ 
     803return _10c.id==_10b.id; 
     804}); 
     805},_control_tab_key:function(_10d){ 
     806if(!_10d){ 
     807_10d=$A(document.body.getElementsByTagName("form")); 
     808} 
     809_10d.each(function(form){ 
     810if(!Modal._isOutOfModal(form)){ 
     811Form.getElements(form).each(function(el){ 
    727812el.tabIndex=-1; 
    728813}); 
    729814}else{ 
    730 Form.getElements(_ec).each(function(el){ 
     815Form.getElements(form).each(function(el){ 
    731816el.tabIndex=null; 
    732817}); 
     
    736821var IECover=Class.create(); 
    737822IECover.src="javascript:false;"; 
    738 IECover.prototype={idSuffix:"iecover",initialize:function(_ef){ 
     823IECover.prototype={idSuffix:"iecover",initialize:function(_111){ 
    739824this.options=Object.extend({transparent:false,padding:0},arguments[1]||{}); 
    740825if(document.all){ 
    741 _ef=$(_ef); 
    742 this.id=_ef.id.appendSuffix(this.idSuffix); 
    743 this._build(_ef); 
     826_111=$(_111); 
     827this.id=_111.id.appendSuffix(this.idSuffix); 
     828this._build(_111); 
    744829this.resetSize(); 
    745830} 
    746831},resetSize:function(){ 
    747832if(this.element){ 
    748 var _f0=this.element.parentNode; 
    749 var _f1=this.options.padding; 
    750 this.element.width=_f0.offsetWidth-_f1+"px"; 
    751 this.element.height=Element.getHeight(_f0)-_f1+"px"; 
    752 } 
    753 },_build:function(_f2){ 
    754 var _f3=this.options.padding/2; 
    755 var _f4={position:"absolute",top:_f3+"px",left:_f3+"px"}; 
     833var _112=this.element.parentNode; 
     834var _113=this.options.padding; 
     835this.element.width=_112.offsetWidth-_113+"px"; 
     836this.element.height=Element.getHeight(_112)-_113+"px"; 
     837} 
     838},_build:function(_114){ 
     839var _115=this.options.padding/2; 
     840var _116={position:"absolute",top:_115+"px",left:_115+"px"}; 
    756841if(this.options.transparent){ 
    757 _f4.filter="alpha(opacity=0)"; 
    758 } 
    759 if(_f2.buildedIECover&&$(this.id)){ 
     842_116.filter="alpha(opacity=0)"; 
     843} 
     844if(_114.buildedIECover&&$(this.id)){ 
    760845this.element=$(this.id); 
    761846}else{ 
    762847this.element=Builder.node("iframe",{src:IECover.src,id:this.id,frameborder:0}); 
    763848} 
    764 Element.setStyle(this.element,_f4); 
    765 var _f5=Element.down(_f2,0); 
    766 if(_f5){ 
    767 Element.makePositioned(_f5); 
    768 } 
    769 _f2.insertBefore(this.element,_f2.firstChild); 
    770 _f2.buildedIECover=true; 
     849Element.setStyle(this.element,_116); 
     850var _117=Element.down(_114,0); 
     851if(_117){ 
     852Element.makePositioned(_117); 
     853} 
     854_114.insertBefore(this.element,_114.firstChild); 
     855_114.buildedIECover=true; 
    771856}}; 
    772857var UserAgent={getUserAgent:function(){ 
     
    787872var ShortcutManager=Class.create(); 
    788873ShortcutManager.prototype={initialize:function(){ 
    789 var _f6={detectKeyup:false,initialStarted:true,preventDefault:true}; 
    790 this.options=Object.extend(_f6,arguments[0]||{}); 
     874var _118={detectKeyup:false,initialStarted:true,preventDefault:true}; 
     875this.options=Object.extend(_118,arguments[0]||{}); 
    791876this.keydownListener=this.eventKeydown.bindAsEventListener(this); 
    792877if(this.options.detectKeyup){ 
     
    814899Event.observe(document,"keyup",this.keyupListener); 
    815900} 
    816 },add:function(c1,c2,_f9){ 
     901},add:function(c1,c2,_11b){ 
    817902if(c1.constructor==Array){ 
    818 var _fa=this; 
    819 c1.each(function(_fb){ 
    820 _fa._add_or_remove_function(_fb[0],_fb[1],_f9); 
    821 }); 
    822 }else{ 
    823 this._add_or_remove_function(c1,c2,_f9); 
     903var self=this; 
     904c1.each(function(pair){ 
     905self._add_or_remove_function(pair[0],pair[1],_11b); 
     906}); 
     907}else{ 
     908this._add_or_remove_function(c1,c2,_11b); 
    824909} 
    825910},destroy:function(){ 
     
    828913Event.stopObserving(document,"keyup",this.keyupListener); 
    829914} 
    830 },eventKeydown:function(_fc){ 
     915},eventKeydown:function(_11e){ 
    831916if(this.executable){ 
    832 var _fd
     917var code
    833918var key=""; 
    834 _fc=_fc||window.event; 
    835 if(_fc.keyCode){ 
    836 if(_fc.altKey){ 
     919_11e=_11e||window.event; 
     920if(_11e.keyCode){ 
     921if(_11e.altKey){ 
    837922key+="a"; 
    838923} 
    839 if(_fc.ctrlKey){ 
     924if(_11e.ctrlKey){ 
    840925key+="c"; 
    841926} 
    842 if(_fc.shiftKey){ 
     927if(_11e.shiftKey){ 
    843928key+="s"; 
    844929} 
     
    846931key="n"; 
    847932} 
    848 _fd=this._mergeNumKey(_fc.keyCode); 
    849 if(this.keydownFunc[key][_fd]){ 
    850 this.keydownFunc[key][_fd](); 
     933code=this._mergeNumKey(_11e.keyCode); 
     934if(this.keydownFunc[key][code]){ 
     935this.keydownFunc[key][code](); 
    851936if(this.options.preventDefault){ 
    852 Event.stop(_fc); 
    853 } 
    854 } 
    855 } 
    856 } 
    857 },eventKeyup:function(_ff){ 
     937Event.stop(_11e); 
     938} 
     939} 
     940} 
     941} 
     942},eventKeyup:function(_121){ 
    858943if(this.executable){ 
    859944var code; 
    860 _ff=_ff||window.event; 
    861 if(_ff.keyCode){ 
    862 code=this._mergeNumKey(_ff.keyCode); 
     945_121=_121||window.event; 
     946if(_121.keyCode){ 
     947code=this._mergeNumKey(_121.keyCode); 
    863948if(this.keyupFunc[code]){ 
    864949this.keyupFunc[code](); 
    865950if(this.options.preventDefault){ 
    866 Event.stop(_ff); 
    867 } 
    868 } 
    869 } 
    870 } 
    871 },remove:function(_101){ 
    872 this._add_or_remove_function(_101); 
     951Event.stop(_121); 
     952} 
     953} 
     954} 
     955} 
     956},remove:function(_123){ 
     957this._add_or_remove_function(_123); 
    873958},start:function(){ 
    874959this.executable=true; 
    875960},stop:function(){ 
    876961this.executable=false; 
    877 },_add_or_remove_function:function(_102,_103,_104){ 
    878 var _105
    879 var _106=new Array(); 
     962},_add_or_remove_function:function(_124,_125,_126){ 
     963var _127
     964var _128=new Array(); 
    880965var self=this; 
    881 $A(_102.toLowerCase().split("+")).each(function(key){ 
     966$A(_124.toLowerCase().split("+")).each(function(key){ 
    882967if(key=="alt"){ 
    883 _106.push("a"); 
     968_128.push("a"); 
    884969}else{ 
    885970if(key=="ctrl"){ 
    886 _106.push("c"); 
     971_128.push("c"); 
    887972}else{ 
    888973if(key=="shift"){ 
    889 _106.push("s"); 
    890 }else{ 
    891 _105=self.keyCode[key]; 
    892 } 
    893 } 
    894 } 
    895 }); 
    896 var key=_106.sortBy(function(_10a,_10b){ 
    897 return _10a
     974_128.push("s"); 
     975}else{ 
     976_127=self.keyCode[key]; 
     977} 
     978} 
     979} 
     980}); 
     981var key=_128.sortBy(function(_12c,_12d){ 
     982return _12c
    898983}).join(""); 
    899984if(key==""){ 
    900985key="n"; 
    901986} 
    902 if(_103){ 
    903 if(_104){ 
    904 this.keyupFunc[_105]=_103
    905 }else{ 
    906 this.keydownFunc[key][_105]=_103
    907 } 
    908 }else{ 
    909 if(_104){ 
    910 this.keyupFunc[_105]=null; 
    911 }else{ 
    912 this.keydownFunc[key][_105]=null; 
     987if(_125){