Event.observe(window,"load",function(){var a=document.getElementById("name");if(a){a.focus()}setMaxLength();initSearch("CV-SearchText");initVoteButtonMouseovers();initGetListedButtonMouseovers()});function getText(a){if(a.textContent){return a.textContent}return a.innerText}function initVoteButtonMouseovers(){$$("#CV .CV-MainBody .CV-VoteButton").each(function(a){Event.observe(a,"mouseover",function(b){a.src=a.src.replace("color=drkyellow","color=drkyellow-hover")});Event.observe(a,"mouseout",function(b){a.src=a.src.replace("color=drkyellow-hover","color=drkyellow")});Event.observe(a,"focus",function(b){a.src=a.src.replace("color=drkyellow","color=drkyellow-hover")});Event.observe(a,"blur",function(b){a.src=a.src.replace("color=drkyellow-hover","color=drkyellow")})});$$("#CV .img-btn").each(function(a){if(a.hoverHookedUp){return}Event.observe(a,"mouseover",function(b){a.src=a.src.replace("color=default","color=default-hover")});Event.observe(a,"focus",function(b){if(a.src.search("default-hover")>-1){return}a.src=a.src.replace("color=default","color=default-hover")});Event.observe(a,"mouseout",function(b){a.src=a.src.replace("color=default-hover","color=default")});Event.observe(a,"blur",function(b){a.src=a.src.replace("color=default-hover","color=default")});a.hoverHookedUp=true})}function initGetListedButtonMouseovers(){$$("#CV .CV-AreYouTheOwner .CV-GetListedButton").each(function(b){Event.observe(b,"mouseover",function(a){b.removeClassName("CV-GetListedButtonReg");b.addClassName("CV-GetListedButtonHov")});Event.observe(b,"mouseout",function(a){b.removeClassName("CV-GetListedButtonHov");b.addClassName("CV-GetListedButtonReg")})})}function initSearch(a){var b=$(a);if(!b){return}if(b.value==""){b.parentNode.getElementsByTagName("label")[0].style.textIndent="0"}else{b.parentNode.getElementsByTagName("label")[0].style.textIndent="-999px"}b.onfocus=function(){b.parentNode.getElementsByTagName("label")[0].style.textIndent="-999px"};b.onblur=function(){if(b.value==""){b.parentNode.getElementsByTagName("label")[0].style.textIndent="0"}}}function setMaxLength(){var a=document.getElementsByTagName("textarea");for(var b=0;b<a.length;b++){if(a[b].getAttribute("maxlength")){a[b].onkeyup=a[b].onchange=checkMaxLength;a[b].onkeyup()}}}function checkMaxLength(){var a=this.getAttribute("maxlength");var b=this.value.length;if(b>a){this.value=this.value.substr(0,500)}};