function findPosX(A){var B=0;if(A.offsetParent){while(1){B+=A.offsetLeft;if(!A.offsetParent){break}A=A.offsetParent}}else{if(A.x){B+=A.x}}return B}function findPosY(B){var A=0;if(B.offsetParent){while(1){A+=B.offsetTop;if(!B.offsetParent){break}B=B.offsetParent}}else{if(B.y){A+=B.y}}return A}$$=function(A){return(typeof A=="object")?A:document.getElementById(A)};function isFunction(A){return typeof A=="function"}function showForm(A,B){A=$$(A);s=$$(B);s.style.visibility="visible";s.style.left=findPosX(A)+"px";s.style.top=findPosY(A)+A.offsetHeight+"px"}function hideForm(A){$$(A).style.visibility="hidden"}function insertAtCursor(D,C){if(document.selection){D.focus();sel=document.selection.createRange();sel.text=C}else{if(D.selectionStart||D.selectionStart=="0"){var B=D.selectionStart;var A=D.selectionEnd;D.value=D.value.substring(0,B)+C+D.value.substring(A,D.value.length)}else{D.value+=C}}}function replaceSelection(D,E,A){if(document.selection){D.focus();sel=document.selection.createRange();sel.text=E+sel.text+A}else{if(D.selectionStart||D.selectionStart=="0"){var C=D.selectionStart;var B=D.selectionEnd;D.value=D.value.substring(0,C)+E+D.value.substring(C,B)+A+D.value.substring(B,D.value.length)}else{}}}function addSmiley(A,B){insertAtCursor(A,B)}function cS(B,A){B.className=(A==0)?"stylebuttons_hover":"stylebuttons"}function addURL(B,C,A){insertAtCursor(document.getElementById("comment"),"[url="+A+"]"+C+"[/url]")}