    var Prototype={Version:"1.4.0_pre10_ajax",emptyFunction:function(){
},K:function(x){
return x;
}};
var Class={create:function(){
return function(){
this.initialize.apply(this,arguments);
};
}};
var Abstract=new Object();
Object.extend=function(_2,_3){
for(property in _3){
_2[property]=_3[property];
}
return _2;
};
Object.inspect=function(_4){
try{
if(_4==undefined){
return "undefined";
}
if(_4==null){
return "null";
}
return _4.inspect?_4.inspect():_4.toString();
}
catch(e){
if(e instanceof RangeError){
return "...";
}
throw e;
}
};
Function.prototype.bind=function(_5){
var _6=this;
return function(){
return _6.apply(_5,arguments);
};
};
Function.prototype.bindAsEventListener=function(_7){
var _8=this;
return function(_9){
return _8.call(_7,_9||window.event);
};
};
Object.extend(Number.prototype,{toColorPart:function(){
var _a=this.toString(16);
if(this<16){
return "0"+_a;
}
return _a;
},succ:function(){
return this+1;
},times:function(_b){
$R(0,this,true).each(_b);
return this;
}});
var Try={these:function(){
var _c;
for(var i=0;i<arguments.length;i++){
var _e=arguments[i];
try{
_c=_e();
break;
}
catch(e){
}
}
return _c;
}};
var PeriodicalExecuter=Class.create();
PeriodicalExecuter.prototype={initialize:function(_f,_10){
this.callback=_f;
this.frequency=_10;
this.currentlyExecuting=false;
this.registerCallback();
},registerCallback:function(){
setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},onTimerEvent:function(){
if(!this.currentlyExecuting){
try{
this.currentlyExecuting=true;
this.callback();
}
finally{
this.currentlyExecuting=false;
}
}
}};
function $(){
var _11=new Array();
for(var i=0;i<arguments.length;i++){
var _13=arguments[i];
if(typeof _13=="string"){
_13=document.getElementById(_13);
}
if(arguments.length==1){
return _13;
}
_11.push(_13);
}
return _11;
}
var Ajax={getTransport:function(){
return Try.these(function(){
return new ActiveXObject("Msxml2.XMLHTTP");
},function(){
return new ActiveXObject("Microsoft.XMLHTTP");
},function(){
return new XMLHttpRequest();
})||false;
}};
Ajax.Base=function(){
};
Ajax.Base.prototype={setOptions:function(_14){
this.options={method:"post",asynchronous:true,parameters:""};
Object.extend(this.options,_14||{});
},responseIsSuccess:function(){
return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300);
},responseIsFailure:function(){
return !this.responseIsSuccess();
}};
Ajax.Request=Class.create();
Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(url,_16){
this.transport=Ajax.getTransport();
this.setOptions(_16);
this.request(url);
},request:function(url){
var _18=this.options.parameters||"";
if(_18.length>0){
_18+="&_=";
}
try{
if(this.options.method=="get"){
url+="?"+_18;
}
this.transport.open(this.options.method,url,this.options.asynchronous);
if(this.options.asynchronous){
this.transport.onreadystatechange=this.onStateChange.bind(this);
setTimeout((function(){
this.respondToReadyState(1);
}).bind(this),10);
}
this.setRequestHeaders();
var _19=this.options.postBody?this.options.postBody:_18;
this.transport.send(this.options.method=="post"?_19:null);
}
catch(e){
}
},setRequestHeaders:function(){
var _1a=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version];
if(this.options.method=="post"){
_1a.push("Content-type","application/x-www-form-urlencoded");
if(this.transport.overrideMimeType){
_1a.push("Connection","close");
}
}
if(this.options.requestHeaders){
_1a.push.apply(_1a,this.options.requestHeaders);
}
for(var i=0;i<_1a.length;i+=2){
this.transport.setRequestHeader(_1a[i],_1a[i+1]);
}
},onStateChange:function(){
var _1c=this.transport.readyState;
if(_1c!=1){
this.respondToReadyState(this.transport.readyState);
}
},evalJSON:function(){
try{
var _1d=this.transport.getResponseHeader("X-JSON"),_1e;
_1e=eval(_1d);
return _1e;
}
catch(e){
}
},respondToReadyState:function(_1f){
var _20=Ajax.Request.Events[_1f];
var _21=this.transport,_22=this.evalJSON();
if(_20=="Complete"){
(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(_21,_22);
}
(this.options["on"+_20]||Prototype.emptyFunction)(_21,_22);
if(_20=="Complete"){
this.transport.onreadystatechange=Prototype.emptyFunction;
}
}});
Ajax.Updater=Class.create();
Ajax.Updater.ScriptFragment="(?:<script.*?>)((\n|.)*?)(?:</script>)";
Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(_23,url,_25){
this.containers={success:_23.success?$(_23.success):$(_23),failure:_23.failure?$(_23.failure):(_23.success?null:$(_23))};
this.transport=Ajax.getTransport();
this.setOptions(_25);
var _26=this.options.onComplete||Prototype.emptyFunction;
this.options.onComplete=(function(_27,_28){
this.updateContent();
_26(_27,_28);
}).bind(this);
this.request(url);
},updateContent:function(){
var _29=this.responseIsSuccess()?this.containers.success:this.containers.failure;
var _2a=new RegExp(Ajax.Updater.ScriptFragment,"img");
var _2b=this.transport.responseText.replace(_2a,"");
var _2c=this.transport.responseText.match(_2a);
if(_29){
if(this.options.insertion){
new this.options.insertion(_29,_2b);
}else{
_29.innerHTML=_2b;
}
}
if(this.responseIsSuccess()){
if(this.onComplete){
setTimeout(this.onComplete.bind(this),10);
}
}
if(this.options.evalScripts&&_2c){
_2a=new RegExp(Ajax.Updater.ScriptFragment,"im");
setTimeout((function(){
for(var i=0;i<_2c.length;i++){
eval(_2c[i].match(_2a)[1]);
}
}).bind(this),10);
}
}});
Ajax.PeriodicalUpdater=Class.create();
Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(_2e,url,_30){
this.setOptions(_30);
this.onComplete=this.options.onComplete;
this.frequency=(this.options.frequency||2);
this.decay=1;
this.updater={};
this.container=_2e;
this.url=url;
this.start();
},start:function(){
this.options.onComplete=this.updateComplete.bind(this);
this.onTimerEvent();
},stop:function(){
this.updater.onComplete=undefined;
clearTimeout(this.timer);
(this.onComplete||Ajax.emptyFunction).apply(this,arguments);
},updateComplete:function(_31){
if(this.options.decay){
this.decay=(_31.responseText==this.lastText?this.decay*this.options.decay:1);
this.lastText=_31.responseText;
}
this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000);
},onTimerEvent:function(){
this.updater=new Ajax.Updater(this.container,this.url,this.options);
}});
var DOM=(document.getElementById?true:false);
var IE=(document.all&&!DOM?true:false);
var NAV_OK=(DOM||IE);
var NETSCAPE=(navigator.appName=="Netscape");
var EXPLORER=(navigator.appName=="Microsoft Internet Explorer");
var OPERA=(window.opera?true:false);
var Mouse_X;
var Mouse_Y;
var Client_Y;
var Decal_X=-10;
var Decal_Y=-10;
var bBULLE=false;
var bSELECT=false;
var bISSET=false;
var ZObjet=new RECT();
var ZBulle=new RECT();
var bCADRE=false;
var bINIT=false;
var Fenetre=new RECT();
function RECT(){
this.Left=0;
this.Top=0;
this.Right=0;
this.Bottom=0;
this.InitRECT=RECT_Set;
this.PtInRECT=RECT_PtIn;
}
function RECT_Set(_32,_33,_34,_35){
with(this){
Left=(_32?_32:-1);
Top=(_33?_33:-1);
Right=Left+(_34?(_34-1):0);
Bottom=Top+(_35?(_35-1):0);
}
}
function RECT_PtIn(x_,y_){
with(this){
return ((x_>Left)&&(x_<Right)&&(y_>Top)&&(y_<Bottom));
if(x_<Left||x_>Right){
return (false);
}
if(y_<Top||y_>Bottom){
return (false);
}
return (true);
}
}
function GetObjet(_38){
if(DOM){
return document.getElementById(_38);
}
if(IE){
return document.all[_38];
}
return (null);
}
function ObjWrite(_39,_3a){
var Obj=GetObjet(_39);
if(Obj){
Obj.innerHTML=_3a;
}
}
function Get_DimFenetre(){
var _3c;
var _3d;
var _3e;
with(Fenetre){
if(window.innerWidth){
with(window){
Left=pageXOffset;
Top=pageYOffset;
Right=innerWidth;
Bottom=innerHeight;
_3c=document.body.clientWidth;
_3d=document.body.clientHeight;
if(Right>_3c){
Right=_3c;
}
if(Bottom>_3d){
Bottom=_3d;
}
}
}else{
if(document.documentElement&&document.documentElement.clientWidth){
_3e=document.documentElement;
}else{
_3e=document.body;
}
with(_3e){
Left=scrollLeft;
Top=scrollTop;
Right=clientWidth;
Bottom=clientHeight;
}
}
Right+=Left;
Bottom+=Top;
}
}
function ObjShowAll(_3f,x_,y_,z_){
var _43=GetObjet(_3f);
var _44=GetObjet("F"+_3f);
var _45,_46;
var _47,_48;
var _49=y_;
var _4a=x_;
var _4b=Client_Y-Decal_Y;
if(_43){
if(NETSCAPE){
_48=_43.offsetWidth;
_47=_43.offsetHeight;
}else{
_48=_43.scrollWidth;
_47=_43.scrollHeight;
}
with(Fenetre){
_45=Right-_48;
_46=Bottom-_47;
if(x_>_45){
x_=_45;
}
if(x_<Left){
x_=Left;
}
if(y_>_46){
y_=_46;
}
if(y_<Top){
y_=Top;
}
}
if(y_==_46&&(_4b>=_48)){
var _4c=_46-_49;
y_=_46-_4c-_47-2*Decal_Y;
}else{
if(y_>=_46&&x_>=_45){
y_=_49;
}
}
if(bSELECT){
with(_44.style){
left=x_+"px";
top=y_+"px";
zIndex=z_-1;
visibility="visible";
}
}
with(_43.style){
left=x_+"px";
top=y_+"px";
zIndex=z_;
visibility="visible";
}
ZBulle.InitRECT(x_,y_,_48,_47);
}
}
function addEvent(_4d,_4e,_4f){
if(_4d.addEventListener){
_4d.addEventListener(_4e,_4f,false);
}else{
if(!_4f.$$guid){
_4f.$$guid=addEvent.guid++;
}
if(!_4d.events){
_4d.events={};
}
var _50=_4d.events[_4e];
if(!_50){
_50=_4d.events[_4e]={};
if(_4d["on"+_4e]){
_50[0]=_4d["on"+_4e];
}
}
_50[_4f.$$guid]=_4f;
_4d["on"+_4e]=handleEvent;
}
}
addEvent.guid=1;
function removeEvent(_51,_52,_53){
if(_51.removeEventListener){
_51.removeEventListener(_52,_53,false);
}else{
if(_51.events&&_51.events[_52]){
delete _51.events[_52][_53.$$guid];
}
}
}
function handleEvent(_54){
var _55=true;
_54=_54||fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);
var _56=this.events[_54.type];
for(var i in _56){
this.$$handleEvent=_56[i];
if(this.$$handleEvent(_54)===false){
_55=false;
}
}
return _55;
}
function fixEvent(_58){
_58.preventDefault=fixEvent.preventDefault;
_58.stopPropagation=fixEvent.stopPropagation;
return _58;
}
fixEvent.preventDefault=function(){
this.returnValue=false;
};
fixEvent.stopPropagation=function(){
this.cancelBubble=true;
};
function Init_Bulle(){
var Obj=document.body.getElementsByTagName("SELECT");
if(Obj&&Obj.length){
for(var i=0;i<Obj.length;i++){
if(Obj[i].size==1){
for(var k=0;k<Obj[i].options.length;k++){
addEvent(Obj[i].options[k],"mousemove",BulleHide);
}
}
addEvent(Obj[i],"mousedown",BulleHide);
addEvent(Obj[i],"scroll",BulleHide);
}
}else{
bSELECT=false;
}
bINIT=true;
}
function CadreWrite(_5c){
var _5d;
var _5e=GetObjet("Bulle");
var _5f=GetObjet("FBulle");
if(!bINIT){
Init_Bulle();
}
if(_5e){
Get_DimFenetre();
Decal_X=-10;
Decal_Y=-10;
_5d="<table border='1' bordercolor='#062a51' cellspacing=0 cellpadding=2 bgcolor='#e3ecff'>";
_5d+="<tr><td class='Bulle' nowrap>";
_5d+=_5c;
_5d+="</td></tr></table>";
_5e.innerHTML=_5d;
if(bSELECT){
with(_5f.style){
height=_5e.offsetHeight;
width=_5e.offsetWidth;
left=_5e.offsetLeft;
top=_5e.offsetTop;
}
}
bCADRE=true;
return (true);
}
return (false);
}
function BulleWrite(_60,e_,x_,y_){
if(!bISSET){
bISSET=true;
addEvent(document,"mousemove",WhereMouse);
if(e_){
WhereMouse(e_);
}else{
var _64=document;
if(document.createEvent){
var _65=document.createEvent("MouseEvents");
_65.initEvent("mousemove",true,false);
_64.dispatchEvent(_65);
}else{
if(document.createEventObject){
_64.fireEvent("onmousemove");
}
}
}
}
var _66=GetObjet("Bulle");
var _67=GetObjet("FBulle");
var _68;
if(!bINIT){
Init_Bulle();
}
if(_66){
Get_DimFenetre();
Decal_X=(x_?x_:15);
Decal_Y=(y_?y_:15);
_68=_60;
_66.innerHTML=_68;
if(bSELECT){
with(_67.style){
height=_66.offsetHeight;
width=_66.offsetWidth;
left=_66.offsetLeft;
top=_66.offsetTop;
}
}
ObjShowAll("Bulle",Mouse_X+Decal_X,Mouse_Y+Decal_Y,1000);
bBULLE=true;
return (true);
}
return (false);
}
function BulleHide(){
var _69=GetObjet("Bulle");
var _6a=GetObjet("FBulle");
if(bSELECT){
_6a.style.height=0+"px";
}
with(_69){
innerHTML="&nbsp;";
style.left=-1000+"px";
style.top=-1000+"px";
style.zIndex=0;
style.visibility="hidden";
}
bCADRE=false;
bBULLE=false;
if(bISSET){
bISSET=false;
removeEvent(document,"mousemove",WhereMouse);
}
return (true);
}
function WhereMouse(e){
var _6c;
var Obj=null;
var _6e=true;
if(e&&e.target){
Mouse_X=e.pageX;
Mouse_Y=e.pageY;
Client_Y=e.clientY;
Obj=e.target;
if(Obj.boxObject){
with(Obj){
ZObjet.InitRECT(boxObject.x,boxObject.y,boxObject.width,boxObject.height);
}
Obj=e.originalTarget;
if(Obj){
if(Obj.prefix=="xul"){
BulleHide();
return (true);
}
}
_6e=ZObjet.PtInRECT(Mouse_X,Mouse_Y);
}
}else{
var e=window.event||window.Event;
if(document.documentElement&&document.documentElement.clientWidth){
_6c=document.documentElement;
}else{
_6c=document.body;
}
Client_Y=e.clientY;
Mouse_X=e.clientX+_6c.scrollLeft;
Mouse_Y=e.clientY+_6c.scrollTop;
}
if(window.Event&&document.captureEvents){
document.captureEvents(Event.MOUSEMOVE);
}
if(bBULLE){
if(_6e){
ObjShowAll("Bulle",Mouse_X+Decal_X,Mouse_Y+Decal_Y,1000);
}
}
if(bCADRE){
if(!ZBulle.PtInRECT(Mouse_X,Mouse_Y)){
BulleHide();
}
}
return (true);
}
function insertText(_6f,_70){
var _71=eval(_6f);
if(navigator.appName == "Microsoft Internet Explorer"){
var str=document.selection.createRange().text;
_71.focus();
var sel=document.selection.createRange();
sel.text=str+_70;
return;
}else{
oldPos=_71.scrollTop;
oldHght=_71.scrollHeight;
pos=_71.selectionEnd+_70.length;
_71.value=_71.value.substr(0,_71.selectionStart)+_71.value.substr(_71.selectionStart,_71.selectionEnd-_71.selectionStart)+_70+_71.value.substr(_71.selectionEnd);
_71.selectionStart=pos;
_71.selectionEnd=pos;
newHght=_71.scrollHeight-oldHght;
_71.scrollTop=oldPos+newHght;
}
_71.focus();
}
var isMenu=true;
var maxWidth=50;
var borderBox=false;
var horizontal=new Array();
var menuTop=new Array();
var menuHeight=new Array();
var menuLeft=new Array();
var menuWidth=new Array();
function loadMenu(i){
if(!document.getElementById){
return;
}
var j,_76,_77,_78,li,_7a,_7b;
_76=document.getElementById("menuList"+(i+1));
if(_76==null){
return;
}
_77=_76.getElementsByTagName("ul");
_7b=_76.parentNode;
if(document.createElement){
for(j=0;j<_77.length;j++){
_78=_77.item(j);
if(_78.className=="menux"&&_78.getElementsByTagName("ul").length==0){
li=document.createElement("li");
_78.appendChild(li);
li.style.position="absolute";
li.style.visibility="hidden";
}
}
if(i==0){
li.style.display="block";
li.style.padding="0";
li.style.width="2px";
li.style.border="1px solid";
if(li.offsetWidth==2){
borderBox=true;
}
}
}
initializeMenu(_76,_7b,i);
for(j=0;j<_77.length;j++){
_78=_77.item(j);
if(_78.className=="menux"){
_7a=_78.previousSibling;
while(_7a!=null){
if(_7a.className=="actuator"){
initializeSubmenu(_78,_7a,_76,_7b);
_78.set();
break;
}
_7a=_7a.previousSibling;
}
}
}
}
function initializeMenu(_7c,div,_7e){
horizontal[_7e]=menuIsHorizontal(_7c);
menuTop[_7e]=div.offsetTop;
menuHeight[_7e]=div.offsetHeight;
menuLeft[_7e]=div.offsetLeft;
menuWidth[_7e]=div.offsetWidth;
div.horizontal=function(){
return horizontal[_7e];
};
div.checkMove=function(){
if(this.hasMoved()){
this.resetMenu();
}
};
div.hasMoved=function(){
if(menuTop[_7e]==this.offsetTop&&menuHeight[_7e]==this.offsetHeight&&menuLeft[_7e]==this.offsetLeft&&menuWidth[_7e]==this.offsetWidth){
return false;
}
return true;
};
div.resetMenu=function(){
horizontal[_7e]=menuIsHorizontal(_7c);
menuTop[_7e]=this.offsetTop;
menuHeight[_7e]=this.offsetHeight;
menuLeft[_7e]=this.offsetLeft;
menuWidth[_7e]=this.offsetWidth;
var _7f=_7c.getElementsByTagName("ul");
for(var j=0;j<_7f.length;j++){
var _81=_7f.item(j);
if(_81.className=="menux"){
_81.style.right="";
_81.style.left="";
if(!window.opera){
_81.style.width="";
}
_81.set();
}
}
};
}
function menuIsHorizontal(_82){
var _83=firstElement(_82,"LI");
if(_83!=null){
var _84=_83.nextSibling;
while(_84!=null){
if(_84.tagName=="LI"){
_83=firstElement(_83,"A");
_84=firstElement(_84,"A");
if(_83!=null&&_84!=null){
if(_83.offsetLeft==_84.offsetLeft){
return false;
}
}
return true;
}
_84=_84.nextSibling;
}
}
return true;
}
function initializeSubmenu(_85,_86,_87,div){
var _89=_85.parentNode;
_89.onmouseover=function(){
div.checkMove();
_85.style.visibility="visible";
};
_86.onfocus=function(){
div.checkMove();
_85.style.visibility="visible";
};
_89.onmouseout=function(){
_85.style.visibility="";
};
var _8a=_85.getElementsByTagName("a");
var _8b=_8a.item(_8a.length-1);
if(!_8b.onblur){
_8b.onblur=function(){
var _8c=_8b.parentNode.parentNode;
while(_8c!=_85){
_8c.style.visibility="";
_8c=_8c.parentNode.parentNode;
}
_85.style.visibility="";
};
}
if(_89.parentNode==_87){
_85.set=function(){
setLocation1(this,_86,_87,div);
};
}else{
_85.set=function(){
setLocation2(this,_86,div);
};
}
}
function setLocation1(_8d,_8e,_8f,div){
var _91=firstElement(_8d,"LI");
if(_91!=null){
if(_91.offsetParent==_8d){
setWidth(_8d);
}
}
if(div.horizontal()){
if(_8e.offsetParent==_8d.offsetParent){
_8d.style.left=_8e.offsetLeft+"px";
_8d.style.top=_8e.offsetTop+_8e.offsetHeight+"px";
}else{
var _92=_8e.offsetParent;
var top=0;
var _94=0;
while(_92!=_8d.offsetParent&&_92!=null){
top=top+_92.offsetTop;
_94=_94+_92.offsetLeft;
_92=_92.offsetParent;
}
_8d.style.left=_94+_8e.offsetLeft+"px";
_8d.style.top=top+_8e.offsetTop+_8e.offsetHeight+"px";
}
}else{
_8d.style.top=_8e.offsetTop+"px";
_8d.style.left=(div.offsetWidth+_8e.offsetWidth)/2+"px";
}
}
function setLocation2(_95,_96,div){
if(_95.offsetParent!=document.body){
setWidth(_95);
}
_95.style.top=_96.offsetTop+"px";
_95.style.left=_96.offsetWidth+"px";
}
function setWidth(_98){
_98.style.right=-maxWidth+"em";
var _99=0;
var _9a=0;
var _9b=_98.getElementsByTagName("a");
for(var i=0;i<_9b.length;i++){
var _9d=_9b.item(i);
if(_9d.parentNode.parentNode==_98){
_9a=_9a+_9d.offsetHeight;
if(_9d.offsetWidth>_99){
_99=_9d.offsetWidth;
}
}
}
if(borderBox){
_99=_99+(_98.offsetHeight-_9a);
}
_98.style.width=_99+"px";
}
function firstElement(_9e,_9f){
var _a0=_9e.firstChild;
while(_a0!=null){
if(_a0.tagName==_9f){
return _a0;
}
_a0=_a0.nextSibling;
}
return null;
}
function magicLinkUpdate(_a1){
var _a2=eval("document.ajout.message");
if(navigator.appName == "Microsoft Internet Explorer"){
var str=document.selection.createRange().text;
_a2.focus();
var sel=document.selection.createRange();
sel.text=_a1.responseText;
}else{
oldPos=_a2.scrollTop;
oldHght=_a2.scrollHeight;
pos=_a2.selectionEnd;
_a2.value=_a2.value.substr(0,_a2.selectionStart)+_a1.responseText+_a2.value.substr(_a2.selectionEnd);
_a2.selectionStart=pos;
_a2.selectionEnd=pos;
newHght=_a2.scrollHeight-oldHght;
_a2.scrollTop=oldPos+newHght;
}
}
function magicLink(){
var _a5=eval("document.ajout.message");
_a5.focus();
if(navigator.appName == "Microsoft Internet Explorer"){
var str=document.selection.createRange().text;
_a5.focus();
}else{
var str=_a5.value.substr(_a5.selectionStart,_a5.selectionEnd-_a5.selectionStart);
}
var url="/remote/magiclink.php3";
var _a8="text="+escape(str);
var _a9=new Ajax.Request(url,{method:"post",postBody:_a8,onComplete:magicLinkUpdate});
}
function insertTag(_aa,tag,_ac){
var _ad=((_ac)?"</"+tag+">":"");
var Tag="<"+tag+">";
var _af=eval(_aa);
if(navigator.appName == "Microsoft Internet Explorer"){
var str=document.selection.createRange().text;
_af.focus();
var sel=document.selection.createRange();
sel.text=Tag+str+_ad;
return;
}else{
oldPos=_af.scrollTop;
oldHght=_af.scrollHeight;
pos=_af.selectionEnd+Tag.length+_ad.length;
_af.value=_af.value.substr(0,_af.selectionStart)+Tag+_af.value.substr(_af.selectionStart,_af.selectionEnd-_af.selectionStart)+_ad+_af.value.substr(_af.selectionEnd);
_af.selectionStart=pos;
_af.selectionEnd=pos;
newHght=_af.scrollHeight-oldHght;
_af.scrollTop=oldPos+newHght;
}
_af.focus();
}
