﻿function loadINC(tid) {
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", "custompage-functions.asp?tid="+tid+"&loadINC=true",true);
 xmlhttp.onreadystatechange=function() {  if (xmlhttp.readyState==4) {     document.getElementById('pages').innerHTML=(xmlhttp.responseText);
  }
 }
 xmlhttp.send(null)
}
function loadLinks(tid,pid) {
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", "custompage-functions.asp?tid="+tid+"&loadLinks=true&pid="+pid+"",true);
 xmlhttp.onreadystatechange=function() {  if (xmlhttp.readyState==4) {     document.getElementById('subNav').innerHTML=(xmlhttp.responseText);
  }
 }
 xmlhttp.send(null)
}
function loadCustomPage(tid,pid) {
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", "custompage-functions.asp?tid="+tid+"&loadCustomPage=true&pid="+pid+"",true);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
  	document.getElementById('teamContent').innerHTML=(xmlhttp.responseText);
  }
 }
 xmlhttp.send(null)
}
function requestMembership(tid) {
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-membership.asp?tid="+tid+"&membership=requested",true);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
  	document.getElementById('joinBox').innerHTML=xmlhttp.responseText;
  }
 }
 xmlhttp.send(null)
}

function sendCoachEmail(tid) {
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-membership.asp?tid="+tid+"&sendCoachEmail=true",true);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
  	document.getElementById('contactCoachBox').innerHTML=xmlhttp.responseText;
  }
 }
 xmlhttp.send(null)
}

