var categoryActiveSelectObj=Class.create();categoryActiveSelectObj.prototype={initialize:function(d,a,c,b,e){this.target=$(a);this.defaultName=e?e:"-- Choose below --";this.cached=b||true;this.cleared=false;new ajaxWaitingObject(d,c,{build:[this],behavior:[this],hide:[this],fetch:[this],retrieve:[this],show:[this],fail:[this]},{startWithData:false})},clear:function(){this.hide();this._clearTarget()},_clearTarget:function(){this.target.options.length=0;this.target.selectedIndex=0},build:function(a){if(this.target.options.length<2&&this.target.options[0].innerHTML==this.defaultName){this.clear()}},behavior:function(a){var b=a.getPopulate();b.observe("change",function(c,f){try{this.target.clear()}catch(d){}finally{f._callAjax()}}.bindAsEventListener(this,a));b.clear=this.clear.bind(this)},hide:function(a){this.target.style.display="none"},fetch:function(a){var c=a.getPopulate();var b="";if(!this.cached){b+="nocache=1&"}if(c.selectedIndex&&c.selectedIndex>0){b+="prereq="+c.options[c.selectedIndex].value}a.setDatasourceParams(b)},retrieve:function(g,j,c){var d,b,h,e;this._clearTarget();j=j.getElementsByTagName("root")[0];e=j.getElementsByTagName("options");h=e[0].getElementsByTagName("option");if(h.length>0){var a;for(var f=0;f<h.length;f++){if(f===0){a=document.createElement("option");a.value="";a.innerHTML=this.defaultName;this.target.appendChild(a)}d=h[f].getAttributeNode("id")?h[f].getAttributeNode("id").nodeValue:null;b=h[f].firstChild.nodeValue?h[f].firstChild.nodeValue:null;if(d&&b){a=document.createElement("option");a.value=d;a.innerHTML=b;this.target.appendChild(a)}}}else{this.clear()}},show:function(a){this.target.style.display="block"},fail:function(b,a){alert("An error occured while receiving options.")}};