// functions for the gang.php page

function updateDescription() {
  document.frm1.txtGangDescription.value = parseForDatabase(document.frm1.txtGangDescription.value);
  document.frm1.submit();
}
function updatePassword() {
  psw = document.frm2.psw.value;
  if (psw.length < 5) {
  	alert("Passwords must have at least 5 characters");
	return;  
  }
  if (confirm("Are you sure you want to change your password to " + psw + "?")) {
    alert("Your new password will also be emailed to you");
   	document.frm2.psw.value = parseForDatabase(psw);
	document.frm2.submit(); 
  }
}
function updateEmail() {
	em = document.frmEm.em.value;
	if (confirm("Are you sure you want to change your email address to " + em + " ?")) {
		document.frmEm.em.value = parseForDatabase(em);
		document.frmEm.submit(); 	  
	}  
}
function updateGangname() {
   document.frm0.newGangname.value = parseForDatabase(document.frm0.newGangname.value);
   nname = document.frm0.newGangname.value;
   if (nname.length < 5) {
   		alert("Gang names must be at least 5 characters long"); 
   		return;
   }
  if (confirm("Are you sure you want to change your gang's name to " + nname + "?")) {
	document.frm0.submit(); 
  }
}
function updateLogo() {
	logo = document.frmLogo.logo.value;
	document.frmLogo.logo.value = parseForDatabase(logo);
	document.frmLogo.submit(); 	   
}
function confirmVacation() {
    if (confirm("Are you sure you want to change your gang's 'On Vacation' status?\nYou can only go on vacation once every 6 weeks."))
		frmVacation.doIt.value=1;
	frmVacation.submit();
}
function subscribe() {
	window.location="subscribe.php";
}













