function addLoadEvent(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){b();a()}}}function trim(a){a.value=a.value.replace(/^[\s\n]+|[\s\n]+$/g,"");return(a.value)}function ValidateEmail(b){var a=/^\w+['\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,10}|\d+)$/i;return(a.test(b))}function resetform(b){var a=confirm("Are you sure you want to remove all information entered into this form?");if(a){b.reset()}else{return false}}function cancelform(b){var a=confirm("Are you sure you want to cancel?");return a}function valRadioCheckbox(c){var b=-1;for(var a=c.length-1;a>-1;a--){if(c[a].checked){b=a;a=-1}}if(b>-1){return c[b].value}else{return null}}function my$(a){return(document.getElementById(a))}function classes(a,b){b=b||document;if(b.charAt){b=document.getElementById(b)}if(b.getElementsByClassName){return b.getElementsByClassName(a)}return document.getElementsByClassName(a,b)}if(!document.getElementsByClassName){document.getElementsByClassName=function(j,g){if(!g){g=document}var h=new RegExp("(?:^|\\s)"+j+"(?:$|\\s)");var d=g.getElementsByTagName("*"),c=[],f="",e=0,b;while(b=d[e=e+1]){f=b.className;if(f&&f.indexOf(j)!==-1){if(f===j){c[c.length]=b;continue}h.test(f)?(c[c.length]=b):0}}return c}}function niceProfileLinks(){if(!document.getElementById){return false}var a=document.getElementsByClassName("profile_links");if(!a.length){return}for(var b=0;b<a.length;b++){a[b].className="profile_links";a[b].onclick=function(){window.location.href="/profile/"+this.getAttribute("title")};a[b].onmouseover=function(){this.className="profile_links over";var d=this.getElementsByTagName("img")[0].style.backgroundImage;if(d.indexOf("photos/boy")==-1&&d.indexOf("photos/girl")==-1){var c=document.createElement("img");c.setAttribute("id","previewImage");var rx=/url\(["']?([^'")]+)['"]?\)/; d=d.replace(rx,'$1').replace('/thumbs','');c.src=d;if(window.attachEvent){document.getElementById("from").style.visibility="hidden";document.getElementById("to").style.visibility="hidden"}this.appendChild(c)}};a[b].onmouseout=function(){this.className="profile_links out";img=document.getElementById("previewImage");if(window.attachEvent){document.getElementById("from").style.visibility="visible";document.getElementById("to").style.visibility="visible"}if(img){this.removeChild(img)}}}}addLoadEvent(niceProfileLinks);sfHover=function(){var c=document.getElementById("nav").getElementsByTagName("LI");for(var b=0;b<c.length;b++){c[b].onmouseover=function(){this.className+=" sfhover"};c[b].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")}}var a=document.getElementById("nav").getElementsByTagName("span");if(a.length==0){return}a[0].onmouseover=function(){this.className+=" hover"};a[0].onmouseout=function(){this.className=this.className.replace(new RegExp(" hover\\b"),"")}};if(window.attachEvent){window.attachEvent("onload",sfHover)};