function userSignupCheck(field, string)
{
	if(document.getElementById(field).value.length >= 0)
	{
		
		if(field == 'email')
		{
				makeHttpRequest('/v2/ajax.userSignup.php?field=' + field + '&string=' + string, 'document.getElementById("div_' + field + '").innerHTML=');
				document.getElementById("div_" + field).innerHTML='Checking....';
				return true;
		}
		
		if(field == 'email2')
		{

				if(document.userSignup.email.value == document.userSignup.email2.value)
				{
						document.getElementById("div_" + field).innerHTML='<img src="http://www.pitchero.com/images/tick.gif" width="14" height="14">';
						return true;
				}
				else
				{
						document.getElementById("div_" + field).innerHTML='<img src="http://www.pitchero.com/images/error.gif" width="14" height="14"> Email addresses do not match';
						return false;
				}
		}
		
		if(field == 'password')
		{
				makeHttpRequest('/v2/ajax.userSignup.php?field=' + field + '&string=' + string, 'document.getElementById("div_' + field + '").innerHTML=');
				document.getElementById("div_" + field).innerHTML='Checking....';
				return true;
		}
		
		if(field == 'password2')
		{
				if(document.userSignup.password.value == document.userSignup.password2.value)
				{
						document.getElementById("div_" + field).innerHTML='<img src="http://www.pitchero.com/images/tick.gif" width="14" height="14">';
						return true;
				}
				else
				{
						document.getElementById("div_" + field).innerHTML='<img src="http://www.pitchero.com/images/error.gif" width="14" height="14"> Passwords do not match';
						return false;
				}
		}
		
		if(field == 'firstname')
		{
				makeHttpRequest('/v2/ajax.userSignup.php?field=' + field + '&string=' + string, 'document.getElementById("div_' + field + '").innerHTML=');
				document.getElementById("div_" + field).innerHTML='Checking....';
				return true;
		}
		
		if(field == 'lastname')
		{
				makeHttpRequest('/v2/ajax.userSignup.php?field=' + field + '&string=' + string, 'document.getElementById("div_' + field + '").innerHTML=');
				document.getElementById("div_" + field).innerHTML='Checking....';
				return true;
		}
		
		if(field == 'postcode')
		{
				makeHttpRequest('/v2/ajax.userSignup.php?field=' + field + '&string=' + string + '&country_id=' + document.getElementById('country_id').value, 'document.getElementById("div_' + field + '").innerHTML=');
				document.getElementById("div_" + field).innerHTML='Checking....';
				return true;
		}
		
		if(field == 'relation')
		{
			if(string == 'pa' || string == 'pl')
			{
					document.getElementById("div_" + field).style.display='';
			}
			else
			{
					document.getElementById("div_" + field).style.display='none';
			}
		}
		
	}
}
