/*
 * Compressed by JSA(www.xidea.org)
 */
function showFace(A,D){var C=$("uchome_face_bg");if(C)C.parentNode.removeChild(C);C=document.createElement("div");C.id="uchome_face_bg";C.style.position="absolute";C.style.left=C.style.top="0px";C.style.width="100%";C.style.height=document.body.scrollHeight+"px";C.style.backgroundColor="#FFFFFF";C.style.zIndex=10000;C.style.display="none";C.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0,finishOpacity=100,style=0)";C.style.opacity=0;C.onclick=function(){$(A+"_menu").style.display="none";$("uchome_face_bg").style.display="none"};$("append_parent").appendChild(C);if($(A+"_menu")!=null)$(A+"_menu").style.display="";else{var _=document.createElement("div");_.id=A+"_menu";_.className="facebox";_.style.position="absolute";var E=document.createElement("ul");for(i=1;i<31;i++){var B=document.createElement("li");B.innerHTML="<img src=\"image/face/"+i+".gif\" onclick=\"insertFace('"+A+"',"+i+", '"+D+"')\" style=\"cursor:pointer; position:relative;\" />";E.appendChild(B)}_.appendChild(E);$("append_parent").appendChild(_)}setMenuPosition(A,0);C.style.display=""}function insertFace(A,_,C){var B="[em:"+_+":]";if($(C)!=null)insertContent(C,B);$(A+"_menu").style.display="none";$("uchome_face_bg").style.display="none"}function textCounter(B,_,A){var C=strLen(B.value),D=$(_);if(C>A){B.value=getStrbylen(B.value,A);D.innerHTML="0"}else D.innerHTML=A-C;if(A-C>0)D.parentNode.style.color="";else D.parentNode.style.color="red"}function getStrbylen(A,C){var $=0,_=0,B="",E=A.split("");for(var D=0;D<E.length;D++)if(D<C&&$+byteLength(E[D])<=C){$+=byteLength(E[D]);_=D+1}if(A.length>_)B=A.substr(0,_);else B=A;return B}function byteLength($){aMatch=$.match(/[^\x00-\x80]/g);return($.length+(!aMatch?0:aMatch.length))}function strLen($){var _=document.charset,A=0;for(var B=0;B<$.length;B++)A+=$.charCodeAt(B)<0||$.charCodeAt(B)>255?(_=="utf-8"?3:2):1;return A}
