YAHOO.util.Dispatcher.init({relative:true});getUrlEncodedKey=function(a,d){if(!d){d=window.location.search}var b=new RegExp("[?|&]"+a+"=(.*?)&");var c=b.exec(d+"&");if(!c||c.length<2){return""}return decodeURIComponent(c[1].replace("+"," "))};setUrlEncodedKey=function(a,e,d){d=d||window.location.search;var c=d+"&";var b=new RegExp(a+"=.*?&");if(!b.test(c)){c+=a+"="+encodeURI(e)}else{c=c.replace(b,a+"="+encodeURIComponent(e)+"&")}c=c.trimStart("&").trimEnd("&");return c};String.prototype.trimEnd=function(a){if(a){return this.replace(new RegExp(a.escapeRegExp()+"*$"),"")}return this.replace(/\s+$/,"")};String.prototype.trimStart=function(a){if(a){return this.replace(new RegExp("^"+a.escapeRegExp()+"*"),"")}return this.replace(/^\s+/,"")};String.prototype.escapeRegExp=function(){return this.replace(/[.*+?^${}()|[\]\/\\]/g,"\\$0")};getDynamicParamList=function(strparams,mode){var outparamlist_str="";var outparamlist_obj={};if(typeof(mode)=="undefined"){mode="string"}if(strparams===null||strparams===""){if(mode=="object"){return null}else{return outparamlist_str}}var inparamlist=strparams.split("&");for(var inparam_index=0;inparam_index<inparamlist.length;inparam_index++){var paramdef=inparamlist[inparam_index];var arr=paramdef.split(":");var alias="";var elemid="";var code="";var value="";if(arr.length==3){alias=arr[0];code=arr[2]}else{if(arr.length==2){alias=arr[0];elemid=arr[1]}else{if(arr.length==1){elemid=arr[0];alias=elemid}}}if(elemid!=""){value=encodeURIComponent(getControlValue(elemid))}else{value=eval(code)}if(outparamlist_str.length>0){outparamlist_str+="&"}outparamlist_str+=alias+"="+encodeURIComponent(value);outparamlist_obj[alias]=encodeURIComponent(value)}if(mode=="string"){return outparamlist_str}else{return outparamlist_obj}};getControlValue=function(b){var d="";var c=document.getElementById(b);if(c!=undefined){switch(c.tagName.toLowerCase()){case"input":switch(c.type.toLowerCase()){case"checkbox":d=(c.checked?"1":"0");break;case"radio":controlObjs=document.getElementsByName(c.name);for(var a=0;a<controlObjs.length;a++){if(controlObjs[a].checked==true){d=controlObjs[a].value;break}}break;case"text":default:d=c.value;break}break;case"div":case"span":d=c.innerHTML;break;default:d=c.value;break}}return d};getControl=function(a){var b=document.getElementById(a);if(b!=undefined){return b}else{return null}};enableControl=function(a){control=getControl(a);if(control){control.disabled=false}};disableControl=function(a){control=getControl(a);if(control){control.disabled=true}};addCustomTag=function(b,c,a){if(!window.custom_taglist){window.custom_taglist=[];window.custom_tagidlist=[]}if(window.custom_taglist[b]==null){window.custom_taglist[b]=[]}window.custom_taglist[b][c]=a;window.custom_tagidlist[c]=a};getCustomTag=function(a){return window.custom_tagidlist[a]};removeCustomTag=function(a){window.custom_tagidlist[a]=null};getTypedCustomTag=function(a,b){typearr=window.custom_taglist[a];if(typearr!=null){return typearr[b]}return null};getTagValue=function(a){return document.getElementById(a).value};getTagProperty=function(property,id){return eval("document.getElementById(id)."+property)};setTagProperty=function(b,c,a){document.getElementById(c)[b]=a};update_sections=function(a,b){update_elements("section",a,b)};update_elements=function(b,a,c){var e=window.custom_taglist[b];if(e){for(i=0;i<a.length;i++){if(e[a[i]]!=null){var d=null;if(c){d=c[i]}e[a[i]].update(d)}}}};create_overlay=function(){ovl=document.createElement("div");ovl.setAttribute("id","overlay");ovl.className="overlay";document.body.appendChild(ovl)};destroy_overlay=function(){ovl=document.getElementById("overlay");document.body.removeChild(ovl)};show_div=function(a){var b=document.getElementById(a);b.style.display="block"};hide_div=function(a){var b=document.getElementById(a);b.style.display="none"};
