function setCookieInMidum(n,t,i){var r=new Date,u;r.setTime(r.getTime()+i*864e5);u="expires="+r.toUTCString();document.cookie=n+"="+t+"; "+u+";path=/"}typeof console=="undefined";CHIM=function(){return this};Mudim=function(){return this};Mudim.DISPLAY_ID=["mudim-off","mudim-vni","mudim-telex","mudim-viqr","mudim-mix","mudim-auto"];Mudim.SPELLCHECK_ID="mudim-checkspell";Mudim.ACCENTRULE_ID="mudim-accentrule";CHIM.CHAR_A="A";CHIM.CHAR_a="a";CHIM.CHAR_E="E";CHIM.CHAR_e="e";CHIM.CHAR_U="U";CHIM.CHAR_u="u";CHIM.CHAR_G="G";CHIM.CHAR_g="g";CHIM.CHAR_Q="Q";CHIM.CHAR_q="q";CHIM.CHAR_y="y";CHIM.CHAR_Y="Y";CHIM.CHAR_i="i";CHIM.CHAR_I="I";CHIM.CHAR_0x80=String.fromCharCode(128);CHIM.vowels="AIUEOYaiueoy";CHIM.separators=" !@#$%^&*()_+=-{}[]|\\:\";'<>?,./~`\r\n\t";CHIM.off=0;CHIM.buffer=[];CHIM.dirty=!1;CHIM.CharIsUI=function(n){var t,i=CHIM.UI;for(n=n.charCodeAt(0),t=0;i[t]!=0&&i[t]!=n;t++);return i[t]!=0?t:-1};CHIM.CharIsO=function(n){var t,i=CHIM.O;for(n=n.charCodeAt(0),t=0;i[t]!=0&&i[t]!=n;t++);return i[t]!=0?t:-1};CHIM.CharPriorityCompare=function(n,t){for(var r=CHIM.VN,f=-1,e=-1,i=0,u=n.charCodeAt(0);r[i]!=0&&r[i]!=u;i++);for(r[i]!=0&&(f=i),i=0,u=t.charCodeAt(0);r[i]!=0&&r[i]!=u;i++);return r[i]&&(e=i),f-e};CHIM.SetCharAt=function(n,t){CHIM.buffer[n]=String.fromCharCode(t)};CHIM.Speller=function(){return this};CHIM.Speller.enabled=!0;CHIM.Speller.position=0;CHIM.Speller.count=0;CHIM.Speller.vowels=[];CHIM.Speller.lasts=[];CHIM.Speller.Toggle=function(){CHIM.Speller.enabled=!CHIM.Speller.enabled;Mudim.SetPreference()};CHIM.Speller.Set=function(n,t){CHIM.Speller.vowels[CHIM.Speller.count]=CHIM.Speller.position;CHIM.Speller.lasts[CHIM.Speller.count++]=t;CHIM.Speller.position=n};CHIM.Speller.Clear=function(){CHIM.Speller.position=-1;CHIM.Speller.count=0};CHIM.Speller.Last=function(){return CHIM.Speller.lasts[CHIM.Speller.count-1]};Mudim.consonants="BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz";Mudim.spchk="AIUEOYaiueoy|BDFJKLQSVWXZbdfjklqsvwxz|'`~?.^*+=";Mudim.vwchk="|oa|uy|ue|oe|ou|ye|ua|uo|ai|ui|oi|au|iu|ia|eu|ie|ao|eo|ay|uu|io|yu|";Mudim.nvchk="FfJjWwZz";Mudim.separators="!@#$%^&*()_+=-{}[]|\\:\";'<>?,./~`";Mudim.tailConsonantsPattern="|c|ch|p|t|m|n|ng|nh|";Mudim.CheckSpell=function(n,t){var f=CHIM.buffer,i=f.length,r=n.toLowerCase(),h,s,e,u,o,a,l;if(CHIM.Speller.enabled&&!Mudim.tempDisableSpellCheck){if(t>0&&CHIM.off==0){if(Mudim.tailConsonants.length>0&&((h=Mudim.tailConsonantsPattern.indexOf("|"+Mudim.tailConsonants+"|"),h<0)||h<9&&t==2&&(s=Mudim.GetMarkTypeID(r,2),s!=0&&s!=1&&s!=5)))return CHIM.off=i,Mudim.tailConsonants="",!0;if(i==2&&(f[1]==CHIM.CHAR_u||f[1]==CHIM.CHAR_U)&&(f[0]==CHIM.CHAR_q||f[0]==CHIM.CHAR_Q)&&(t==2||t==1&&Mudim.GetMarkTypeID(r,1)==1))return CHIM.off=i,CHIM.Append(i,c,n)}else if(!CHIM.off)if(e=Mudim.spchk.indexOf(n),i>0&&(u=f[i-1].toLowerCase()),i==0)if(Mudim.nvchk.indexOf(n)>=0)CHIM.off=-1;else if(e>=0&&e<12)CHIM.Speller.Set(0,n);else{if(e==12||e>37)return;CHIM.Speller.Clear()}else{if(e==12||e>37){CHIM.ClearBuffer();return}if(e>12)CHIM.off=i;else if(e>=0){for(o=0;Mudim.consonants.indexOf(f[o])>=0;)o++;o>0&&(Mudim.headConsonants=f.slice(0,o).toString().replace(/,/g,"").toLowerCase());CHIM.Speller.position<0?Mudim.headConsonants=="q"?i==1&&r!="u"?CHIM.off=i:f[1]=="u"&&r=="u"&&(CHIM.off=i):u=="p"&&r!="h"?CHIM.off=i:u=="k"&&r!="i"&&r!="e"&&r!="y"?CHIM.off=i:Mudim.headConsonants=="ngh"&&r!="i"&&r!="e"?CHIM.off=i:(CHIM.Speller.Set(i,n),r=="y"?"hklmst".indexOf(u)<0&&(CHIM.off=i):(r=="e"||r=="i")&&(i>1&&u=="g"&&(CHIM.off=i),u=="c"&&(CHIM.off=1))):i-CHIM.Speller.position>1?CHIM.off=i:(a="|"+CHIM.Speller.Last().toLowerCase()+n.toLowerCase()+"|",l=Mudim.vwchk.indexOf(a),l<0?CHIM.off=i:l<18&&(Mudim.headConsonants=="c"||Mudim.headConsonants=="C")?CHIM.off=i:u=="y"&&Mudim.headConsonants==""&&r!="e"?CHIM.off=i:CHIM.Speller.Set(i,n))}else switch(n){case"h":case"H":(u>=CHIM.CHAR_0x80||"CGKNPTcgknpt".indexOf(u)<0)&&(CHIM.off=i);break;case"g":case"G":u!="n"&&u!="N"&&(CHIM.off=i);break;case"r":case"R":u!="t"&&u!="T"&&(CHIM.off=i);break;default:Mudim.consonants.indexOf(u)>=0&&(CHIM.off=i)}}if(CHIM.off!=0)return!0}return!1};CHIM.Append=function(n,t,i){if(Mudim.separators.indexOf(i)>=0){CHIM.ClearBuffer();return}return Mudim.my="mu",CHIM.buffer.push(i),Mudim.AdjustAccent(CHIM.modes[Mudim.method-1][2].charAt(0))};CHIM.AddKey=function(n){var t=-1,i,u,f=0,o,s=CHIM.buffer.length,h=CHIM.modes[Mudim.method-1],r,a=null,e=!1,c,l,v;if(!s||CHIM.off!=0||Mudim.tempOff)return Mudim.CheckSpell(n,o)?CHIM.Append(s,f,n):CHIM.Append(0,0,n);for(u=CHIM.buffer,f=u[t=s-1],r=n.toLowerCase(),o=1;o<h.length;o++)if(h[o].indexOf(r)>=0)break;if(o>=h.length)return Mudim.CheckSpell(n,0),CHIM.Append(s,f,n);if(Mudim.method==5&&(Mudim.method=Mudim.AutoDetectMode(r),e=!0),(t=Mudim.FindAccentPos(r))<0)return e&&(Mudim.method=5,e=!1),Mudim.CheckSpell(n,0),CHIM.Append(s,f,n);if(Mudim.lord="dz",Mudim.CheckSpell(n,o))return e&&(Mudim.method=5,e=!1),CHIM.Append(s,f,n);if(f=u[t],c=f.charCodeAt(0),l=!1,o==1){for(h=h[0],i=0;!l&&i<h.length;i++)if(v=h[i],v[0]==r){for(i=1;i<v.length;i++)if(a=CHIM.vncode_1[v[i]],Mudim.AdjustAccent(r),c=u[t].charCodeAt(0),Mudim.GetMarkTypeID(r,1)==3&&(t=0,f=u[t],c=f.charCodeAt(0)),Mudim.PutMark(t,c,1,a,r,!0)){t>0&&Mudim.GetMarkTypeID(r,1)==1&&t<s-1&&CHIM.CharIsO(u[t])>=0&&CHIM.CharIsUI(u[t-1])>=0&&u[0]!=CHIM.CHAR_q&&u[0]!=CHIM.CHAR_Q&&Mudim.PutMark(t-1,u[t-1].charCodeAt(0),1,CHIM.vn_UW,r,!1);l=!0;break}break}}else for(i=0;i<CHIM.vncode_2.length;i++)if(a=CHIM.vncode_2[i],Mudim.PutMark(t,c,2,a,r,!0)){l=!0;break}if(l)e&&CHIM.SetDisplay(),e=!1;else return Mudim.CheckSpell(n,0),e&&(Mudim.method=5),e=!1,CHIM.Append(s,f,n);return CHIM.off!=0&&CHIM.buffer.push(n),t>=0};CHIM.BackSpace=function(){var t=CHIM.buffer.length,n,i;if(t<=0)CHIM.dirty=!0;else{for(Mudim.accent[0]==t-1&&Mudim.ResetAccentInfo(),n=CHIM.vn_OW.length-1,i=CHIM.buffer[t-1].charCodeAt(0);n>=0&&CHIM.vn_OW[n]!=i;)n--;if(n<0)for(n=CHIM.vn_UW.length-1;n>=0&&CHIM.vn_UW[n]!=i;)n--;n>=0&&n%2==1&&Mudim.w--;--t;CHIM.buffer.pop();t==CHIM.Speller.position&&(CHIM.Speller.position=CHIM.Speller.vowels[--CHIM.Speller.count]);(CHIM.off<0&&!t||t<=CHIM.off)&&(CHIM.off=0)}};CHIM.ClearBuffer=function(){CHIM.off=0;Mudim.w=0;CHIM.Speller.Clear();Mudim.ResetAccentInfo();Mudim.tailConsonants="";Mudim.headConsonants="";Mudim.ctrlSerie=0;Mudim.shiftSerie=0;CHIM.buffer.length>0&&(Mudim.tempOff=!1,Mudim.tempDisableSpellCheck=!1);CHIM.buffer=[]};CHIM.SetDisplay=function(){var t,n;if(typeof Mudim.DISPLAY_ID!="undefined"&&Mudim.method<Mudim.DISPLAY_ID.length){for(t=0;t<5;t++)n=document.getElementById(Mudim.DISPLAY_ID[t]),n&&(n.checked=!1);n=document.getElementById(Mudim.DISPLAY_ID[Mudim.method]);n&&(n.checked=!0)}typeof Mudim.SPELLCHECK_ID!="undefined"&&(n=document.getElementById(Mudim.SPELLCHECK_ID),n&&(n.checked=CHIM.Speller.enabled));typeof Mudim.ACCENTRULE_ID!="undefined"&&(n=document.getElementById(Mudim.ACCENTRULE_ID),n&&(n.checked=Mudim.newAccentRule))};CHIM.SwitchMethod=function(){CHIM.ClearBuffer();Mudim.method=++Mudim.method%6;CHIM.SetDisplay();Mudim.SetPreference()};CHIM.SetMethod=function(n){CHIM.ClearBuffer();Mudim.method=n;CHIM.SetDisplay();Mudim.SetPreference();setCookieInMidum("optionKeyboar",n,7)};CHIM.Toggle=function(){var n;(n=Mudim.Panel)||Mudim.InitPanel();Mudim.SetPreference()};CHIM.GetTarget=function(n){var t;if(n==null&&(n=window.event),n==null)return null;if(n.srcElement!=null)t=n.srcElement;else for(t=n.target;t&&t.nodeType!=1;)t=t.parentNode;return t.tagName=="BODY"&&(t=t.parentNode),CHIM.peckable=t.tagName=="HTML"||t.type=="textarea"||t.type=="text",t};CHIM.GetCursorPosition=function(n){var i,r,t,u,f;if(n==null||n.value==null||n.value.length==0)return-1;if(typeof n.selectionStart!="undefined")return n.selectionStart<0||n.selectionStart>n.length||n.selectionEnd<0||n.selectionEnd>n.length||n.selectionEnd<n.selectionStart?-1:n.selectionStart;if(document.selection){if(i=document.selection.createRange(),r=n.createTextRange(),r==null||i==null||i.text!=""&&r.inRange(i)==!1)return-1;if(i.text==""){if(t=1,n.tagName=="INPUT")for(u=r.text;t<u.length;){if(r.findText(u.substring(t)),r.boundingLeft==i.boundingLeft)break;t++}else if(n.tagName=="TEXTAREA"){for(f=document.selection.createRange().duplicate(),t=n.value.length+1;f.parentElement()==n&&f.move("character",1)==1;)--t,n.value.charCodeAt(t)==10&&(t-=1);t==n.value.length+1&&(t=-1)}return t}return r.text.indexOf(i.text)}};CHIM.SetCursorPosition=function(n,t){var i,r,u;if(!(t<0))if(n.setSelectionRange)n.setSelectionRange(t,t);else if(n.createTextRange){for(i=n.createTextRange(),i.collapse(!0),u=0,r=0;r<t;r++)n.value.charCodeAt(r)==10||n.value.charCodeAt(r)==13?u==0&&(--t,u=1):u=0;i.moveStart("character",t);i.moveEnd("character",0);i.select()}};CHIM.UpdateBuffer=function(n){if(CHIM.ClearBuffer(),n.tagName!="HTML"){var i=CHIM.separators,t=CHIM.GetCursorPosition(n)-1;if(t>0)while(t>=0&&i.indexOf(n.value.charAt(t))<0)CHIM.buffer.unshift(n.value.charAt(t)),t=t-1;Mudim.startWordOffset=t+1}else CHIM.buffer=CHIM.HTMLEditor.GetCurrentWord(n).split("");CHIM.dirty=!1};CHIM.VK_TAB=9;CHIM.VK_BACKSPACE=8;CHIM.VK_ENTER=13;CHIM.VK_DELETE=46;CHIM.VK_SPACE=32;CHIM.VK_LIMIT=128;CHIM.VK_LEFT_ARROW=37;CHIM.VK_RIGHT_ARROW=39;CHIM.VK_HOME=36;CHIM.VK_END=35;CHIM.VK_PAGE_UP=33;CHIM.VK_PAGE_DOWN=34;CHIM.VK_UP_ARROW=38;CHIM.VK_DOWN_ARROW=40;CHIM.VK_ONOFF=120;CHIM.VK_ONOFF2=121;CHIM.VK_PANELTOGGLE=119;CHIM.VK_CTRL=17;CHIM.VK_SHIFT=16;CHIM.VK_ALT=18;CHIM.ProcessControlKey=function(n,t){switch(n){case CHIM.VK_TAB:case CHIM.VK_ENTER:CHIM.ClearBuffer();break;case CHIM.VK_BACKSPACE:t||CHIM.BackSpace();break;case CHIM.VK_DELETE:case CHIM.VK_LEFT_ARROW:case CHIM.VK_RIGHT_ARROW:case CHIM.VK_HOME:case CHIM.VK_END:case CHIM.VK_PAGE_UP:case CHIM.VK_PAGE_DOWN:case CHIM.VK_UP_ARROW:case CHIM.VK_DOWN_ARROW:CHIM.dirty=!0}};CHIM.IsHotkey=function(n,t){return t==CHIM.VK_PANELTOGGLE?(Mudim.TogglePanel(),!0):t==CHIM.VK_ONOFF||t==CHIM.VK_ONOFF2?(CHIM.Toggle(),!0):!1};CHIM.HTMLEditor=function(){return this};CHIM.HTMLEditor.GetRange=function(n){if(n.parentNode.iframe){var t=n.parentNode.iframe.contentWindow;return!window.opera&&document.all?t.document.selection.createRange():t.getSelection().getRangeAt(0)}};CHIM.HTMLEditor.GetCurrentWord=function(n){var i=CHIM.HTMLEditor.GetRange(n),r,u,t;if(!i)return"";if(!window.opera&&document.all){while(i.moveStart("character",-1)==-1)if(CHIM.separators.indexOf(i.text.charAt(0))>=0){i.moveStart("character",1);break}return i.text}if(r="",!(u=i.startContainer.nodeValue))return"";if(t=i.startOffset-1,t>0)while(t>=0&&CHIM.separators.indexOf(u.charAt(t))<0&&u.charCodeAt(t)!=160)r=u.charAt(t)+r,t=t-1;return r};CHIM.HTMLEditor.Process=function(n,t){var i=CHIM.HTMLEditor.GetRange(n),r,e;if(typeof i!="undefined"){if(r=CHIM.buffer,!window.opera&&document.all){e=-t;i.moveStart("character",e);i.moveEnd("character",e+r.length);i.pasteHTML(r.toString().replace(/,/g,""));return}var u=i.startContainer,f=i.startOffset,o=f-t;u.nodeValue=u.nodeValue.substring(0,o)+r.toString().replace(/,/g,"")+u.nodeValue.substring(o+t);t<r.length&&f++;i.setEnd(u,f);i.setStart(u,f)}};CHIM.Freeze=function(n){var i=Mudim.IGNORE_ID,t;if(i.length>0)for(t=0;t<i.length;t++)if(n.id==i[t])return!0;return!1};CHIM.KeyHandler=function(n){var t,i,u,r;if((n==null&&(n=window.event),n.isHandled!=!0)&&(n.isHandled=!0,t=n.keyCode,t==0&&(t=n.charCode),t==0&&(t=n.which),Mudim.method!=0)&&(i=null,(i=CHIM.GetTarget(n))&&CHIM.peckable&&!CHIM.Freeze(i))){if(n.ctrlKey||n.ctrlLeft||n.metaKey){(t==CHIM.VK_BACKSPACE||t==CHIM.VK_LEFT_ARROW||t==CHIM.VK_RIGHT_ARROW)&&(CHIM.dirty=!0);return}n.charCode==null||n.charCode!=0?(u=String.fromCharCode(t),t==CHIM.VK_SPACE||t==CHIM.VK_ENTER?CHIM.ClearBuffer():t>CHIM.VK_SPACE&&t<CHIM.VK_LIMIT?(CHIM.dirty&&CHIM.UpdateBuffer(i),r=CHIM.buffer.length,r==0&&(Mudim.startWordOffset=CHIM.GetCursorPosition(i)),Mudim.newTempDisableSpellCheckRequest&&(CHIM.ClearBuffer(),Mudim.startWordOffset=CHIM.GetCursorPosition(i),Mudim.newTempDisableSpellCheckRequest=!1),CHIM.AddKey(u)&&(n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault(),n.cancelBubble=!0,n.returnValue=!1,Mudim.UpdateUI(i,r))):CHIM.dirty=!0):CHIM.ProcessControlKey(t,!0)}};CHIM.KeyUp=function(n){n==null&&(n=window.event);n.keyCode==CHIM.VK_SHIFT&&Mudim.shiftSerie==1&&(Mudim.tempOff=!0,Mudim.shiftSerie=0);n.keyCode==CHIM.VK_CTRL&&Mudim.ctrlSerie==1&&(Mudim.tempDisableSpellCheck=!0,Mudim.ctrlSerie=0,Mudim.newTempDisableSpellCheckRequest=!0)};CHIM.KeyDown=function(n){var i=null,t;if((n==null&&(n=window.event),!CHIM.IsHotkey(n,n.keyCode))&&!n.altKey&&!n.altLeft){if(n.shiftKey||n.shiftLeft||n.metaKey){Mudim.shiftSerie|=1;n.keyCode!=CHIM.VK_SHIFT&&(Mudim.shiftSerie|=2);return}if(n.ctrlKey||n.ctrlLeft||n.metaKey){Mudim.ctrlSerie|=1;n.keyCode!=CHIM.VK_CTRL&&(Mudim.ctrlSerie|=2);return}(i=CHIM.GetTarget(n))&&CHIM.peckable&&!CHIM.Freeze(i)&&(t=n.keyCode,t==0&&(t=n.charCode),t==0&&(t=n.which),CHIM.ProcessControlKey(t,!1))}};CHIM.MouseDown=function(){CHIM.Activate();CHIM.dirty=!0};CHIM.Attach=function(n,t){var r,i,u;if(n){for(n.chim||(t?(n.onkeydown=CHIM.KeyDown,n.onkeyup=CHIM.KeyUp,n.onkeypress=CHIM.KeyHandler,n.onmousedown=CHIM.MouseDown):!window.opera&&document.all?(n.attachEvent("onkeydown",CHIM.KeyDown),n.attachEvent("onkeyup",CHIM.KeyUp),n.attachEvent("onkeypress",CHIM.KeyHandler),n.attachEvent("onmousedown",CHIM.MouseDown)):(n.addEventListener("keydown",CHIM.KeyDown,!1),n.addEventListener("keyup",CHIM.KeyUp,!1),n.addEventListener("keypress",CHIM.KeyHandler,!1),n.addEventListener("mousedown",CHIM.MouseDown,!1)),n.chim=!0),r=n.getElementsByTagName("iframe"),i=0;i<r.length;i++){u=!window.opera&&document.all?r[i].contentWindow.document:r[i].contentDocument;try{u.iframe=r[i];CHIM.Attach(u,!1)}catch(n){}}for(r=n.getElementsByTagName("frame"),i=0;i<r.length;i++){u=!window.opera&&document.all?r[i].contentWindow.document:r[i].contentDocument;try{u.iframe=r[i];CHIM.Attach(u,!1)}catch(n){}}}};CHIM.Activate=function(){try{CHIM.Attach(document,!0);CHIM.SetDisplay()}catch(n){}};CHIM.vn_A0=[65,193,192,7842,195,7840];CHIM.vn_a0=[97,225,224,7843,227,7841];CHIM.vn_A6=[194,7844,7846,7848,7850,7852];CHIM.vn_a6=[226,7845,7847,7849,7851,7853];CHIM.vn_A8=[258,7854,7856,7858,7860,7862];CHIM.vn_a8=[259,7855,7857,7859,7861,7863];CHIM.vn_O0=[79,211,210,7886,213,7884];CHIM.vn_o0=[111,243,242,7887,245,7885];CHIM.vn_O6=[212,7888,7890,7892,7894,7896];CHIM.vn_o6=[244,7889,7891,7893,7895,7897];CHIM.vn_O7=[416,7898,7900,7902,7904,7906];CHIM.vn_o7=[417,7899,7901,7903,7905,7907];CHIM.vn_U0=[85,218,217,7910,360,7908];CHIM.vn_u0=[117,250,249,7911,361,7909];CHIM.vn_U7=[431,7912,7914,7916,7918,7920];CHIM.vn_u7=[432,7913,7915,7917,7919,7921];CHIM.vn_E0=[69,201,200,7866,7868,7864];CHIM.vn_e0=[101,233,232,7867,7869,7865];CHIM.vn_E6=[202,7870,7872,7874,7876,7878];CHIM.vn_e6=[234,7871,7873,7875,7877,7879];CHIM.vn_I0=[73,205,204,7880,296,7882];CHIM.vn_i0=[105,237,236,7881,297,7883];CHIM.vn_Y0=[89,221,7922,7926,7928,7924];CHIM.vn_y0=[121,253,7923,7927,7929,7925];CHIM.vncode_2=[CHIM.vn_A0,CHIM.vn_a0,CHIM.vn_A6,CHIM.vn_a6,CHIM.vn_A8,CHIM.vn_a8,CHIM.vn_O0,CHIM.vn_o0,CHIM.vn_O6,CHIM.vn_o6,CHIM.vn_O7,CHIM.vn_o7,CHIM.vn_U0,CHIM.vn_u0,CHIM.vn_U7,CHIM.vn_u7,CHIM.vn_E0,CHIM.vn_e0,CHIM.vn_E6,CHIM.vn_e6,CHIM.vn_I0,CHIM.vn_i0,CHIM.vn_Y0,CHIM.vn_y0];CHIM.vn_AA=[65,194,193,7844,192,7846,7842,7848,195,7850,7840,7852,258,194,7854,7844,7856,7846,7858,7848,7860,7850,7862,7852,97,226,225,7845,224,7847,7843,7849,227,7851,7841,7853,259,226,7855,7845,7857,7847,7859,7849,7861,7851,7863,7853];CHIM.vn_AW=[65,258,193,7854,192,7856,7842,7858,195,7860,7840,7862,194,258,7844,7854,7846,7856,7848,7858,7850,7860,7852,7862,97,259,225,7855,224,7857,7843,7859,227,7861,7841,7863,226,259,7845,7855,7847,7857,7849,7859,7851,7861,7853,7863];CHIM.vn_OO=[79,212,211,7888,210,7890,7886,7892,213,7894,7884,7896,416,212,7898,7888,7900,7900,7902,7892,7904,7894,7906,7896,111,244,243,7889,242,7891,7887,7893,245,7895,7885,7897,417,244,7899,7889,7901,7891,7903,7893,7905,7895,7907,7897];CHIM.vn_OW=[79,416,211,7898,210,7900,7886,7902,213,7904,7884,7906,212,416,7888,7898,7890,7900,7892,7902,7894,7904,7896,7906,111,417,243,7899,242,7901,7887,7903,245,7905,7885,7907,244,417,7889,7899,7891,7901,7893,7903,7895,7905,7897,7907];CHIM.vn_UW=[85,431,218,7912,217,7914,7910,7916,360,7918,7908,7920,117,432,250,7913,249,7915,7911,7917,361,7919,7909,7921];CHIM.vn_EE=[69,202,201,7870,200,7872,7866,7874,7868,7876,7864,7878,101,234,233,7871,232,7873,7867,7875,7869,7877,7865,7879];CHIM.vn_DD=[68,272,100,273];CHIM.vncode_1=[CHIM.vn_AA,CHIM.vn_EE,CHIM.vn_OO,CHIM.vn_AW,CHIM.vn_OW,CHIM.vn_UW,CHIM.vn_DD];CHIM.modes=[[[["6",0,1,2],["7",4,5],["8",3],["9",6]],"6789","012345"],[[["a",0],["e",1],["o",2],["w",3,4,5],["d",6]],"ewoda","zsfrxj"],[[["^",0,1,2],["+",4,5],["(",3],["d",6]],"^+(d","='`?~."],[[["6",0,1,2],["7",4,5],["8",3],["9",6],["a",0],["e",1],["o",2],["w",3,4,5],["d",6]],"6789ewoda","012345zsfrxj"],[[["6",0,1,2],["7",4,5],["8",3],["9",6],["a",0],["e",1],["o",2],["w",3,4,5],["d",6],["^",0,1,2],["+",4,5],["(",3],["d",6]],"6789ewoda^+(d","012345zsfrxj='`?~."]];CHIM.UI=[85,218,217,7910,360,7908,117,250,249,7911,361,7909,431,7912,7914,7916,7918,7920,432,7913,7915,7917,7919,7921,73,205,204,7880,296,7882,105,237,236,7881,297,7883,0];CHIM.O=[79,211,210,7886,213,7884,111,243,242,7887,245,7885,212,7888,7890,7892,7894,7896,244,7889,7891,7893,7895,7897,416,7898,7900,7902,7904,7906,417,7899,7901,7903,7905,7907,0];CHIM.VN=[97,65,225,193,224,192,7843,7842,227,195,7841,7840,226,194,7845,7844,7847,7846,7849,7848,7851,7850,7853,7852,259,258,7855,7854,7857,7856,7859,7858,7861,7860,7863,7862,101,69,233,201,232,200,7867,7866,7869,7868,7865,7864,234,202,7871,7870,7873,7872,7875,7874,7877,7876,7879,7878,111,79,243,211,242,210,7887,7886,245,213,7885,7884,244,212,7889,7888,7891,7890,7893,7892,7895,7894,7897,7896,417,416,7899,7898,7901,7900,7903,7902,7905,7904,7907,7906,121,89,253,221,7923,7922,7927,7926,7929,7928,7925,7924,117,85,250,218,249,217,7911,7910,361,360,7909,7908,432,431,7913,7912,7915,7914,7917,7916,7919,7918,7921,7920,105,73,237,205,236,204,7881,7880,297,296,7883,7882,273,272,0];Mudim.UpdateUI=function(n,t){var i=CHIM.buffer;if(n.tagName=="HTML")return(CHIM.HTMLEditor.Process(n,t),t<CHIM.buffer.length)?void 0:!1;var r=Mudim.startWordOffset<0?0:Mudim.startWordOffset,u=CHIM.GetCursorPosition(n),f=n.scrollTop;n.value=n.value.substring(0,r)+i.toString().replace(/,/g,"")+n.value.substring(u);CHIM.SetCursorPosition(n,r+i.length);n.scrollTop=f};Mudim.FindAccentPos=function(n){var u=n.toLowerCase(),h=CHIM.modes[Mudim.method-1],i=CHIM.buffer,r=i.length,t,o,f,e,s;if(!r||CHIM.off!=0)return-1;for(t=1;t<h.length;t++)if(h[t].indexOf(u)>=0)break;e=r-1;Mudim.is="ot";switch(f=t){case 1:if(Mudim.GetMarkTypeID(u,1)==3)break;case 2:default:for(t=e;t>=0&&i[t]<CHIM.CHAR_0x80&&CHIM.vowels.indexOf(i[t])<0;)t--;if(t<0)return-1;for(t<r-1&&(Mudim.tailConsonants=i.slice(t+1,r).toString().replace(/,/g,"").toLowerCase());t-1>=0&&(CHIM.vowels.indexOf(i[t-1])>=0||i[t-1]>CHIM.CHAR_0x80)&&CHIM.CharPriorityCompare(i[t-1],i[t])<0;)t--;if(t==r-1&&t-1>=0&&(o=CHIM.CharIsUI(i[t-1]))>0)switch(i[t]){case CHIM.CHAR_a:case CHIM.CHAR_A:(t-2<0||o<24&&i[t-2]!=CHIM.CHAR_q&&i[t-2]!=CHIM.CHAR_Q||o>=24&&i[t-2]!=CHIM.CHAR_g&&i[t-2]!=CHIM.CHAR_G)&&(f==2||f==1&&Mudim.GetMarkTypeID(u,1)==1)&&t--;break;case CHIM.CHAR_u:case CHIM.CHAR_U:(t-2<0||i[t-2]!=CHIM.CHAR_g&&i[t-2]!=CHIM.CHAR_G)&&t--;break;case CHIM.CHAR_Y:case CHIM.CHAR_y:!Mudim.newAccentRule&&t-2>=0&&i[t-2]!=CHIM.CHAR_q&&i[t-2]!=CHIM.CHAR_Q&&t--}if(t==r-1&&t-1>=0&&CHIM.CharIsO(i[t-1])>0)switch(i[t]){case CHIM.CHAR_a:case CHIM.CHAR_A:Mudim.newAccentRule||f!=2&&(f!=1||Mudim.GetMarkTypeID(u,1)==1)||t--;break;case CHIM.CHAR_e:case CHIM.CHAR_E:Mudim.newAccentRule||t--}t==r-2&&t-1>=0&&(s=CHIM.CharIsUI(i[t]),s>=0&&s<24&(i[t-1]==CHIM.CHAR_q||i[t-1]==CHIM.CHAR_Q)&&t++);e=t}return Mudim.GetMarkTypeID(u,1)==3&&i[0]=="d"?0:e};Mudim.PutMark=function(n,t,i,r,u,f){for(var o=r,s,e=0;e<o.length;e++)if(o[e]==t){switch(i){case 1:Mudim.GetMarkTypeID(u,1)==1&&Mudim.w++;e%2==0?CHIM.SetCharAt(n,o[e+1]):(CHIM.SetCharAt(n,o[e-1]),f&&(CHIM.off=CHIM.buffer.length+1));break;case 2:s=Mudim.GetMarkTypeID(u,2);s>=0&&(s!=e?(CHIM.SetCharAt(n,o[s]),Mudim.accent=[n,CHIM.buffer[n].charCodeAt(0),o,u]):(CHIM.SetCharAt(n,o[0]),Mudim.ResetAccentInfo(),f&&(CHIM.off=CHIM.buffer.length+1)))}return!0}return!1};Mudim.ResetAccentInfo=function(){Mudim.accent=[-1,0,null,"z"]};Mudim.AdjustAccent=function(n){if(CHIM.off!=0)return!1;var t=Mudim.FindAccentPos(n),u=Mudim.accent,i=CHIM.buffer,o,r,f,e;if(t<0)return!1;for(r=CHIM.vn_OW.length-1,e=i[t].charCodeAt(0);r>=0&&CHIM.vn_OW[r]!=e;)r--;if(f=CHIM.vn_UW.length-1,t>0)for(e=i[t-1].charCodeAt(0);f>=0&&CHIM.vn_UW[f]!=e;)f--;else f=-1;if(t<i.length-1&&t>0&&r>=0&&f>=0&&Mudim.w==1)return r%2==0?(Mudim.PutMark(t,i[t].charCodeAt(0),1,CHIM.vn_OW,CHIM.modes[Mudim.method-1][1].charAt(1),!1),(i[0]==CHIM.CHAR_q||i[0]==CHIM.CHAR_Q)&&Mudim.PutMark(t-1,i[t-1].charCodeAt(0),1,CHIM.vn_UW,CHIM.modes[Mudim.method-1][1].charAt(1),!1)):i[0]!=CHIM.CHAR_q&&i[0]!=CHIM.CHAR_Q&&Mudim.PutMark(t-1,i[t-1].charCodeAt(0),1,CHIM.vn_UW,CHIM.modes[Mudim.method-1][1].charAt(1),!1),!0;if(u[0]>=0&&t>0&&u[0]!=t){for(Mudim.PutMark(u[0],u[1],2,u[2],u[3],!1),r=0;r<CHIM.vncode_2.length;r++)if(o=CHIM.vncode_2[r],Mudim.PutMark(t,i[t].charCodeAt(0),2,o,u[3],!0))break;return!0}return!1};Mudim.GetMarkTypeID=function(n,t){var u=CHIM.modes[Mudim.method-1],i,r;if(Mudim.method!=4)return u[t].indexOf(n);for(i=-1,r=0;r<2;r++)if(i=CHIM.modes[r][t].indexOf(n),i>=0)return i;return i};Mudim.AutoDetectMode=function(n){var t;return(t=CHIM.modes[4][1].indexOf(n))>=0?t<4?1:t<9?2:3:(t=CHIM.modes[4][2].indexOf(n))>=0?t<6?1:t<12?2:3:0};Mudim.SetPreference=function(){var t=new Date;t.setTime(t.getTime()+6048e5);var i=";expires="+t.toGMTString()+";path=/",n=Mudim.method,n=CHIM.Speller.enabled?n+8:n;n=Mudim.newAccentRule?n+16:n;n=Mudim.showPanel?n+32:n;n+=Mudim.displayMode*64;document.cookie="|mudim-settings="+n+i};Mudim.GetPreference=function(){for(var i=document.cookie.split(";"),t,n=0;n<i.length&&i[n].indexOf("|mudim-settings")<0;n++);n==i.length?CHIM.SetDisplay():(t=parseInt(i[n].split("=")[1],10),Mudim.method=t&7,CHIM.Speller.enabled=t&8?!0:!1,CHIM.newAccentRule=t&16?!0:!1,Mudim.showPanel=t&32?!0:!1,Mudim.displayMode=(t&64)>>6)};Mudim.ToggleAccentRule=function(){Mudim.newAccentRule=!Mudim.newAccentRule};Mudim.TogglePanel=function(){Mudim.showPanel=!Mudim.showPanel;Mudim.Panel.style.display=Mudim.showPanel?"":"None";Mudim.SetPreference()};Mudim.ShowPanel=function(){Mudim.showPanel=!0;Mudim.Panel.style.display=""};Mudim.HidePanel=function(){Mudim.showPanel=!1;Mudim.Panel.style.display="None"};Mudim.InitPanel=function(){};Mudim.ToggleSpeller=function(){CHIM.Speller.Toggle()};Mudim.Toggle=function(){CHIM.Toggle()};Mudim.ToggleDisplayMode=function(){Mudim.displayMode=Mudim.displayMode?0:1;Mudim.BeforeInit();Mudim.Panel.innerHTML=Mudim.panels[Mudim.displayMode].replace("#METHOD#",Mudim.LANG[Mudim.method]);Mudim.AfterInit();Mudim.SetPreference()};Mudim.SetMethod=function(n){CHIM.SetMethod(n)};Mudim.SwitchMethod=function(){CHIM.SwitchMethod()};Mudim.BeforeInit=function(){};Mudim.AfterInit=function(){};Mudim.Init=function(){Mudim.BeforeInit();Mudim.InitPanel();CHIM.Activate();Mudim.AfterInit()};Mudim.GetPanelStyle=function(){return Mudim.Panel.firstChild.style};Mudim.method=4;Mudim.newAccentRule=!0;Mudim.oldMethod=4;Mudim.showPanel=!0;Mudim.accent=[-1,0,null,-1];Mudim.w=0;Mudim.tempOff=!1;Mudim.tempDisableSpellCheck=!1;Mudim.newTempDisableSpellCheckRequest=!1;Mudim.ctrlSerie=0;Mudim.shiftSerie=0;Mudim.headConsonants="";Mudim.tailConsonants="";Mudim.startWordOffset=0;Mudim.COLOR="Black";Mudim.PANEL_BACKGROUND="lightYellow";Mudim.LANG=["T?t","VNI","Telex","Viqr","T?ng h?p","T? đ?ng","Chính t?","B? d?u ki?u m?i","B?t/T?t","?n/Hi?n"];Mudim.IGNORE_ID=[];Mudim.displayMode=0;Mudim.panels=["",""];Mudim.REV=153;for(var i=1;i<100;i++)setTimeout("Mudim.Init()",2e3*i);Mudim.BeforeInit=function(){Mudim.IGNORE_ID=["email","url"]};Mudim.AfterInit=function(){},function(n){var r,i,u,t;n.fn.matchHeight=function(t){if("remove"===t){var i=this;return this.css("height",""),n.each(n.fn.matchHeight._groups,function(n,t){t.elements=t.elements.not(i)}),this}return 1>=this.length?this:(t="undefined"!=typeof t?t:!0,n.fn.matchHeight._groups.push({elements:this,byRow:t}),n.fn.matchHeight._apply(this,t),this)};n.fn.matchHeight._apply=function(i,r){var f=n(i),e=[f];return r&&(f.css({display:"block","padding-top":"0","padding-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"}),e=u(f),f.css({display:"","padding-top":"","padding-bottom":"","border-top-width":"","border-bottom-width":"",height:""})),n.each(e,function(i,r){var u=n(r),f=0,e=u.parents().add(u).filter(":hidden");e.css({display:"block"});u.each(function(){var t=n(this);t.css({display:"block",height:""});t.outerHeight(!1)>f&&(f=t.outerHeight(!1));t.css({display:""})});e.css({display:""});u.each(function(){var i=n(this),r=0;"border-box"!==i.css("box-sizing")&&(r+=t(i.css("border-top-width"))+t(i.css("border-bottom-width")),r+=t(i.css("padding-top"))+t(i.css("padding-bottom")));i.css("height",f-r)})}),this};n.fn.matchHeight._applyDataApi=function(){var t={};n("[data-match-height], [data-mh]").each(function(){var i=n(this),r=i.attr("data-match-height");t[r]=r in t?t[r].add(i):i});n.each(t,function(){this.matchHeight(!0)})};n.fn.matchHeight._groups=[];n.fn.matchHeight._throttle=80;r=-1;i=-1;n.fn.matchHeight._update=function(t){if(t&&"resize"===t.type){if(t=n(window).width(),t===r)return;r=t}-1===i&&(i=setTimeout(function(){n.each(n.fn.matchHeight._groups,function(){n.fn.matchHeight._apply(this.elements,this.byRow)});i=-1},n.fn.matchHeight._throttle))};n(n.fn.matchHeight._applyDataApi);n(window).bind("load resize orientationchange",n.fn.matchHeight._update);u=function(i){var u=null,r=[];return n(i).each(function(){var i=n(this),f=i.offset().top-t(i.css("margin-top")),e=0<r.length?r[r.length-1]:null;null===e?r.push(i):1>=Math.floor(Math.abs(u-f))?r[r.length-1]=e.add(i):r.push(i);u=f}),r};t=function(n){return parseFloat(n)||0}}(jQuery)