var MultiText={multitextWizard:function(c,d,o){var t=$(o);var s=t.getFirst();var a=s.getNext();var k=a.getChildren();var m=$(c).getParent();var e=m.getParent();var l=e.getChildren();var h=0;var n=null;for(var r=0;r<l.length;r++){if(l[r]==m){break}h++}Backend.getScrollOffset();switch(d){case"rnew":var b=new Element("tr");var f=e.getChildren();for(var r=0;r<f.length;r++){var p=f[r].clone(true).inject(b);if(!n){n=p.getFirst()}p.getFirst().value=""}b.inject(e,"after");break;case"rcopy":var b=new Element("tr");var f=e.getChildren();for(var r=0;r<f.length;r++){var p=f[r].clone(true).inject(b);if(!n){n=p.getFirst()}p.getFirst().value=f[r].getFirst().value}b.inject(e,"after");break;case"rup":e.getPrevious()?e.inject(e.getPrevious(),"before"):e.inject(a);break;case"rdown":e.getNext()?e.inject(e.getNext(),"after"):e.inject(a.getFirst().getNext(),"before");break;case"rdelete":(k.length>1)?e.dispose():null;break}k=a.getChildren();for(var r=0;r<k.length;r++){var f=k[r].getChildren();for(var q=0;q<f.length;q++){var g=f[q].getFirst();if(g&&g.type.toLowerCase()=="text"){g.name=g.name.replace(/\[[0-9]+\][[0-9]+\]/ig,"["+r+"]["+q+"]")}}}if(n){n.select()}}};