Element.implement('stopIE6',function(options){var stopIE6=new Class({Implements:[Options,Events],options:{styles:{background:'InfoBackground','border-bottom':'1px solid #c8c8c8','font-family':'Bitstream Vera Sans,verdana,sans-serif','font-color':'InfoText','font-size':'12px',top:0,left:0,cursor:'pointer',position:'fixed',width:window.getSize().x,display:'none'},contentStyles:{padding:7},stylesHover:{background:'Highlight'},infoIcon:'images/activebar-information.png',closeButton:'images/activebar-closebtn.png',html:'The version of Internet Explorer you are currently usingis highly out-dated. It is strongly recommended to update to <a href="http://www.microsoft.com/ie">IE 8</a>, <a href="http://www.getfirefox.com">Firefox</a>, <a href="http://www.opera.com/browser/">Opera</a> or <a href="http://www.google.com/chrome">Google Chrome</a> ',ie6:Browser.Engine.trident&&Browser.Engine.version<=4,onClick:null,onOpen:function(bar){bar.setStyle('display','block')},onClose:function(bar){bar.setStyle('display','none')}},initialize:function(elmt,options){this.parent=elmt;this.setOptions(options);if($type(elmt.retrieve('stopIE6Bar'))=='element')elmt.retrieve('stopIE6Bar').dispose();this.bar=this.createBar();this.fireEvent('open',this.bar);elmt.store('stopIE6Bar',this.bar)},createBar:function(){var options=this.options,bar=new Element('div',{styles:options.styles,events:{mouseover:function(){var args=$H(options.stylesHover).getKeys(),styles=this.getStyles.run(args,this);this.store('origStyles',styles);this.setStyles(options.stylesHover)},mouseout:function(){this.setStyles(this.retrieve('origStyles'))}}}).inject(this.parent,'top');if(options.onClick)bar.addEvent('click',options.onClick);if($type(options.html)=='element'){var content=options.html.inject(bar).setStyles(options.contentStyles)}else var content=new Element('div',{styles:options.contentStyles,html:options.html}).inject(bar);if(options.ie6&&bar.getStyle('position')=='fixed'){bar.setStyle('position','absolute');window.addEvent('scroll',function(){bar.setStyles({top:this.parent.getScroll().y,left:this.parent.getScroll().x})})};if(options.styles.width==window.getSize().x)window.addEvent('resize',function(){bar.setStyle('width',window.getSize().x)});if(options.infoIcon)new Element('img',{src:options.infoIcon,align:'left',styles:{'padding-right':4}}).inject(content,'top');if(options.closeButton)new Element('img',{src:options.closeButton,align:'right',styles:{'padding-left':4},events:{click:function(event){event.stop();this.fireEvent('close',bar)}.bind(this)}}).inject(content,'top');return bar}});return new stopIE6(this,options)})
