function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}

function ValidateLoginForm(form)  {
    //ACCOUNTID
	if(form.accountid != null) {
		form.accountid.value = trim(form.accountid.value);
		var str = form.accountid.value;
		if(str == '') {
			alert('You must supply an accountid.');
			form.accountid.focus();
			return false;
		} else {
		  //check that this is an accountd
		  var test = parseInt(str.substring(3));
		  if (isNaN(test)) {
		     alert('Please note that to login you need your ACCOUNTID not the alias or email, please try again');
			 return false;
		  }
		}

	}
}