doc.attachEvent('on' + events[i], function(){ el.value = this.cleanup(doc.getElementById('editable').innerHTML); 
iframe.contentWindow.document.attachEvent('on' + events[i], function(){ el.value = this.cleanup(iframe.contentWindow.document.getElementById('editable').innerHTML); 
	build: function(el){		var id = el.className ? el.className : el.id ? el.id : 'mooeditable';		var elStyles = el.getStyles('width','height','padding','margin','border','border-width');		var sides = ['top','right','bottom','left'];		for (var i = 0; i < sides.length; i++) {			elStyles['padding-' + sides[i]] = elStyles['padding'].split(' ')[i];			elStyles['border-' + sides[i] + '-width'] = elStyles['border-width'].split(' ')[i];		}		// Build the container		var container = new Element('div',{			'class': id + '-container',			'styles': {				'width': elStyles['width'].toInt() + elStyles['padding-right'].toInt() + elStyles['padding-left'].toInt() + elStyles['border-right-width'].toInt() + elStyles['border-left-width'].toInt(),				'margin': elStyles['margin']			}		});				// Put textarea inside container		container.inject(el, 'before');		el.setStyles({			'margin': 0,			'display': 'none',			'resize': 'none', // disable resizable textareas in Safari			'outline': 'none' // disable focus ring in Safari		});//		if(Browser.Engine.trident){		if(window.ie){			// Fix IE bug, refer "IE/Win Inherited Margins on Form Elements" <http://positioniseverything.net/explorer/inherited_margin.html>			var span = new Element('span');			span.inject(container, 'bottom');			el.inject(span, 'bottom');		}		else el.inject(container, 'bottom');				// Build the iframe		var iframe = new Element('iframe',{			'class': id + '-iframe',			'styles':{				'width': elStyles['width'].toInt() + elStyles['padding-right'].toInt() + elStyles['padding-left'].toInt(),				'height': elStyles['height'].toInt() + elStyles['padding-top'].toInt() + elStyles['padding-bottom'].toInt(),				'border': elStyles['border']			}		});		iframe.inject(container, 'top');		// Build the content of iframe		var doc = iframe.contentWindow.document;		doc.open();		doc.write('<html style="cursor: text; height: 100%">');		doc.write('<body id="editable" style="font-family: helvetica, arial, sans-serif; border: 0; margin: 1px; padding: '+ elStyles['padding'] +'">');		doc.write(el.innerHTML);		doc.write('</body></html>');		doc.close();				// Turn on Design Mode		doc.designMode = 'on';		// Update the event for textarea's corresponding labels		if(el.id) $$('label[for="'+el.id+'"]').addEvent('click', function(e){			if(iframe.getStyle('display') != 'none'){				e = new Event(e).stop();				iframe.contentWindow.focus();			}		});		// Ensures textarea content is always updated		var events = ['mousedown', 'mouseup', 'mouseout', 'mouseover', 'click', 'keydown', 'keyup', 'keypress'];		for(var i = 0; i < events.length; i++){			if($type(document.addEventListener) == 'function'){				doc.addEventListener(events[i], function(oEvent){					el.value = this.cleanup(doc.getElementById('editable').innerHTML);				}.bind(this), false);			}			else{				doc.attachEvent('on' + events[i], function(){					el.value = this.cleanup(doc.getElementById('editable').innerHTML);				}.bind(this));			}		}				if(this.options.toolbar) this.buildToolbar(el,iframe,id);	},
5086	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5086/39d7486692160645ed77c31d752dab946a5b6887/MooEditable.js/buggy/MooEditable.js