var Global=this;Date.DAYNAMES=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.prototype.DAYNAMES=Date.DAYNAMES;Date.MONTHNAMES=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.prototype.MONTHNAMES=Date.MONTHNAMES;Date.prototype.getFullDay=function(){return this.DAYNAMES[this.getDay()]};Date.prototype.getFullMonth=function(){return this.MONTHNAMES[this.getMonth()]};Date.prototype.getMonthAbbr=function(){return this.getFullMonth().slice(0,3)};Date.prototype.defaultString=function(){return this.getFullMonth()+" "+this.getDate()+", "+this.getFullYear()};function rewrite_link(F,D,A){var E=F.parentNode;if(!E){return }var C=document.createElement("a");C.setAttribute("href",A);if(F.getAttribute("class")){var B=F.getAttribute("class");C.setAttribute("class",B);C.setAttribute("className",B)}var D=document.createTextNode(D);C.appendChild(D);E.replaceChild(C,F);return C}function addChildren(C,B){for(var A=0;A<B.length;A++){C.appendChild(B[A])}}function setZIndex(A,B){var C=document.getElementById(A);C.style.zIndex=B}function changeBorderColor(A,B){var C=document.getElementById(A);C.style.borderColor=B}function changeBackgroundColor(A,B){var C=document.getElementById(A);C.style.backgroundColor=B}function changeBackgroundColorNoID(B,A){B.style.backgroundColor=A}function changeColor(A,B){var C=document.getElementById(A);C.style.color=B}function setFloat(A,C){var B=document.getElementById(A);B.style.cssFloat=C;B.style.styleFloat=C}function get_class_names_by_id(A){var B=document.getElementById(A);if(B){return get_class_names_by_element(B)}else{return new Array()}}function get_class_names_by_element(A){if(A.className){var B=A.className;B=strip(B);return B.split(/\s+/)}else{return new Array()}}function showElement(A,C){if(!C&&C!=""){C="block"}var B=document.getElementById(A);if(B){B.style.display=C}}function showElementNoID(A,B){if(!B){B=""}A.style.display=B}function hideElement(A){var C="none";var B=document.getElementById(A);if(B){B.style.display=C}}function hideElementNoID(A){var B="none";A.style.display=B}function changeElementClass(B,A){var C=document.getElementById(B);C.className=A}function changeElementClassNoID(B,A){B.className=A}function appendElementClass(A,C){var B=document.getElementById(A);B.className+=C}function makeParamString(F,E){if(!F){return""}return F;if(!E){E=false}else{E=true}var A=new Array();for(var B in F){value=F[B];if(E==true){B=escape(B);value=escape(value)}var D=B+"="+value;A.push(D)}var C=A.join("&");return C}function swap_content(A,B){showElement(A);hideElement(B)}function strip(A){A=A.replace(/^\s+/,"");A=A.replace(/\s+$/,"");return A}function trim(A){return strip(A)}function redirect_to(A){document.location=A}function getCookieVal(A){return get_cookie_val(A)}function get_cookie_val(C){var E;var D=document.cookie;if(!D){return E}C=C+"=";var B=C.length;var G=D.indexOf(C);if(G!=-1){var F=G+B;var A=D.indexOf(";",F);if(A==-1){A=D.length}E=D.substring(F,A)}return E}function textLimit(B,A,C){if(B.value.length>A){B.value=B.value.substring(0,A);if(C!=null){alert(C)}}}function checkEquality(A,C,B){if(A.value==C.value){return true}else{if(B!=null){alert(B)}return false}}function show(A){if(document.getElementById&&document.getElementById(A)!=null){document.getElementById(A).style.visibility="visible"}else{if(document.layers&&document.layers[A]!=null){document.layers[A].visibility="visible"}else{if(document.all){document.all[A].style.visibility="visible"}}}}function hide(A){if(document.getElementById&&document.getElementById(A)!=null){document.getElementById(A).style.visibility="hidden"}else{if(document.layers&&document.layers[A]!=null){document.layers[A].visibility="hidden"}else{if(document.all){document.all[A].style.visibility="hidden"}}}}function delete_cookie(C){var B=getCookieVal(C);if(B){var D="/";var A=new Date();A.setHours(A.getHours()-1);document.cookie=C+"="+D+";path=/;expires="+A.toGMTString()}}function deleteCookie(A){delete_cookie(A)}function in_array(B,C){var D=false;for(var A=0;A<C.length;A++){if(C[A]==B){D=true;break}}return D}function remove_child_nodes(A){if(A&&A.childNodes){while(A.hasChildNodes()){A.removeChild(A.firstChild)}}}function imgOn(imgName){if(document.images){onImage=eval(imgName+"on.src");document[imgName].src=onImage}}function imgOff(imgName){if(document.images){offImage=eval(imgName+"off.src");document[imgName].src=offImage}}function Utf8(){}Utf8.encode=function(B){B=B.replace(/\r\n/g,"\n");var A="";for(var D=0;D<B.length;D++){var C=B.charCodeAt(D);if(C<128){A+=String.fromCharCode(C)}else{if((C>127)&&(C<2048)){A+=String.fromCharCode((C>>6)|192);A+=String.fromCharCode((C&63)|128)}else{A+=String.fromCharCode((C>>12)|224);A+=String.fromCharCode(((C>>6)&63)|128);A+=String.fromCharCode((C&63)|128)}}}return A};Utf8.decode=function(A){var C="";var E=0;var G=0;var F=0;var D=0;while(E<A.length){G=A.charCodeAt(E);if(G<128){C+=String.fromCharCode(G);E++}else{if((G>191)&&(G<224)){D=A.charCodeAt(E+1);C+=String.fromCharCode(((G&31)<<6)|(D&63));E+=2}else{D=A.charCodeAt(E+1);var B=A.charCodeAt(E+2);C+=String.fromCharCode(((G&15)<<12)|((D&63)<<6)|(B&63));E+=3}}}return C};function url_switch_hosts(B,C,A){B=B.replace(C,A);return B}function random_string(D){var C=Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");var B="";for(var A=0;A<=D;A++){B+=C[Math.floor(Math.random()*52)]}return B}function isPDF(A){if(A.indexOf(".pdf")!=-1||A.indexOf(".PDF")!=-1){return true}else{return false}}function isJavaWebStart(A){if(A.indexOf(".jnlp")!=-1||A.indexOf(".JNLP")!=-1){return true}else{return false}}function FormHelper(){}FormHelper.throw_errors=false;FormHelper.trim_values=true;FormHelper.get_missing_fields=function(B,C){var D="Please fill in the following field(s): FIELD_NAMES and re-submit.";var A={missing_field_ids:new Array(),has_missing_fields:false,message:D,missing_field_labels:new Array()};for(var F in B){var E=FormHelper.get_value(F);if(E&&C&&C[F]&&in_array(E,C[F])){E=""}if(!E){A.missing_field_ids.push(F);A.missing_field_labels.push(B[F])}}if(A.missing_field_ids.length>0){A.has_missing_fields=true;A.message=A.message.replace("FIELD_NAMES",A.missing_field_labels.join(", "))}return A};FormHelper.fields_are_equal=function(C){if(C.length<2){if(FormHelper.throw_errors){throw new Error("Not enough ids passed.")}else{return null}}var A=new Array();for(var B=0;B<C.length;B++){var D=FormHelper.get_value(C[B]);if(!in_array(D,A)){A.push(D)}}if(A.length==1){return true}else{return false}};FormHelper.get_value=function(C){var A="";var B=document.getElementById(C);if(!B&&FormHelper.throw_errors){throw new Error("No form field found with id of "+C)}else{if(!B){return A}else{if(typeof (B.value)=="undefined"&&FormHelper.throw_errors){throw new Error("Element with id of "+C+" has no 'value' attribute!")}else{if(typeof (B.value)=="undefined"){return A}}}}A=B.value;if(FormHelper.trim_values){return trim(A)}else{return A}};FormHelper.get_edited_value=function(C,A){var B=FormHelper.get_value(C);if(B&&A&&in_array(B,A)){B=""}return B};FormHelper.get_selected_checkboxes=function(A,H){var G=document.getElementById(A);var C=new Array();for(var D=0;D<G.elements.length;D++){var F=G.elements[D];if(F.name&&F.name==H){C.push(F)}}var B=new Array();for(var D=0;D<C.length;D++){var E=C[D];if(E.checked==true){B.push(E.value)}}return B.join(",")};FormHelper.get_selected_radiobutton=function(A,H){var G=document.getElementById(A);var B=new Array();for(var D=0;D<G.elements.length;D++){var F=G.elements[D];if(F.name&&F.name==H){B.push(F)}}var E="";for(var D=0;D<B.length;D++){var C=B[D];if(C.checked==true){E=C.value;break}}return E};FormHelper.disable=function(B){var A=document.getElementById(B);A.disabled=true};FormHelper.enable=function(B){var A=document.getElementById(B);A.disabled=false};function Logger(){}Logger.log=function(A){if(Global.console){Global.console.log(A)}else{if(window.console){window.console.log(A)}}};
