function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest();}catch(e){xmlhttp=false;}}
function saveSkin(tid){var skin=document.getElementById('skinType').value;xmlhttp.open("GET","AJX-functions.asp?SAVESKIN="+skin+"&tid="+tid+"",true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById('saveStatus').innerHTML=xmlhttp.responseText;}};xmlhttp.send(null);}
function showAllTeams(){xmlhttp.open("GET","AJX-View-All-Teams.asp",true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){toggle_visibility('floatdiv');document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById('showAll').style.display='block';document.getElementById('newContent').innerHTML=xmlhttp.responseText;}};xmlhttp.send(null);}
function hideAllTeams(){toggle_visibility('floatdiv');document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none';document.getElementById('showAll').style.display='none';}
function TeamsInLeague(LID){xmlhttp.open("GET","AJX-Hover-League-Teams.asp?LID="+LID,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById('hideTeams').style.display='inline';document.getElementById('showTeams').style.display='none';document.getElementById('LeagueTeams').style.display='block';document.getElementById('LeagueTeams').innerHTML=xmlhttp.responseText;}};xmlhttp.send(null);}
function hideTeamsInLeague(){document.getElementById('LeagueTeams').style.display='none';document.getElementById('showTeams').style.display='inline';document.getElementById('hideTeams').style.display='none';}
function editMyInfo(editType){xmlhttp.open("GET","AJX-Edit-My-Info.asp?type="+editType,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById('EditMyInfo').style.display='block';toggle_visibility('floatdiv');document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById('MyInfo').innerHTML=xmlhttp.responseText;}};xmlhttp.send(null);}
function UploadAvatar(){toggle_visibility('floatdiv');document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';toggle_visibility('upload');}
function cancelUploadAvatar(){toggle_visibility('floatdiv');document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';toggle_visibility('upload');}
function getRoster(uid,tid){xmlhttp.open("GET","AJX-Show-Roster-Details.asp?uid="+uid+"&tid="+tid,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById('detail').style.display='block';toggle_visibility('floatdiv');document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById('RosterDetail').innerHTML=xmlhttp.responseText;}};xmlhttp.send(null);}
function closeRoster(){toggle_visibility('floatdiv');document.getElementById('detail').style.display='none';document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none';}
function getInvite(id,tid){xmlhttp.open("GET","AJX-Show-invitation-Details.asp?id="+id+"&tid="+tid,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById('invite').style.display='block';toggle_visibility('floatdiv');document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById('InvitationDetail').innerHTML=xmlhttp.responseText;}};xmlhttp.send(null);}
function closeInvite(){toggle_visibility('floatdiv');document.getElementById('invite').style.display='none';document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none';}
function sendReminder(id,tid){xmlhttp.open("GET","AJX-Send-Reminder-invitation.asp?id="+id+"&tid="+tid,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById('InvitationDetail').innerHTML=xmlhttp.responseText;}};xmlhttp.send(null);}
function viewMedia(aid,tid,page){xmlhttp.open("GET","AJX-View-Photos.asp?tid="+tid+"&albumid="+aid+"&page="+page,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById('allAlbums').innerHTML=xmlhttp.responseText;document.getElementById('loading').style.display='none';}};xmlhttp.send(null);}
function loadAlbum(tid){xmlhttp.open("GET","AJX-Load-Albums.asp?tid="+tid,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById('allAlbums').innerHTML=xmlhttp.responseText;}};xmlhttp.send(null);}

function showNewteam(){toggle_visibility('floatdiv');document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById('teamInfo').style.display='block';}
function closeNewteam(){toggle_visibility('floatdiv');document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none';document.getElementById('teamInfo').style.display='none';}
function openMyStuff(displayType) {if (displayType === "show") {document.getElementById('openIcon').style.display='none';document.getElementById('closeIcon').style.display='block';document.getElementById('myStuffBox').style.display='block';} else {document.getElementById('openIcon').style.display='block';document.getElementById('closeIcon').style.display='none';document.getElementById('myStuffBox').style.display='none';}} 
function loadHelpFile() {
var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest();}catch(e){xmlhttp=false;}}
xmlhttp.open("GET","../functions/functions-faq.asp?display=view",true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
 document.getElementById('helpBlock').innerHTML="<a href=javascript:void(0); style=float:right;margin:8px; onclick=document.getElementById('helpBlock').style.display='none';Effect.Fade('bgShade');>Close Help</a>"+xmlhttp.responseText+"<div id='faqs' style='height:330px;width100%;overflow:auto;clear:both;'></div>";document.getElementById('helpBlock').style.display='block';}};xmlhttp.send(null);
}
function loadPullout(type) {
var pulloutBlock = "pullout"+type;
var loadButton = "load"+type+"PO";
var unloadButton = "unload"+type+"PO";
var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest();}catch(e){xmlhttp=false;}}
xmlhttp.open("GET","../functions/functions-conversations.asp?pullout="+type,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){ 
document.getElementById(pulloutBlock).innerHTML=xmlhttp.responseText; 
document.getElementById(pulloutBlock).style.display='block';
 document.getElementById('bgShade').style.display='block';  
 document.getElementById(unloadButton).style.display='block';
 document.getElementById(loadButton).style.display='none'; }};xmlhttp.send(null);
}

function unloadPullout(type) {var loadButton = "load"+type+"PO";var unloadButton = "unload"+type+"PO";Effect.Fade('bgShade');document.getElementById(loadButton).style.display='block';document.getElementById(unloadButton).style.display='none';}

function loadFaqsById() {
document.getElementById('faqs').innerHTML="Loading...";var faqID = document.getElementById('faqid').value; 
var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest();}catch(e){xmlhttp=false;}}
xmlhttp.open("GET","../functions/functions-faq.asp?load=faqbyid&id="+faqID,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){if (xmlhttp.responseText != "") {document.getElementById('faqs').innerHTML=""+xmlhttp.responseText;} else {document.getElementById('faqs').innerHTML="There was an error processing the request."}}};xmlhttp.send(null);}


function addFriendRequest(friendUID,friendName,spotID) {
var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest();}catch(e){xmlhttp=false;}}
xmlhttp.open("GET","../functions/functions-conversations.asp?add=friend&id="+friendUID+"&n="+friendName,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){document.getElementById(spotID).innerHTML=xmlhttp.responseText;}};xmlhttp.send(null); }
function doFriendAuthorization(friendID,friendName,action) {var friendBox = "friend"+friendID;
var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest();}catch(e){xmlhttp=false;}}
xmlhttp.open("GET","functions/functions-conversations.asp?frauth="+action+"&id="+friendID+"&n="+friendName,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){if (xmlhttp.responseText != "" ) { document.getElementById(friendBox).innerHTML=xmlhttp.responseText; setTimeout("Effect.Fade("+friendBox+")",2000);} else {Effect.Fade(friendBox);} }};xmlhttp.send(null); }

function loadRecentFriends() {
var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest();}catch(e){xmlhttp=false;}}
xmlhttp.open("GET","../functions/functions-friends.asp?load=recent",true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){ document.getElementById('recentFriends').innerHTML=xmlhttp.responseText;}};xmlhttp.send(null); }

function clearConvos() {
var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest();}catch(e){xmlhttp=false;}}
xmlhttp.open("GET","../functions/functions-conversations.asp?clear=messages",true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){if (xmlhttp.responseText != "" ) { document.getElementById('convoAlert').innerHTML=xmlhttp.responseText;} else {document.getElementById('convoAlert').innerHTML='Message Alerts Cleared.'} }};xmlhttp.send(null);}

function convoCheck() {
var xmlhttp=false;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
if(!xmlhttp&&window.createRequest){try{xmlhttp=window.createRequest();}catch(e){xmlhttp=false;}}
xmlhttp.open("GET","../functions/functions-conversations.asp?convo=check",true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){if (xmlhttp.responseText != "" ) { document.getElementById('convoAlert').innerHTML=xmlhttp.responseText;doAlertBlock();} else {document.getElementById('convoAlert').innerHTML=''} }};xmlhttp.send(null); }
function doAlertBlock() {Effect.Appear('convoAlert');setTimeout("doAlertBlockFade()",9000); }
function doAlertBlockFade() {Effect.Fade('convoAlert');}
window.setInterval('convoCheck()', 15000);

function validate_formMyAccount()
{valid=true;if(document.myForm.password1.value===""||document.myForm.password2.value===""||document.myForm.password1.value!=document.myForm.password2.value)
{alert("Please enter and confirm a password.");valid=false;}
if(document.myForm.password1.value.length<4)
{alert("Please be sure your password is at least 4 characters in length.");valid=false;}
if(document.myForm.first_name.value.length<2||document.myForm.last_name.value.length<2)
{alert("Please be sure your first and last name are at least 4 characters in length.");valid=false;}
if(document.myForm.city.value.length<2||document.myForm.state.value.length<2||document.myForm.zip.value.length<5)
{alert("Please enter a valid city, state and zip code");valid=false;}
if(document.myForm.email.value.indexOf('@')==-1||document.myForm.email.value.indexOf('.')==-1)
{alert("Please enter a valid email address.");valid=false;}
if(document.myForm.email.value!=document.myForm.email0.value)
{alert("Please Re-Enter and confirm your email address.");valid=false;}
return valid;}
function reLocate(place){document.location.href=place;}
var TimeToFade=300.0;function fade(eid)
{var element=document.getElementById(eid);if(element==null)
return;if(element.FadeState==null)
{if(element.style.opacity==null||element.style.opacity==''||element.style.opacity=='1')
{element.FadeState=2;}
else
{element.FadeState=-2;}}
if(element.FadeState==1||element.FadeState==-1)
{element.FadeState=element.FadeState==1?-1:1;element.FadeTimeLeft=TimeToFade-element.FadeTimeLeft;}
else
{element.FadeState=element.FadeState==2?-1:1;element.FadeTimeLeft=TimeToFade;setTimeout("animateFade("+new Date().getTime()
+",'"+eid+"')",33);}}
function animateFade(lastTick,eid)
{var curTick=new Date().getTime();var elapsedTicks=curTick-lastTick;var element=document.getElementById(eid);if(element.FadeTimeLeft<=elapsedTicks)
{element.style.opacity=element.FadeState==1?'1':'0';element.style.filter='alpha(opacity = '
+(element.FadeState==1?'100':'0')+')';element.FadeState=element.FadeState==1?2:-2;return;}
element.FadeTimeLeft-=elapsedTicks;var newOpVal=element.FadeTimeLeft/TimeToFade;if(element.FadeState==1)
newOpVal=1-newOpVal;element.style.opacity=newOpVal;element.style.filter='alpha(opacity = '+(newOpVal*100)+')';setTimeout("animateFade("+curTick
+",'"+eid+"')",33);}
var TimeToFadeAlert=3000.0;function Alertfade(eid)
{var element=document.getElementById(eid);if(element==null)
return;if(element.FadeState==null)
{if(element.style.opacity==null||element.style.opacity==''||element.style.opacity=='1')
{element.FadeState=2;}
else
{element.FadeState=-2;}}
if(element.FadeState==1||element.FadeState==-1)
{element.FadeState=element.FadeState==1?-1:1;element.FadeTimeLeft=TimeToFade-element.FadeTimeLeft;}
else
{element.FadeState=element.FadeState==2?-1:1;element.FadeTimeLeft=TimeToFadeAlert;setTimeout("animateFade1("+new Date().getTime()
+",'"+eid+"')",33);}}
function animateFade1(lastTick,eid)
{var curTick=new Date().getTime();var elapsedTicks=curTick-lastTick;var element=document.getElementById(eid);if(element.FadeTimeLeft<=elapsedTicks)
{element.style.opacity=element.FadeState==1?'1':'0';element.style.filter='alpha(opacity = '
+(element.FadeState==1?'100':'0')+')';element.FadeState=element.FadeState==1?2:-2;return;}
element.FadeTimeLeft-=elapsedTicks;var newOpVal=element.FadeTimeLeft/TimeToFade;if(element.FadeState==1)
newOpVal=1-newOpVal;element.style.opacity=newOpVal;element.style.filter='alpha(opacity = '+(newOpVal*100)+')';setTimeout("animateFade("+curTick
+",'"+eid+"')",33);}
function changeLocation(form){var formindex=form.jumpLocation.selectedIndex;parent.self.location=form.jumpLocation.options[formindex].value;}
function editTeam(form){var formindex=form.editTeam.selectedIndex;parent.self.location=form.editTeam.options[formindex].value;}
function disableEnterKey(e)
{var key;if(window.event)
key=window.event.keyCode;else
key=e.which;if(key==13)
return false;else
return true;}
function viewMap(){note=form.venue_city.value;url='http://maps.google.com/maps?q=';newwindow=window.open(url,'newWindow','width=750,height=550,left=20,top=20,toolbar=No,location=No,scrollbars=no,status=No,resizable=no,fullscreen=No');}
function openwindow(url){NewWindow=window.open(url,'newWin','width=655,height=420,left=20,top=20,toolbar=No,location=No,scrollbars=no,status=No,resizable=no,fullscreen=No');NewWindow.focus();void(0);}
function openMedia(url){NewWindow=window.open(url,'newWin','width=600,height=675,left=50%,top=10,toolbar=No,location=No,scrollbars=no,status=No,resizable=no,fullscreen=No');NewWindow.focus();void(0);}
function toggle_visibility(id){var e=document.getElementById(id);if(e.style.display=='none')
e.style.display='block';else
e.style.display='none';}
function popupCnfrmMsg(msg){document.returnValue=confirm(msg);}
function popupAlert(alert){document.returnValue=confirm(alert);}
function disableForm(theform){if(document.all||document.getElementById){for(i=0;i<theform.length;i++){var tempobj=theform.elements[i];if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="button")
tempobj.disabled=true;}}}
var offsetfromcursorX=12
var offsetfromcursorY=10
var offsetdivfrompointerX=10
var offsetdivfrompointerY=14
//document.write('<div id="dhtmltooltip"></div>')
//document.write('<img id="dhtmlpointer" src="arrow2.gif">')
var ie=document.all
var ns6=document.getElementById&&!document.all
var enabletip=false
if(ie||ns6)
var tipobj=document.all?document.all["dhtmltooltip"]:document.getElementById?document.getElementById("dhtmltooltip"):""
var pointerobj=document.all?document.all["dhtmlpointer"]:document.getElementById?document.getElementById("dhtmlpointer"):""
function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}
function ddrivetip(thetext,thewidth,thecolor){if(ns6||ie){if(typeof thewidth!="undefined")tipobj.style.width=thewidth+"px"
if(typeof thecolor!="undefined"&&thecolor!="")tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false}}
function positiontip(e){if(enabletip){var nondefaultpos=false
var curX=(ns6)?e.pageX:event.clientX+ietruebody().scrollLeft;var curY=(ns6)?e.pageY:event.clientY+ietruebody().scrollTop;var winwidth=ie&&!window.opera?ietruebody().clientWidth:window.innerWidth-20
var winheight=ie&&!window.opera?ietruebody().clientHeight:window.innerHeight-20
var rightedge=ie&&!window.opera?winwidth-event.clientX-offsetfromcursorX:winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera?winheight-event.clientY-offsetfromcursorY:winheight-e.clientY-offsetfromcursorY
var leftedge=(offsetfromcursorX<0)?offsetfromcursorX*(-1):-1000
if(rightedge<tipobj.offsetWidth){tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true}
else if(curX<leftedge)
tipobj.style.left="5px"
else{tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"}
if(bottomedge<tipobj.offsetHeight){tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true}
else{tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"}
tipobj.style.visibility="visible"
if(!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"}}
function hideddrivetip(){if(ns6||ie){enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''}}
document.onmousemove=positiontip
