Changeset 5904
- Timestamp:
- 08/05/08 13:17:33 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinelz/trunk/compress/javascripts/spinelz_lib/spinelz_util.js
r5903 r5904 138 138 return _28; 139 139 },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); 140 SelectElement.select(_2c,_2d); 141 },selectAll:function(_2e){ 142 SelectElement.selectAll(_2e); 143 },removeOptions:function(_2f){ 144 SelectElement.destroyAll(_2f); 145 },getSelectedOptions:function(_30){ 146 SelectElement.getSelelcted(_30); 147 },check:function(_31,id){ 148 _31.each(function(_33){ 149 _33=$(_33); 150 if(_33){ 151 _33.checked=(_33.id==id); 152 } 153 }); 154 },outerHTML:function(_34){ 155 _34=$(_34); 156 var _35=""; 157 if(Element.isTextNode(_34)){ 158 _35=_34.nodeValue; 159 }else{ 160 if(Element.isElementNode(_34)){ 161 if(_34.outerHTML){ 162 _35=_34.outerHTML; 163 }else{ 164 var _36=[_34.tagName]; 165 var _37=_34.attributes; 160 166 if(_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(/"/,""")+"\""); 169 }); 170 } 171 _35="<"+_36.join(" ")+">"+_34.innerHTML+"</"+_34.tagName+">"; 172 } 173 } 174 } 175 return _35; 176 },eventHTML:function(_39){ 177 return $A(_39.attributes).map(function(_3a){ 178 if(_3a.name.match(/^on(\w)+/)){ 179 return _3a.name+"=\""+_3a.value+"\""; 190 180 }else{ 191 181 return ""; 192 182 } 193 183 }).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){ 185 var _3d=""; 186 if(_3b[_3c]){ 187 _3d=_3b[_3c].toString().replace(/\'/g,"\""); 188 _3d=_3c+"='("+_3d+")()'"; 189 } 190 return _3d; 191 },replaceOptions:function(_3e,_3f){ 192 _3f=_3f.map(function(_40){ 193 return {text:_40.first(),value:_40.last()}; 194 }); 195 SelectElement.replace(_3e,_3f); 212 196 },body:function(){ 213 197 return document.documentElement||document.body; … … 216 200 },scrollLeft:function(){ 217 201 return Element.body().scrollLeft; 218 },appendToBody:function(_4 8){202 },appendToBody:function(_41){ 219 203 (function(){ 220 _4 8=$(_48);221 Element.removeFromBody(_4 8.id);222 document.body.appendChild(_4 8);204 _41=$(_41); 205 Element.removeFromBody(_41.id); 206 document.body.appendChild(_41); 223 207 }).callAfterLoading(this); 224 },removeFromBody:function(_4 9){225 $A(document.body.childNodes).each(function(_4 a){226 if(_4 a.id==_49){227 _4 a.remove();228 } 229 }); 230 },positionedByCursor:function(_4 b,_4c,_4d){231 _4 d=Object.extend({top:0,left:0},_4d||{});232 var _4 e=Element.getDimensions(_4b);233 var x=Event.pointerX(_4 c);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(_4 b,{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(_5 7,_58,_59){248 if(!_5 9){249 _5 9=0;250 } 251 var _5 a=Position.cumulativeOffset(Position.offsetParent($(_57)));252 var _5 b=Position.cumulativeOffset($(_58));253 var _5 c=Element.getDimensions(_58);254 var _5 d=Element.getDimensions(_57);255 var _5 e=Element.getWindowWidth()+Element.scrollLeft();256 var x=_5 b[0]+_5c.width-_5a[0]+_59;257 var _ 60=x+_5d.width;258 if(_ 60>_5e){259 x-=(_5 c.width+_5d.width);260 } 261 Element.setStyle(_5 7,{left:x+"px"});208 },removeFromBody:function(_42){ 209 $A(document.body.childNodes).each(function(_43){ 210 if(_43.id==_42){ 211 _43.remove(); 212 } 213 }); 214 },positionedByCursor:function(_44,_45,_46){ 215 _46=Object.extend({top:0,left:0},_46||{}); 216 var _47=Element.getDimensions(_44); 217 var x=Event.pointerX(_45); 218 var _49=x+_47.width+_46.left; 219 var _4a=Element.getWindowWidth()+Element.scrollLeft(); 220 if(_49>_4a){ 221 x-=(_49-_4a); 222 } 223 Element.setStyle(_44,{position:"absolute",left:x+"px",top:Event.pointerY(_45)+_46.top+"px"}); 224 },alignTop:function(_4b,_4c,_4d){ 225 if(!_4d){ 226 _4d=0; 227 } 228 var _4e=Position.cumulativeOffset(Position.offsetParent($(_4b))); 229 var _4f=Position.cumulativeOffset($(_4c)); 230 Element.setStyle(_4b,{top:_4f[1]-_4e[1]+"px"}); 231 },alignRight:function(_50,_51,_52){ 232 if(!_52){ 233 _52=0; 234 } 235 var _53=Position.cumulativeOffset(Position.offsetParent($(_50))); 236 var _54=Position.cumulativeOffset($(_51)); 237 var _55=Element.getDimensions(_51); 238 var _56=Element.getDimensions(_50); 239 var _57=Element.getWindowWidth()+Element.scrollLeft(); 240 var x=_54[0]+_55.width-_53[0]+_52; 241 var _59=x+_56.width; 242 if(_59>_57){ 243 x-=(_55.width+_56.width); 244 } 245 Element.setStyle(_50,{left:x+"px"}); 262 246 }}); 263 Object.extend(Array.prototype,{insert:function(_61,_62){ 264 this.splice(_61,0,_62); 265 },remove:function(_63){ 266 this.splice(_63,1); 247 SelectElement={select:function(_5a,_5b){ 248 _5b=(_5b.constructor==Array)?_5b:[_5b]; 249 $A($(_5a).options).each(function(opt){ 250 opt.selected=_5b.include(opt.value); 251 }); 252 },selectAll:function(_5d){ 253 $A($(_5d).options).each(function(opt){ 254 opt.selected=true; 255 }); 256 },deselect:function(_5f,_60){ 257 _60=(_60.constructor==Array)?_60:[_60]; 258 $A($(_5f).options).each(function(opt){ 259 if(opt.selected&&_60.include(opt.value)){ 260 opt.selected=false; 261 } 262 }); 263 },deselectAll:function(_62){ 264 $A($(_62).options).each(function(opt){ 265 opt.selected=false; 266 }); 267 },get:function(_64,_65){ 268 _64=$(_64); 269 _65=(_65.constructor==Array)?_65:[_65]; 270 var _66=$A(_64.options).select(function(opt){ 271 return _65.include(opt.value); 272 }); 273 return _64.multiple?_66:_66[0]; 274 },getSelelcted:function(_68){ 275 _68=$(_68); 276 var _69=$A(_68.options).select(function(opt){ 277 return opt.selected; 278 }); 279 return _68.multiple?_69:_69[0]; 280 },append:function(_6b,_6c,_6d){ 281 _6b=$(_6b); 282 _6c=(_6c.constructor==Array)?_6c:[_6c]; 283 if(_6d){ 284 _6b.destroy(_6c.map(function(o){ 285 return o.value; 286 })); 287 } 288 var df=document.createDocumentFragment(); 289 _6c.each(function(_70){ 290 var _71=_70.text.unescapeHTML(); 291 var _72=_70.title; 292 if(_72){ 293 delete _70.title; 294 _72=_72.unescapeHTML(); 295 }else{ 296 _72=_71; 297 } 298 delete _70.text; 299 var op=Builder.node("option",_70,[_71]); 300 op.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){ 311 if(_77.include(opt.value)){ 312 Element.remove(opt); 313 } 314 }); 315 },destroySelected:function(_79){ 316 _79=$(_79); 317 $A(_79.options).each(function(opt){ 318 if(opt.selected){ 319 Element.remove(opt); 320 if(!_79.multiple){ 321 throw $break; 322 } 323 } 324 }); 325 },destroyAll:function(_7b){ 326 $A($(_7b).options).each(function(opt){ 327 Element.remove(opt); 328 }); 329 },cache:function(_7d){ 330 _7d=$(_7d); 331 var _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); 338 if(_80.optionsCache){ 339 _80.replace(_80.optionsCache.map(function(o){ 340 return Object.clone(o); 341 })); 342 } 343 }}; 344 Object.extend(Array.prototype,{insert:function(_82,_83){ 345 this.splice(_82,0,_83); 346 },remove:function(_84){ 347 this.splice(_84,1); 267 348 }}); 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;349 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(_85,_86){ 350 if(!_86){ 351 _86="_"; 352 } 353 return this+_86+_85; 354 },appendSuffix:function(_87,_88){ 355 if(!_88){ 356 _88="_"; 357 } 358 return this+_88+_87; 278 359 },compressSpaces:function(){ 279 360 return this.normalizeSpaces().gsub(/\s+/," "); … … 287 368 } 288 369 return 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){ 371 if(!_8c){ 372 _8c="_"; 373 } 374 return this.split(_8c)[0]; 375 },getSuffix:function(_8d){ 376 if(!_8d){ 377 _8d="_"; 378 } 379 return this.split(_8d).pop(); 299 380 },normalizeSpaces:function(){ 300 381 return this.gsub(this._mb_space," "); … … 302 383 return this.strip().gsub(this._rf,"").gsub(this._rb,""); 303 384 },toElement:function(){ 304 var _6d=document.createElement("div"); 305 _6d.innerHTML=this; 306 return _6d.firstChild; 385 var _8e=document.createElement("div"); 386 _8e.innerHTML=this; 387 return _8e.firstChild; 388 },toElements:function(){ 389 var _8f=document.createElement("div"); 390 _8f.innerHTML=this; 391 return Element.getTagNodes(_8f); 307 392 }}); 308 393 var CssUtil=Class.create(); 309 CssUtil.getInstance=function(_ 6e,_6f){310 var _ 70=CssUtil.appendPrefix(_6e,_6f);311 return new CssUtil([_ 6f,_70]);394 CssUtil.getInstance=function(_90,_91){ 395 var _92=CssUtil.appendPrefix(_90,_91); 396 return new CssUtil([_91,_92]); 312 397 }; 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;398 CssUtil.appendPrefix=function(_93,_94){ 399 var _95={}; 400 $H(_94).each(function(_96){ 401 _95[_96[0]]=_93+_94[_96[0]]; 402 }); 403 return _95; 319 404 }; 320 CssUtil.getCssRules=function(_ 75){321 return _ 75.rules||_75.cssRules;405 CssUtil.getCssRules=function(_97){ 406 return _97.rules||_97.cssRules; 322 407 }; 323 CssUtil.getCssRuleBySelectorText=function(_ 76){324 var _ 77=null;408 CssUtil.getCssRuleBySelectorText=function(_98){ 409 var _99=null; 325 410 $A(document.styleSheets).each(function(s){ 326 var _ 79=CssUtil.getCssRules(s);327 _ 77=$A(_79).detect(function(r){411 var _9b=CssUtil.getCssRules(s); 412 _99=$A(_9b).detect(function(r){ 328 413 if(!r.selectorText){ 329 414 return false; 330 415 } 331 return r.selectorText.toLowerCase()==_ 76.toLowerCase();332 }); 333 if(_ 77){416 return r.selectorText.toLowerCase()==_98.toLowerCase(); 417 }); 418 if(_99){ 334 419 throw $break; 335 420 } 336 421 }); 337 return _ 77;422 return _99; 338 423 }; 339 CssUtil.prototype={initialize:function(_ 7b){340 if(!((typeof (_ 7b)=="object")&&(_7b.constructor==Array))){424 CssUtil.prototype={initialize:function(_9d){ 425 if(!((typeof (_9d)=="object")&&(_9d.constructor==Array))){ 341 426 throw "CssUtil#initialize: argument must be a Array object!"; 342 427 } 343 this.styles=_ 7b;428 this.styles=_9d; 344 429 },getClasses:function(key){ 345 430 return this.styles.collect(function(s){ … … 349 434 return this.getClasses(key).join(" "); 350 435 },allJoinClassNames:function(){ 351 var _ 7f={};352 $H(this.styles.first()).each(function(_ 80){353 _ 7f[_80.key]=this.joinClassNames(_80.key);436 var _a1={}; 437 $H(this.styles.first()).each(function(_a2){ 438 _a1[_a2.key]=this.joinClassNames(_a2.key); 354 439 }.bind(this)); 355 return _ 7f;356 },addClassNames:function(_ 81,key){440 return _a1; 441 },addClassNames:function(_a3,key){ 357 442 this.styles.each(function(s){ 358 Element.addClassName(_ 81,s[key]);359 }); 360 },removeClassNames:function(_ 84,key){443 Element.addClassName(_a3,s[key]); 444 }); 445 },removeClassNames:function(_a6,key){ 361 446 this.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){447 Element.removeClassName(_a6,s[key]); 448 }); 449 },refreshClassNames:function(_a9,key){ 450 _a9.className=""; 451 this.addClassNames(_a9,key); 452 },hasClassName:function(_ab,key){ 368 453 return this.styles.any(function(s){ 369 return Element.hasClassName(_ 89,s[key]);454 return Element.hasClassName(_ab,s[key]); 370 455 }); 371 456 }}; 372 457 var Hover=Class.create(); 373 Hover.prototype={initialize:function(_ 8c){458 Hover.prototype={initialize:function(_ae){ 374 459 this.options=Object.extend({defaultClass:"",hoverClass:"",cssUtil:"",list:false,beforeToggle:function(){ 375 460 return true; 376 461 }},arguments[1]||{}); 377 var _ 8c=$(_8c);462 var _ae=$(_ae); 378 463 if(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);464 var _af=_ae.childNodes; 465 for(var i=0;i<_af.length;i++){ 466 if(Element.isElementNode(_af[i])){ 467 this.build(_af[i]); 468 } 469 } 470 }else{ 471 this.build(_ae); 472 } 473 this.element=_ae; 474 },build:function(_b1){ 475 this.normal=this.getNormalClass(_b1); 391 476 this.hover=this.getHoverClass(this.normal); 392 477 if(this.options.cssUtil){ … … 394 479 this.hover=this.options.cssUtil.joinClassNames(hover); 395 480 } 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);481 this.setHoverEvent(_b1); 482 },setHoverEvent:function(_b2){ 483 this.mouseout=this.toggle.bindAsEventListener(this,_b2,this.normal); 484 this.mouseover=this.toggle.bindAsEventListener(this,_b2,this.hover); 485 Event.observe(_b2,"mouseout",this.mouseout); 486 Event.observe(_b2,"mouseover",this.mouseover); 487 },toggle:function(_b3,_b4,_b5){ 488 Event.stop(_b3); 404 489 if(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){ 493 var _b7=(this.options.defaultClass||_b6.className); 494 return (_b7||""); 495 },getHoverClass:function(_b8){ 496 var _b9=this.options.hoverClass; 497 if(!_b9){ 498 _b9=_b8.split(" ").collect(function(c){ 414 499 return c+"Hover"; 415 500 }).join(" "); 416 501 } 417 return _ 97;502 return _b9; 418 503 },destroy:function(){ 419 504 Event.stopObserving(this.element,"mouseout",this.mouseout); … … 427 512 Object.extend(Date.prototype,{msPerDay:function(){ 428 513 return 24*60*60*1000; 429 },advance:function(_ 99){430 return new Date(this.getTime()+this.msPerDay()*_ 99.days);514 },advance:function(_bb){ 515 return new Date(this.getTime()+this.msPerDay()*_bb.days); 431 516 },days:function(){ 432 var _ 9a=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);433 return Math.round(_ 9a.getTime()/this.msPerDay());517 var _bc=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0); 518 return Math.round(_bc.getTime()/this.msPerDay()); 434 519 },minutes:function(){ 435 520 return Math.round(this.getTime()/(60*1000)); 436 521 },toHash:function(){ 437 522 return {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){ 524 return this.getFullYear()==_bd.getFullYear(); 525 },sameMonth:function(_be){ 526 return this.sameYear(_be)&&this.getMonth()==_be.getMonth(); 527 },sameDate:function(_bf){ 528 return this.sameYear(_bf)&&this.sameMonth(_bf)&&this.getDate()==_bf.getDate(); 529 },betweenDate:function(_c0,_c1){ 530 var _c2=this.days(); 531 return (_c0.days()<=_c2&&_c2<=_c1.days()); 532 },betweenTime:function(_c3,_c4){ 533 var _c5=this.getTime(); 534 return (_c3.getTime()<=_c5&&_c5<=_c4.getTime()); 535 },strftime:function(_c6){ 536 return DateUtil.simpleFormat(_c6)(this); 452 537 }}); 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)){538 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(_c7,_c8){ 539 return _c8.days()-_c7.days(); 540 },isLeapYear:function(_c9){ 541 if(((_c9%4==0)&&(_c9%100!=0))||(_c9%400==0)){ 457 542 return true; 458 543 } 459 544 return 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){ 546 return new Date(_ca.getFullYear(),_ca.getMonth(),_ca.getDate()+1); 547 },previousDate:function(_cb){ 548 return new Date(_cb.getFullYear(),_cb.getMonth(),_cb.getDate()-1); 549 },afterDays:function(_cc,_cd){ 550 return new Date(_cc.getFullYear(),_cc.getMonth(),_cc.getDate()+_cd); 551 },getLastDate:function(_ce,_cf){ 552 var _d0=this.daysOfMonth[_cf]; 553 if((_cf==1)&&this.isLeapYear(_ce)){ 554 return new Date(_ce,_cf,_d0+1); 555 } 556 return new Date(_ce,_cf,_d0); 557 },getFirstDate:function(_d1,_d2){ 558 if(_d1.constructor==Date){ 559 return new Date(_d1.getFullYear(),_d1.getMonth(),1); 560 } 561 return new Date(_d1,_d2,1); 562 },getWeekTurn:function(_d3,_d4){ 563 var _d5=6-_d4+1; 564 var _d6=0; 565 while(_d5<_d3){ 566 _d3-=7; 567 _d6++; 568 } 569 return _d6; 570 },toDateString:function(_d7){ 571 return _d7.toDateString(); 572 },toLocaleDateString:function(_d8){ 573 return _d8.toLocaleDateString(); 574 },simpleFormat:function(_d9){ 575 return function(_da){ 576 var _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()]); 581 return _db; 497 582 }; 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){ 584 var _de=_dc; 585 if(_dc.length<_dd){ 586 var tmp=_dd-_dc.length; 502 587 for(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 } 591 return _de; 592 },toDate:function(_e0){ 593 return new Date(_e0.year,_e0.month,_e0.day,_e0.hour||0,_e0.min||0,_e0.sec||0); 509 594 }}; 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;595 var ZindexManager={zIndex:1000,getIndex:function(_e1){ 596 if(_e1){ 597 if(isNaN(_e1)){ 598 _e1=Element.getMaxZindex()+1; 599 }else{ 600 if(ZindexManager.zIndex>_e1){ 601 _e1=ZindexManager.zIndex; 602 } 603 } 604 }else{ 605 _e1=ZindexManager.zIndex; 606 } 607 ZindexManager.zIndex=_e1+1; 608 return _e1; 524 609 }}; 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);610 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(_e2,_e3,_e4){ 611 this._mask.callAfterLoading(this,_e2,_e3,_e4); 527 612 this._control_tab_key(); 528 },unmask:function(_ c3){529 this._unmask($(_ c3));613 },unmask:function(_e5){ 614 this._unmask($(_e5)); 530 615 this._control_tab_key(); 531 616 },unmaskAll:function(){ 532 617 var max=10; 533 var _ c5=0;534 while(this._isMasked()&&(_ c5<max)){618 var _e7=0; 619 while(this._isMasked()&&(_e7<max)){ 535 620 this._unmask(); 536 _ c5++;621 _e7++; 537 622 } 538 623 this._control_tab_key(); 539 },addMaskCallback:function(_ c6){624 },addMaskCallback:function(_e8){ 540 625 if(!this.maskCallbacks.any(function(c){ 541 return c==_ c6;626 return c==_e8; 542 627 })){ 543 this.maskCallbacks.push(_ c6);544 } 545 },removeMaskCallback:function(_ c8){628 this.maskCallbacks.push(_e8); 629 } 630 },removeMaskCallback:function(_ea){ 546 631 this.maskCallbacks=this.maskCallbacks.reject(function(c){ 547 return c==_ c8;632 return c==_ea; 548 633 }); 549 634 },clearMaskCallback:function(){ 550 635 this.maskCallbacks=[]; 551 },addUnmaskCallback:function(_ ca){636 },addUnmaskCallback:function(_ec){ 552 637 if(!this.unmaskCallbacks.any(function(c){ 553 return c==_ ca;638 return c==_ec; 554 639 })){ 555 this.unmaskCallbacks.push(_ ca);556 } 557 },removeUnmaskCallback:function(_ cc){640 this.unmaskCallbacks.push(_ec); 641 } 642 },removeUnmaskCallback:function(_ee){ 558 643 this.unmaskCallbacks=this.unmaskCallbacks.reject(function(c){ 559 return c==_ cc;644 return c==_ee; 560 645 }); 561 646 },clearUnmaskCallback:function(){ … … 563 648 },existTarget:function(){ 564 649 if(this.target){ 565 var _ ce=(this.target.id)?$(this.target.id):$(this.target);566 return (_ ce)?Element.visible(_ce):false;650 var _f0=(this.target.id)?$(this.target.id):$(this.target); 651 return (_f0)?Element.visible(_f0):false; 567 652 } 568 653 return false; 569 654 },isMasked:function(){ 570 655 return 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){ 657 var _f2=Object.extend({cssPrefix:"custom_",zIndex:null},arguments[1]||{}); 658 var _f3=arguments[2]; 574 659 if(Modal.element){ 575 Modal._snap(_ cf);660 Modal._snap(_f1); 576 661 Modal._rebuildMask(); 577 662 }else{ 578 663 Modal.snaps=[]; 579 664 Modal.excepteds=[]; 580 Modal._buildMask(_ d0.cssPrefix);665 Modal._buildMask(_f2.cssPrefix); 581 666 Modal.cover=new IECover(Modal.element,{transparent:true}); 582 667 } 583 if(_ d1){668 if(_f3){ 584 669 Element.setStyle(Modal.element,{position:"absolute"}); 585 670 this._setModalPosition(); … … 588 673 } 589 674 } 590 Modal._setZindex(_ cf,_d0.zIndex);675 Modal._setZindex(_f1,_f2.zIndex); 591 676 Modal._setFullSize(); 592 if(!Modal.hasExcepted(_ cf)){593 Modal.excepteds.push(_ cf);677 if(!Modal.hasExcepted(_f1)){ 678 Modal.excepteds.push(_f1); 594 679 } 595 680 this.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;681 this.maskCallbacks.each(function(_f4){ 682 _f4(_f1); 683 }); 684 this.target=_f1; 685 if(!_f1.id){ 686 _f1.id="modal_tmp_id_"+new Date().getTime(); 687 } 688 },_unmask:function(_f5){ 689 var _f6=null; 605 690 if(Modal.element){ 606 691 if(Modal.snaps.length==0){ … … 612 697 }else{ 613 698 Element.setStyle(Modal.element,{zIndex:Modal.snaps.pop()}); 614 if(_ d3){699 if(_f5){ 615 700 Modal.excepteds=(Modal.excepteds||[]).reject(function(e){ 616 return e==_ d3;701 return e==_f5; 617 702 }); 618 703 }else{ … … 622 707 } 623 708 this.count++; 624 this.unmaskCallbacks.each(function(_ d6){625 _ d6();709 this.unmaskCallbacks.each(function(_f8){ 710 _f8(); 626 711 }); 627 712 this.target=Modal.excepteds?Modal.excepteds.last():false; … … 654 739 },_isMasked:function(){ 655 740 return 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){ 742 var _fa=Element.getStyle(Modal.element,"zIndex"); 743 if(_fa&&Modal._isMasked()&&!Modal.hasExcepted(_f9)){ 744 Modal.snaps.push(_fa); 745 } 746 },_setZindex:function(_fb,_fc){ 747 _fc=ZindexManager.getIndex(_fc); 748 Element.setStyle(Modal.element,{zIndex:_fc}); 749 _fb=Element.makePositioned($(_fb)); 750 Element.setStyle(_fb,{zIndex:++_fc}); 666 751 },_setFullSize:function(){ 667 752 Modal.element.setStyle({width:Element.getWindowWidth()+"px",height:Element.getWindowHeight()+"px"}); … … 669 754 Modal.cover.resetSize(); 670 755 } 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){ 757 var _fe=Builder.node("div",{id:Modal.maskId}); 758 Modal._setClassNames(_fe,_fd); 759 document.body.appendChild(_fe); 760 Modal.element=_fe; 676 761 Modal._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){ 763 var _101=(UserAgent.isIE())?Modal.maskClassIE:Modal.maskClass; 764 Element.addClassName(_ff,_101); 765 Element.addClassName(_ff,_100+_101); 681 766 },_rebuildMask:function(){ 682 767 document.body.appendChild(Modal.element); … … 689 774 return src.spinelzMaskResult; 690 775 } 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;776 var _103=false; 777 var _104=this.excepteds.last(); 778 var _105=src; 779 if(_104&&Element.descendantOf(src,_104)){ 780 _103=true; 781 }else{ 782 var _106=Element.getStyle(Modal.element,"zIndex"); 783 var _107=null; 699 784 while((src=src.parentNode)&&src!=document.body){ 700 if(src.style&&(_ e5=Element.getStyle(src,"zIndex"))){701 _ e1=(_e5>_e4);785 if(src.style&&(_107=Element.getStyle(src,"zIndex"))){ 786 _103=(_107>_106); 702 787 break; 703 788 } 704 789 } 705 790 } 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; 793 return _103; 794 },_handleEvent:function(_108){ 795 var src=Event.element(_108); 796 if(!(Modal._isOutOfModal(src)||(_108.keyCode&&(_108.keyCode==this.tabKey)))){ 797 Event.stop(_108); 798 } 799 },_onResize:function(_10a){ 715 800 Modal._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){ 802 return (Modal.excepteds||[]).any(function(_10c){ 803 return _10c.id==_10b.id; 804 }); 805 },_control_tab_key:function(_10d){ 806 if(!_10d){ 807 _10d=$A(document.body.getElementsByTagName("form")); 808 } 809 _10d.each(function(form){ 810 if(!Modal._isOutOfModal(form)){ 811 Form.getElements(form).each(function(el){ 727 812 el.tabIndex=-1; 728 813 }); 729 814 }else{ 730 Form.getElements( _ec).each(function(el){815 Form.getElements(form).each(function(el){ 731 816 el.tabIndex=null; 732 817 }); … … 736 821 var IECover=Class.create(); 737 822 IECover.src="javascript:false;"; 738 IECover.prototype={idSuffix:"iecover",initialize:function(_ ef){823 IECover.prototype={idSuffix:"iecover",initialize:function(_111){ 739 824 this.options=Object.extend({transparent:false,padding:0},arguments[1]||{}); 740 825 if(document.all){ 741 _ ef=$(_ef);742 this.id=_ ef.id.appendSuffix(this.idSuffix);743 this._build(_ ef);826 _111=$(_111); 827 this.id=_111.id.appendSuffix(this.idSuffix); 828 this._build(_111); 744 829 this.resetSize(); 745 830 } 746 831 },resetSize:function(){ 747 832 if(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"};833 var _112=this.element.parentNode; 834 var _113=this.options.padding; 835 this.element.width=_112.offsetWidth-_113+"px"; 836 this.element.height=Element.getHeight(_112)-_113+"px"; 837 } 838 },_build:function(_114){ 839 var _115=this.options.padding/2; 840 var _116={position:"absolute",top:_115+"px",left:_115+"px"}; 756 841 if(this.options.transparent){ 757 _ f4.filter="alpha(opacity=0)";758 } 759 if(_ f2.buildedIECover&&$(this.id)){842 _116.filter="alpha(opacity=0)"; 843 } 844 if(_114.buildedIECover&&$(this.id)){ 760 845 this.element=$(this.id); 761 846 }else{ 762 847 this.element=Builder.node("iframe",{src:IECover.src,id:this.id,frameborder:0}); 763 848 } 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;849 Element.setStyle(this.element,_116); 850 var _117=Element.down(_114,0); 851 if(_117){ 852 Element.makePositioned(_117); 853 } 854 _114.insertBefore(this.element,_114.firstChild); 855 _114.buildedIECover=true; 771 856 }}; 772 857 var UserAgent={getUserAgent:function(){ … … 787 872 var ShortcutManager=Class.create(); 788 873 ShortcutManager.prototype={initialize:function(){ 789 var _ f6={detectKeyup:false,initialStarted:true,preventDefault:true};790 this.options=Object.extend(_ f6,arguments[0]||{});874 var _118={detectKeyup:false,initialStarted:true,preventDefault:true}; 875 this.options=Object.extend(_118,arguments[0]||{}); 791 876 this.keydownListener=this.eventKeydown.bindAsEventListener(this); 792 877 if(this.options.detectKeyup){ … … 814 899 Event.observe(document,"keyup",this.keyupListener); 815 900 } 816 },add:function(c1,c2,_ f9){901 },add:function(c1,c2,_11b){ 817 902 if(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);903 var self=this; 904 c1.each(function(pair){ 905 self._add_or_remove_function(pair[0],pair[1],_11b); 906 }); 907 }else{ 908 this._add_or_remove_function(c1,c2,_11b); 824 909 } 825 910 },destroy:function(){ … … 828 913 Event.stopObserving(document,"keyup",this.keyupListener); 829 914 } 830 },eventKeydown:function(_ fc){915 },eventKeydown:function(_11e){ 831 916 if(this.executable){ 832 var _fd;917 var code; 833 918 var key=""; 834 _ fc=_fc||window.event;835 if(_ fc.keyCode){836 if(_ fc.altKey){919 _11e=_11e||window.event; 920 if(_11e.keyCode){ 921 if(_11e.altKey){ 837 922 key+="a"; 838 923 } 839 if(_ fc.ctrlKey){924 if(_11e.ctrlKey){ 840 925 key+="c"; 841 926 } 842 if(_ fc.shiftKey){927 if(_11e.shiftKey){ 843 928 key+="s"; 844 929 } … … 846 931 key="n"; 847 932 } 848 _fd=this._mergeNumKey(_fc.keyCode);849 if(this.keydownFunc[key][ _fd]){850 this.keydownFunc[key][ _fd]();933 code=this._mergeNumKey(_11e.keyCode); 934 if(this.keydownFunc[key][code]){ 935 this.keydownFunc[key][code](); 851 936 if(this.options.preventDefault){ 852 Event.stop(_ fc);853 } 854 } 855 } 856 } 857 },eventKeyup:function(_ ff){937 Event.stop(_11e); 938 } 939 } 940 } 941 } 942 },eventKeyup:function(_121){ 858 943 if(this.executable){ 859 944 var code; 860 _ ff=_ff||window.event;861 if(_ ff.keyCode){862 code=this._mergeNumKey(_ ff.keyCode);945 _121=_121||window.event; 946 if(_121.keyCode){ 947 code=this._mergeNumKey(_121.keyCode); 863 948 if(this.keyupFunc[code]){ 864 949 this.keyupFunc[code](); 865 950 if(this.options.preventDefault){ 866 Event.stop(_ ff);867 } 868 } 869 } 870 } 871 },remove:function(_1 01){872 this._add_or_remove_function(_1 01);951 Event.stop(_121); 952 } 953 } 954 } 955 } 956 },remove:function(_123){ 957 this._add_or_remove_function(_123); 873 958 },start:function(){ 874 959 this.executable=true; 875 960 },stop:function(){ 876 961 this.executable=false; 877 },_add_or_remove_function:function(_1 02,_103,_104){878 var _1 05;879 var _1 06=new Array();962 },_add_or_remove_function:function(_124,_125,_126){ 963 var _127; 964 var _128=new Array(); 880 965 var self=this; 881 $A(_1 02.toLowerCase().split("+")).each(function(key){966 $A(_124.toLowerCase().split("+")).each(function(key){ 882 967 if(key=="alt"){ 883 _1 06.push("a");968 _128.push("a"); 884 969 }else{ 885 970 if(key=="ctrl"){ 886 _1 06.push("c");971 _128.push("c"); 887 972 }else{ 888 973 if(key=="shift"){ 889 _1 06.push("s");890 }else{ 891 _1 05=self.keyCode[key];892 } 893 } 894 } 895 }); 896 var key=_1 06.sortBy(function(_10a,_10b){897 return _1 0a;974 _128.push("s"); 975 }else{ 976 _127=self.keyCode[key]; 977 } 978 } 979 } 980 }); 981 var key=_128.sortBy(function(_12c,_12d){ 982 return _12c; 898 983 }).join(""); 899 984 if(key==""){ 900 985 key="n"; 901 986 } 902 if(_1 03){903 if(_1 04){904 this.keyupFunc[_1 05]=_103;905 }else{ 906 this.keydownFunc[key][_1 05]=_103;907 } 908 }else{ 909 if(_1 04){910 this.keyupFunc[_1 05]=null;911 }else{ 912 this.keydownFunc[key][_1 05]=null;987 if(_125){
