function getObject(objIdentifier){var myObj=null;if(document.layers){myObj=eval("document."+objIdentifier);if(!myObj){for(var index=0;index<document.layers.length;index++){if(eval("document."+document.layers[index].id)&&eval("document."+document.layers[index].id+".document."+objIdentifier)){myObj=eval("document."+document.layers[index].id+".document."+objIdentifier);break}}}}else{if(document.getElementById){myObj=eval("document.getElementById('"+objIdentifier+"')")}else{myObj=eval("document.all['"+objIdentifier+"']")}}return myObj}function removeInvalidCharacters(a){return a.replace(/[^\w\s\-']/gi,"")}function show(b){var a=getObject(b);if(a){a.style.display="block"}else{error("Invalid ID passed to show(). Invalid ID: "+b)}}function hide(b){var a=getObject(b);if(a){a.style.display="none"}else{error("Invalid ID passed to hide(). Invalid ID: "+b)}}function showElem(a){if(a){a.style.display="block"}else{error("Invalid Element passed to showElem()")}}function hideElem(a){if(a){a.style.display="none"}else{error("Invalid Element passed to hideElem()")}}function toggle(b){var a=getObject(b);if(a){if(a.style.display=="none"){a.style.display="block"}else{a.style.display="none"}}else{error("Invalid ID passed to toggle(). Invalid ID: "+b)}}function addLoadEvent(b){var a=window.onload;if(typeof window.onload!="function"){window.onload=b}else{window.onload=function(){a();b()}}}function setCookie(b,d,c,a,f,e){var g=b+"="+escape(d)+((c)?"; expires="+c.toGMTString():"")+((a)?"; path="+a:"")+((f)?"; domain="+f:"")+((e)?"; secure":"");document.cookie=g}function contentSearch(a){if(a.length>0){window.location.href="/search/"+removeInvalidCharacters(a)}else{alert("You must enter a search string.")}}function categoryRedirect(a){domain=window.location.href.match(/(https?:\/\/)([^\/]*).*/);if(a.length){window.location.href=domain[1]+domain[2]+a}else{alert("Please select a team!")}}function getKeyCode(a){var b;if(a&&a.which){a=a;b=a.which}else{a=event;b=a.keyCode}return b}function submitSearchFromEnter(a,b){if(getKeyCode(a)==13&&b!==""){contentSearch(b);return false}return true}function FindElementByPartialName(d,b){var g="false";var e="not found";var c=document.forms[0].getElementsByTagName(b);for(i=0;i<c.length;i++){var f=c[i];if(f.id!==""){var a=f.id;if(a.indexOf(d)>=0){e=a}}}return e}function isNumberKey(a){var b=a.which?a.which:event.keyCode;if(b>31&&(b<48||b>57)){return false}else{return true}}function doSweepsEnter(b,d,a){if(getKeyCode(b)==13){var f=document.getElementById(d);if(f.value!=="Enter Email Address"&&f.value!==null){var c=document.getElementById(a);WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(a,"",true,"sweepsEntry","",false,false))}}}function getAbsolutePosition(a){var c={x:a.offsetLeft,y:a.offsetTop};if(a.offsetParent){var b=getAbsolutePosition(a.offsetParent);c.x+=b.x;c.y+=b.y}return c}function findPosX(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetLeft;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.x){a+=b.x}}return a}function findPosY(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetTop;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.y){a+=b.y}}return a}function PositionMe(b,a,d,c){b=document.getElementById(b);a=document.getElementById(a);b.style.top=findPosY(a)-d;b.style.left=findPosX(a)-c}function formatCurrency(d){d=d.toString().replace(/$|,/g,"");if(isNaN(d)){d="0"}var a=(parseInt(d,10)===parseInt(Math.abs(d),10));d=Math.floor(d*100+0.50000000001);var c=d%100;d=Math.floor(d/100).toString();if(c<10){c="0"+c}for(var b=0;b<Math.floor((d.length-(1+b))/3);b++){d=d.substring(0,d.length-(4*b+3))+","+d.substring(d.length-(4*b+3))}return((a?"":"-")+"$"+d+"."+c)}function flipDivWithToggleImage(a,b){var c=getObject(b);if(c.src=="http://images.footballfanatics.com/FF_deletebutton_100108.gif"){c.src="http://images.footballfanatics.com/FF_addbutton_100108.gif";hide(a)}else{c.src="http://images.footballfanatics.com/FF_deletebutton_100108.gif";show(a)}return false}function toggleTargetDisplay(a){jQuery("div#"+a).toggleClass("display")}function emailSignup(c,d,f){var b=jQuery("#"+c);var a=jQuery("#"+d);var e="";if(a.length>0){e="/Services/EmailSignup.ashx?email="+b.val()+"&team="+a.val()+"&teamname="+jQuery("#"+d+" option:selected").text()}else{e="/Services/EmailSignup.ashx?email="+b.val()+"&singleteam=true"}jQuery(f).attr("disabled","disabled");jQuery.getJSON(e,function(g){alert(g.ErrorMessage);if(g.Result==true){b.val("");a.val("")}else{if(g.ErrorSource=="email"){b.focus()}else{a.focus()}}jQuery(f).removeAttr("disabled")})};
