var IPS_Lite_Editor=new Array();function ips_text_editor_lite(editor_id){this.editor_id=editor_id;this.control_obj=document.getElementById(editor_id+'-controls');this.initialized=false;this.buttons=new Array();this.fonts=new Array();this.state=new Array();this.text_obj=document.getElementById(this.editor_id+'_textarea');this.open_brace='[';this.close_brace=']';this.editor_document=this.text_obj;this.editor_window=this.editor_document;this._ie_cache=null;this.is_ie=is_ie;this.is_moz=is_moz;this.is_opera=is_opera;this.has_focus=false;this.emoticon_window_id=null;this.init=function(){var controls=new Array();if(!this.control_obj){return;}var items=this.control_obj.getElementsByTagName("DIV");for(var i=0;i= 50 ) { if ( direction == 'up' ) { new_height = current_height - inc_value; } else { new_height = current_height + inc_value; } if ( new_height > 149 ) { this.text_obj.style.height = new_height + 'px'; } } }; }; function ips_editor_events() { } ips_editor_events.prototype.button_onmouse_event = function(e) { if ( is_ie ) { e = ipsclass.cancel_bubble(e, true); } if ( e.type == 'click' ) { IPS_Lite_Editor[this.editor_id].format_text(e, this.cmd, false, true); } IPS_Lite_Editor[this.editor_id].set_button_context(this, e.type); }; ips_editor_events.prototype.editor_window_onfocus = function(e) { this.has_focus = true; }; ips_editor_events.prototype.editor_window_onblur = function(e) { this.has_focus = false; }; ips_editor_events.prototype.editor_document_onkeypress = function(e) { if ( e.ctrlKey ) { switch (String.fromCharCode(e.charCode).toLowerCase()) { case 'b': cmd = 'bold'; break; case 'i': cmd = 'italic'; break; case 'u': cmd = 'underline'; break; default: return; } e.preventDefault(); IPS_Lite_Editor[this.editor_id].apply_formatting(cmd, false, null); return false; } };