
function ConfirmPassword() {
	
var frm = document.forms[0]

if (frm.elements["Password"] != null)
	if (frm.elements["Password"].value == frm.elements["txtConfirmPassword"].value) 
		{	
		return true; 	
		}
	else 
		{
		alert("Password and Confirm Password do not match.");
		return false; 
		}
}

function ConfirmIsMember() {
	
		var frm = document.forms[0]

		var bCont = false;
	
		bCont = confirm("If you are already a member of the USTA click OK, if not, click Cancel.");
		
		if (bCont == true)			
			frm.elements['hidIsMemberAnswer'].value = '1';	
		else
			frm.elements['hidIsMemberAnswer'].value = '0';	
			
		//indicates that the hidExistingID is a memberid no lookup is needed	
		frm.elements['hidLookupMemberID'].value	= "0"		
	frm.submit();
}

function SelectMember(ID,YesNo) {
	
		var frm = document.forms[0]
		
		frm.elements['hidExistingID'].value = ID;		
		frm.elements['hidIsMemberAnswer'].value = YesNo;		
			
			
		//indicates that the hidExistingID is a personid and we must lookup the memberid	
		frm.elements['hidLookupMemberID'].value	= "1"
		frm.submit();
}

function ConfirmProgramCoord(UserID,Pwd,DestURL,bExisting){
	
	var bCont = false;
	
	var NewPWDText = "";
	
	if(Pwd.length > 0 )
	   NewPWDText = " Your password is " + Pwd	
	
	if(bExisting == true)
	    bCont = confirm("You are now registered as a Program Coordinator." + NewPWDText + "\n"  
							+ "Click OK to continue and create a Program.\n"
							+ "You can also come back later to create a Program by logging in with your already existing user account.")
	else
	    bCont = confirm("You are now registered as a Program Coordinator.\n" 
							+ "Your Login ID is " + UserID + " and your Password is " +  Pwd + ".\n" 
							+ "Click OK to continue and create a Program.\n"
							+ "You can also come back later to create a Program by logging in with your new user account.")
	
	
	if (bCont == true)  
		location.href =  DestURL;              
	
}

function ConfirmCaptain(UserID,Pwd,DestURL,bExisting){
	
	var bCont = false;
	var NewPWDText = "";
	
	if(Pwd.length > 0 )
	   NewPWDText = " Your password is " + Pwd	
	
	if(bExisting == true)
	    bCont = confirm("You are now registered as a Coach/Captain." + NewPWDText + "\n"  
							+ "Click OK to continue and create a Team.\n"
							+ "You can also come back later to create a Team by logging in with your already existing user account.")
	else
	    bCont = confirm("You are now registered as a Coach/Captain.\n" 
							+ "Your Login ID is " + UserID + " and your Password is " +  Pwd + ".\n" 
							+ "Click OK to continue and create a Team.\n"
							+ "You can also come back later to create a Team by logging in with your new user account.")
	
	
	if (bCont == true)  
		location.href =  DestURL;                  
	
}



