/*Mootools 1.1 Adapter * */ Window.implement({ ie:Browser.Engine.trident, ie6:Browser.Engine.trident4, ie7:Browser.Engine.trident5, gecko:Browser.Engine.gecko, webkit:Browser.Engine.webkit, webkit419:Browser.Engine.webkit419, webkit420:Browser.Engine.webkit420, opera:Browser.Engine.presto, xpath:Browser.Features.xpath }); /* Object.toQueryString=function(source){ return Hash.toQueryString(new Hash(source)); } Class adapter*/ Class.empty=$empty; /*Element Adapter*/ Window.implement({ $E:function(selector,scope){ return ($(scope)||document).getElement(selector); }, $ES:function(selector,scope){ return ($(scope)||document).getElements(selector); } }); Element.implement({ setHTML:function(){ return this.set('html',Array.flatten($A(arguments)).join('\n')); }, setText:function(text){ return this.set('text',text); }, getText:function(){ return this.get('text'); }, getHTML:function(){ return this.get('html'); }, setOpacity:function(value){ return this.set('opacity', value, false); }, setStyles:function(styles){ switch($type(styles)){ case 'object': for (var style in styles)this.setStyle(style, styles[style]);break; case 'string': this.style.cssText = styles; } return this; }, getTag:function(){ return this.tagName.toLowerCase(); }, replaceWith:function(el){ var newEL=$(el, true); var oEL=$(this); this.parentNode.replaceChild(newEL, oEL); return newEL; }, getValue: function(){ switch(this.getTag()){ case 'select': var values = []; for(i=0,L=this.options.length;i