var cbvisible=false;function preload(C){for(var B=0;B<C.length;B++){var A=new Image();A.src=C[B]}}function encryptValue(A){A.p.value=hex_sha1(A.password.value);A.password.setAttribute("name","pold");A.p.setAttribute("name","password");A.pold.disabled=true;return true}function encrypt_field(A){if(A.value!=""){A.value=hex_sha1(A.value)}}function findPos(A){var B=curtop=0;if(A.offsetParent){B=A.offsetLeft;curtop=A.offsetTop;while(A=A.offsetParent){B+=A.offsetLeft;curtop+=A.offsetTop}}return[B,curtop]}function positionElement(D,B,A,E){var C={top:"bottom",bottom:"top"};child=document.getElementById(D);relative=document.getElementById(B);child.style[C[A]]=0;child.style.left=0}function fixPhoneNumber(A){if(A.value.replace(/\D/g,"").length!=10){alert("Please enter a 10 digit phone number!");return false}A.value=A.value.replace(/\D/g,"");A.value=A.value.replace(/(\d{3})(\d{3})(\d{4})/,"$1-$2-$3")}function formatAsMoney(A){A-=0;A=(Math.round(A*100))/100;return(A==Math.floor(A))?A+".00":((A*10==Math.floor(A*10))?A+"0":A)}Element.prototype.fadeIn=function(){if(this.speed){op=parseFloat(this.style.opacity);speed=parseFloat(this.speed);if(op+speed<1){op=op+speed;this.style.opacity=op;this.style.filter="alpha(opacity="+(op*100)+")";self=this;window.setTimeout(function(){self.fadeIn()},10)}else{this.style.opacity="1";delete this.speed;if(this.endFunc){this.endFunc()}}}else{this.style.opacity="0";this.style.display="block";this.style.visibility="visible";this.speed=arguments[0]||0.2;this.endFunc=arguments[1]||null;this.fadeIn()}};Element.prototype.fadeOut=function(){if(this.speed){op=parseFloat(this.style.opacity);speed=parseFloat(this.speed);if(op-speed>0){op=op-speed;this.style.opacity=op;this.style.filter="alpha(opacity="+(op*100)+")";self=this;window.setTimeout(function(){self.fadeOut()},10)}else{this.style.opacity="0";this.style.display="none";delete this.speed;if(this.endFunc){this.endFunc()}}}else{this.style.opacity="1";this.style.display="block";this.style.visibility="visible";this.speed=arguments[0]||0.2;this.endFunc=arguments[1]||null;this.fadeOut()}};