function getIDs(C){var B="";for(var A=0;A<C.length;A++){if(A>0){B+=","}B+=C.options[A].value}return B}function moveUp(A){return moveUp(A,"")}function moveUp(E,C){if(E.selectedIndex==-1&&0<C.length){alert(C);return false}for(var D=0;D<E.options.length;D++){if(E.options[D].selected){if(0<D){var B=new Option(E.options[D].text,E.options[D].value,E.options[D].defaultSelected,E.options[D].selected);var A=new Option(E.options[D-1].text,E.options[D-1].value,E.options[D-1].defaultSelected,E.options[D-1].selected);
E.options[D-1]=B;E.options[D]=A}}}}function moveDown(B,A){return moveDown(B,"")}function moveDown(B,A){if(B.selectedIndex==-1&&0<A.length){alert(A);return false}for(var C=B.options.length-1;0<=C;C--){if(B.options[C].selected){if(C<B.options.length-1){var E=new Option(B.options[C].text,B.options[C].value,B.options[C].defaultSelected,B.options[C].selected);var D=new Option(B.options[C+1].text,B.options[C+1].value,B.options[C+1].defaultSelected,B.options[C+1].selected);B.options[C+1]=E;B.options[C]=D
}}}}function merge(G,F,E){var C=0;var D=0;var B=0;var A=F.length+E.length;while(G.length<A){if(D==F.length){G[G.length]=E[B++]}else{if(B==E.length){G[G.length]=F[D++]}else{if(F[D].text+""<E[B].text+""){G[G.length]=F[D++]}else{if(F[D].text+"">E[B].text+""){G[G.length]=E[B++]}else{G[G.length]=F[D++]}}}}}}function stack(B,A,D){for(var C=0;C<A.length;C++){B[B.length]=A[C]}for(var C=0;C<D.length;C++){B[B.length]=D[C]}}function addToList(C,E,B){var A=new Array();if(B=="sorted"){E=E.sort(function(H,G){var F=0;
if((H.text+"")<(G.text+"")){F=-1}else{if((H.text+"")>(G.text+"")){F=1}else{F=0}}return F});merge(A,C.options,E)}else{if(B=="top"){stack(A,E,C.options)}else{stack(A,C.options,E)}}for(var D=0;D<A.length;D++){C.options[D]=A[D]}}function moveListItem(C,B,A){return moveListItem(C,B,A,"")}function moveListItem(F,E,B,G){if(F.selectedIndex==-1&&0<G.length){alert(G);return false}var D=F.selectedIndex;if(D!=-1&&F.options.length>0){var C=new Array();var A=0;while(A<F.options.length){if(F.options[A].selected){C[C.length]=new Option(F.options[A].text,F.options[A].value,F.options[A].defaultSelected,F.options[A].selected);
F.options[A]=null}else{A++}}addToList(E,C,B)}}function deleteListItem(A){if(A.selectedIndex!=-1){A.options[A.selectedIndex]=null}}String.prototype.trim=function(){var A=this;A=A.replace(/^\s*(.*)/,"$1");A=A.replace(/(.*?)\s*$/,"$1");return A};String.prototype.escapeHTML=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};
