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(A){var B=window.onload;if(typeof window.onload!="function"){window.onload=A}else{window.onload=function(){B();A()}}}function setCookie(C,E,A,G,D,F){var B=C+"="+escape(E)+((A)?"; expires="+A.toGMTString():"")+((G)?"; path="+G:"")+((D)?"; domain="+D:"")+((F)?"; secure":"");document.cookie=B}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(/(http:\/\/)([^\/]*).*/);if(A.length){window.location.href=domain[1]+domain[2]+A}else{alert("Please select a team!")}}function getKeyCode(B){var A;if(B&&B.which){B=B;A=B.which}else{B=event;A=B.keyCode}return A}function submitSearchFromEnter(B,A){if(getKeyCode(B)==13&&A!==""){contentSearch(A);return false}return true}function FindElementByPartialName(C,E){var F="false";var B="not found";var A=document.forms[0].getElementsByTagName(E);for(i=0;i<A.length;i++){var D=A[i];if(D.id!==""){var G=D.id;if(G.indexOf(C)>=0){B=G}}}return B}function isNumberKey(B){var A=B.which?B.which:event.keyCode;if(A>31&&(A<48||A>57)){return false}else{return true}}function doSweepsEnter(D,E,A){if(getKeyCode(D)==13){var C=document.getElementById(E);if(C.value!=="Enter Email Address"&&C.value!==null){var B=document.getElementById(A);WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(A,"",true,"sweepsEntry","",false,false))}}}function getAbsolutePosition(B){var C={x:B.offsetLeft,y:B.offsetTop};if(B.offsetParent){var A=getAbsolutePosition(B.offsetParent);C.x+=A.x;C.y+=A.y}return C}function findPosX(A){var B=0;if(A.offsetParent){while(1){B+=A.offsetLeft;if(!A.offsetParent){break}A=A.offsetParent}}else{if(A.x){B+=A.x}}return B}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(C,B,D,A){C=document.getElementById(C);B=document.getElementById(B);C.style.top=findPosY(B)-D;C.style.left=findPosX(B)-A}function formatCurrency(C){C=C.toString().replace(/$|,/g,"");if(isNaN(C)){C="0"}var B=(parseInt(C,10)===parseInt(Math.abs(C),10));C=Math.floor(C*100+0.50000000001);var A=C%100;C=Math.floor(C/100).toString();if(A<10){A="0"+A}for(var D=0;D<Math.floor((C.length-(1+D))/3);D++){C=C.substring(0,C.length-(4*D+3))+","+C.substring(C.length-(4*D+3))}return((B?"":"-")+"$"+C+"."+A)}function flipDivWithToggleImage(C,B){var A=getObject(B);if(A.src=="http://images.footballfanatics.com/FF_deletebutton_100108.gif"){A.src="http://images.footballfanatics.com/FF_addbutton_100108.gif";hide(C)}else{A.src="http://images.footballfanatics.com/FF_deletebutton_100108.gif";show(C)}return false}function removeSpaces(A){var B=document.getElementById(A);B.value=B.value.replace(" ","")}function toggleTargetDisplay(A){jQuery("div#"+A).toggleClass("display")}function emailSignup(D,C,B){var A="/Services/EmailSignup.ashx?email="+jQuery("#"+D).val()+"&team="+jQuery("#"+C).val()+"&teamname="+jQuery("#"+C+" option:selected").text();jQuery(B).attr("disabled","disabled");jQuery.getJSON(A,function(E){alert(E.ErrorMessage);if(E.Result==true){jQuery("#"+D).val("");jQuery("#"+C).val("")}else{if(E.ErrorSource=="email"){jQuery("#"+D).focus()}else{jQuery("#"+C).focus()}}jQuery(B).removeAttr("disabled")})};