function checkTerms(){
	if (document.terms.accept.checked == false){
		alert('you need to accept the terms and conditions to continue');
	} else {
		document.terms.submit();	
	}
}

function validateSignup1() 
{
	var okSoFar=true;
	
	with (document.signup)
	{
  		if (login.value == "" && okSoFar){
    			okSoFar=false;
    			alert("Please enter a login.");
    			login.focus();
  		}
		if (password.value == "" && okSoFar){
    			okSoFar=false;
    			alert("Please enter a password.");
    			password.focus();
  		}
  		if (login.value != confirm_login.value && okSoFar){
    			okSoFar=false;
    			alert("The email addresses you entered did not match.");
    			password.focus();
  		}
		if (subdomain.value == "" && okSoFar){
    			okSoFar=false;
    			alert("Please enter a subdomain.");
    			subdomain.focus();
  		}
		if (first_name.value=="" && okSoFar){
    			okSoFar=false;
    			alert("Please enter your first name.");
    			first_name.focus();
  		}
		if (last_name.value=="" && okSoFar){
    			okSoFar=false;
    			alert("Please enter your last name.");
    			last_name.focus();
  		}
		

  		if (okSoFar==true)  submit();
 	}
}

function validateSignup2() 
{
	var okSoFar=true;
	
	with (document.signup)
	{
  		if (login.value == "" && okSoFar){
    			okSoFar=false;
    			alert("Please enter a login.");
    			login.focus();
  		}
		if (password.value == "" && okSoFar){
    			okSoFar=false;
    			alert("Please enter a password.");
    			password.focus();
  		}
  		if (login.value != confirm_login.value && okSoFar){
    			okSoFar=false;
    			alert("The email addresses you entered did not match.");
    			password.focus();
  		}
		if (first_name.value=="" && okSoFar){
    			okSoFar=false;
    			alert("Please enter your first name.");
    			first_name.focus();
  		}
		if (last_name.value=="" && okSoFar){
    			okSoFar=false;
    			alert("Please enter your last name.");
    			last_name.focus();
  		}
		if (address_1.value=="" && okSoFar){
    			okSoFar=false;
    			alert("Please enter your address.");
    			address_1.focus();
  		}
		if (city.value=="" && okSoFar){
    			okSoFar=false;
    			alert("Please enter your city.");
    			city.focus();
  		}
		if (postal_code.value=="" && okSoFar){
    			okSoFar=false;
    			alert("Please enter your postal code or zip code.");
    			postal_code.focus();
  		}
		if (country.value=="" && okSoFar){
    			okSoFar=false;
    			alert("Please enter your country.");
    			last_name.focus();
  		}
		

  		if (okSoFar==true)  submit();
 	}
}

function openInput(openNumber, closeNumber){

	
	document.getElementById("hidden-"+openNumber).style.display = 'block';

	
	document.getElementById("hidden-"+closeNumber).style.display = 'none';
	
} 

