function isNumberKey(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57))
		return false;
	return true;
}
function uncheck_checkbox(checkbox_id)
{
	if($('#'+checkbox_id+':checked')){
		$("#"+checkbox_id+"").attr("checked", "");
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  return false;
}
function registration_check(email_address, user_name, user_password, first_name, surname, company_name, city, country, phone_number) {
	if(email_address.value == null || email_address.value == ''){
		alert('Please add your e-mail address to the registration form.');
		document.getElementById('email_address').focus();
		return false;
	}	
	if(user_name.value == null || user_name.value == ''){
		alert('Please add your username to the registration form.');
		document.getElementById('user_name').focus();
		return false;
	}	
	if(user_password.value == null || user_password.value == ''){
		alert('Please add a password to the registration form.');
		document.getElementById('user_password').focus();
		return false;
	}	
	if(first_name.value == null || first_name.value == ''){
		alert('Please add your first name to the registration form.');
		document.getElementById('first_name').focus();
		return false;
	}	
	if(surname.value == null || surname.value == ''){
		alert('Please add your surname to the registration form.');
		document.getElementById('surname').focus();
		return false;
	}	
	if(company_name.value == null || company_name.value == ''){
		alert('Please add your company to the registration form.');
		document.getElementById('company_name').focus();
		return false;
	}	
	if(city.value == null || city.value == ''){
		alert('Please add your city to the registration form.');
		document.getElementById('city').focus();
		return false;
	}	
	if(country.value == null || country.value == ''){
		alert('Please add your country to the registration form.');
		document.getElementById('country').focus();
		return false;
	}	
	if(phone_number.value == null || phone_number.value == ''){
		alert('Please add your phone number to the registration form.');
		document.getElementById('phone_number').focus();
		return false;
	}	
}

function signup_check(email_address, user_name, user_password, first_name, surname, company_name, city, country, phone_number, accept_license, address_1, county, postcode) {
	if(company_name.value == null || company_name.value == ''){
		alert('Please add your company to the form.');
		document.getElementById('company_name').focus();
		return false;
	}	
	

	if(address_1.value == null || address_1.value == ''){
		alert('Please add the first line of your address to the form.');
		document.getElementById('address_1').focus();
		return false;
	}	
	

	
	if(city.value == null || city.value == ''){
		alert('Please add your city to the form.');
		document.getElementById('city').focus();
		return false;
	}	
	
	if(county.value == null || county.value == ''){
		alert('Please add your county or district to the form.');
		document.getElementById('county').focus();
		return false;
	}	
	
	if(postcode.value == null || postcode.value == ''){
		alert('Please add your postcode or district to the form.');
		document.getElementById('postcode').focus();
		return false;
	}
	
	if(country.value == null || country.value == ''){
		alert('Please add your country to the form.');
		document.getElementById('country').focus();
		return false;
	}	
	
	if(first_name.value == null || first_name.value == ''){
		alert('Please add your first name to the form.');
		document.getElementById('first_name').focus();
		return false;
	}	
	if(surname.value == null || surname.value == ''){
		alert('Please add your surname to the form.');
		document.getElementById('surname').focus();
		return false;
	}	
	
	if(email_address.value == null || email_address.value == ''){
		alert('Please add your e-mail address to the form.');
		document.getElementById('email_address').focus();
		return false;
	}	
	
	if(phone_number.value == null || phone_number.value == ''){
		alert('Please add your phone number to the form.');
		document.getElementById('phone_number').focus();
		return false;
	}
	
	if(user_name.value == null || user_name.value == ''){
		alert('Please add your username to the form.');
		document.getElementById('user_name').focus();
		return false;
	}	
	if(user_password.value == null || user_password.value == ''){
		alert('Please add a password to the form.');
		document.getElementById('user_password').focus();
		return false;
	}	
	
	
	if(phone_number.value == null || phone_number.value == ''){
		alert('Please add your phone number to the form.');
		document.getElementById('phone_number').focus();
		return false;
	}	
	
	if($('#accept_license').attr('checked')){
	} else {
		alert("Please check the box to indicate you accept the License Agreement.");
		return false;
	}
	
	if(accept_license.value == null || accept_license.value == ''){
		alert('Please check the box to indicate you accept the License Agreement.');
		document.getElementById('phone_number').focus();
		return false;
	}
	
	
}