<!--
function checkForm() {
user = document.sellerNew.username.value;
pass1 = document.sellerNew.password.value;
pass2 = document.sellerNew.password_again.value;
email = document.sellerNew.email.value;
desc = document.sellerNew.desc.value;
concentration = document.sellerNew.concentration.value;

atPos = email.indexOf('@');
userSpace = user.indexOf(' ');
userComma = user.indexOf(',');

//create variable/count for number of concentrations selected

var selectedcount = 0;

for (i=0; i< document.sellerNew.concentration.options.length; i++)
  {
     if (document.sellerNew.concentration.options(i).selected)
     {
        selectedcount++;
     }
  }

if (document.sellerNew.userType.selectedIndex == 0) {
	alert("Please choose a user type in the 'user type' drop-down list.");
	document.sellerNew.userType.focus();
	}

else if (user == "" || pass1 == "" || pass2 == "" || email == "" || desc == "") {
	alert("Please fill all of the required fields on this form.");
	}

else if (user.length < 6 || pass1.length < 6) {
	alert("Your username and password must be at least six characters in length.");
	}

else if (userSpace > 1 || userComma > 1) {
	alert("Please remove all spaces, commas, and quotes from your username.");
	document.sellerNew.username.focus();
	}

else if (document.sellerNew.desc.value.length > 250) {
	alert("There is a maximum of 250 characters in the 'brief description' field.");
	document.sellerNew.desc.focus();
	}

else if (pass1 != pass2) {
	alert ("'Password' and 'Confirm Password' fields do not match \n Please try again");
	} 

else if (atPos < 1 || atPos == (email.length - 1)) {
	alert("Please enter a valid email address.");	
	}

else if (document.sellerNew.careerLevel.selectedIndex == 0) {
    	alert("Please choose your career level from \"career level\" drop-down list.");
    	document.sellerNew.careerLevel.focus();
  	}
  	
else if (document.sellerNew.concentration.selectedIndex < 0) 
  {
    alert("Please select at least one of the \"concentration\" options.");
    document.sellerNew.concentration.focus();
  }
  
else if (selectedcount > 8)
  {
    alert("Please select at most 8 of the \"concentration\" options.");
    document.sellerNew.concentration.focus();
  }  

else if (document.sellerNew.location.selectedIndex == 0) {
    	alert("Please choose your home location in the \"home location\" drop-down list.");
    	document.sellerNew.location.focus();
  	}
  	
else if (document.sellerNew.refer.selectedIndex == 0) {
    	alert("Please tell us how you found out about us in the \"how did you hear about us\" drop-down list.");
    	document.sellerNew.refer.focus();
  	}  	
	
else {
	document.sellerNew.submit()
	}
}


//-->