function changeForm(about)
{
	if (about == 'General Inquiry')
	{
		$('budget_row').setStyle('display','none');
		$('launchdate_row').setStyle('display','none');
		$('message_text').innerHTML = 'Your Message:';
	}
	else
	{
		// IE doesn't support table-row, so blank seems to work best across IE and FF
		$('budget_row').setStyle('display','');
		$('launchdate_row').setStyle('display','');
		$('message_text').innerHTML = 'Describe your project and how we can help achieve your goals:';
	}
}

var values = [
	'about',
	'company_name',
	'contact_name',
	'phone',
	'email',
	'project_description',
	'launch_date',
	'budget'
];
function validateForm()
{
	
	var missing = [];
	for(var i = 0; i < values.length; i++)
	{
		if ($(values[i]).value=='')
		{
			if ($('about').value != 'General Inquiry' || (values[i] != 'launch_date' && values[i] != 'budget'))
			{
				missing.push(values[i]);
			}
		}
	}
	if (missing.length > 0)
	{
		highlightRequired(missing);
		return false;
	}
	else
	{
		return true;
	}
}
function highlightRequired(post_result)
{
	for( var i = 0; i < post_result.length; i++ )
	{
		var current_field = $(post_result[i]);
		if ( current_field.nodeName == 'INPUT' && current_field.type == 'text' || current_field.nodeName == 'TEXTAREA' || current_field.nodeName == 'SELECT')
		{
			current_field.style.backgroundColor = '#FFCCCC';
		}
	}
}
function clearFormatting(id)
{
	try
	{
		var target = document.getElementById(id); 
		target.style.background = '#ffffff';
		target.style.color = '#000000';
	}
	catch (e) {}
}