	
	//Required fields array
	var arrRequiredFields 	= Array();
	arrRequiredFields[0] 	= {'field' : 'first_name',		'label' : 'First name'}; 
	arrRequiredFields[1] 	= {'field' : 'last_name', 		'label' : 'Last name'}; 
	arrRequiredFields[2] 	= {'field' : 'company', 		'label' : 'Company'}; 
	arrRequiredFields[3] 	= {'field' : 'email_address',	'label' : 'Email address'}; 
	arrRequiredFields[4] 	= {'field' : 'phone', 			'label' : 'Phone'}; 				
			
	//Validate form		
	function validateForm()
	{
		boolError = false;
		strMessage = '';
		
		// Check required fields
		for(i=0; i < arrRequiredFields.length; i++)
		{
			var strField = arrRequiredFields[i]['field'];
			var strLabel = arrRequiredFields[i]['label'];
			var strValue = document.forms.contact_form[strField].value;
			var refField = document.forms.contact_form[strField];
			
			if(strValue.length == 0)
			{
				strMessage += strLabel + ' is required.\n';
				
				if(!boolError)
				{
					refField.focus();
					boolError = true;
				}
			}
		}
	
		// If error occured, display alert and return false
		// Otherwise, return true
		if(boolError)
		{
			alert(strMessage);
			return false;
		}
		else
		{
			return true;
		}
	}	
	
	//Toggle affiliate manager dropdown visibility
	/*
	function toggleAffiliateManager(objRadio)
	{
		if(objRadio[0].checked)
		{
			document.getElementById('affiliate_manager').style.display = "block";
		}
		else
		{
			document.getElementById('affiliate_manager').style.display = "none";		
		}
	}	
	*/