function selectShow(G,F){var D=null;var C=document.getElementById(F).codeType;if(G!=null&&G.options.length>0){D=G.value}if(D==null||D==""){if(document.getElementById(F).options[0].value==0){document.getElementById(F).length=1}else{document.getElementById(F).length=0}if(F!=null){document.getElementById(F).onchange()}return }var B="/showCode.do";if(D!=null){var H="type="+C+"&filter="+D}else{var H="type="+C}var A=function(I){_isRuning=false;alert("Error "+I.status+" -- "+I.statusText)};var E=function(I){if(F!=null){setSelect(document.getElementById(F),I.responseText)}var J=document.getElementById(F).onchange;J=""+J;J=J.substring(J.indexOf("selectShow(")+"selectShow(".length);J=J.substring(6,J.indexOf(")")-1);selectShow(document.getElementById(F),J)};new Ajax.Request(B,{asynchronous:true,method:"post",postBody:H,onSuccess:E,onFailure:A})}function setSelect(A,F){A.options.length=1;if(A.options[0].value==""){var E=1}else{E=0}var C;var D;var B=F.indexOf(",");while(B>0){C=F.substring(0,B);F=F.substring(B+1);B=F.indexOf(",");if(B>0){D=F.substring(0,B);F=F.substring(B+1)}else{D=F}A.options[E]=new Option(D,C);B=F.indexOf(",");E++}};