(function(a){a.getElement=function(a){return document.getElementById(a)};a.hideDiv=function(b){a("#"+b).hide("slow")};a.isChosen=function(a){if(a.selectedIndex==0){alert("Please make a choice from the required "+a.name+" dropdown.");a.focus();return false}else return true};a.isNotEmpty=function(a){var b=a.value,c=/.+/;if(!b.match(c)||a.title==a.value){alert("Please fill in the required "+a.title+" field.");a.focus();a.select();return false}else return true};a.isValidRadio=function(a){for(var c=false,b=0;b<a.length;b++)if(a[b].checked)return true;alert("Make a choice from the required "+a[0].name+" radio buttons.");a[0].focus();return false},a.isEmailAddr=function(a){var b=a.value,c=/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;if(!b.match(c)){alert("Not a valid email address! \nPlease verify the e-mail address format.");a.focus();return false}else return true},a.setPhoneNumber=function(g){var d=g.value;if(d.length===0)return"please enter a phone number with area code";for(var a="",c="",e="### ###-####",b=0;b<d.length;b++){a=d.charAt(b);if(!(isNaN(a)||a===" "))c+=a}if(c.length<10)return"please include the area code";var h=0,b=0,f="";while(b<e.length&&h<c.length){a=e.charAt(b);f+=a==="#"?c.charAt(h++):a;b++}g.value=f;return""};a.parseNumber=function(a){a=a.toString().replace(/\$/,"").replace(/\%/,"").replace(/px/,"").replace(/,/,"");return isNaN(parseFloat(a))?0:parseFloat(a)};a.isNumber=function(c,b){var a=c.value,d=/^[-]?\d*\.?\d*$/;a=a.toString();if(!a.match(d)){b&&alert("Enter only numbers into this field.");return false}return true};a.isEncodedHtml=function(a){return a.search(/&amp;/g)!=-1||a.search(/&lt;/g)!=-1||a.search(/&gt;/g)!=-1?true:false};a.decodeHtml=function(a){return a.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")};a.manualSubmit=function(b){var a=document.forms[0];a.action=b;a.submit()}})(jQuery)
