function ctf(theText) 
{
	if(theText.value==theText.defaultValue) 
	{
		theText.value = "";
		theText.style.color = "#606465";
	}
}
function rtf(theText) 
{
	if(theText.value=="" || theText.value==theText.defaultValue) 
	{
		theText.value = theText.defaultValue;
		theText.style.color = "#B3B3B3";
	}
}
function l2s(theForm) 
{
	if(theForm.q.value==theForm.q.defaultValue || theForm.q.value=='') 
	{
		theForm.q.focus();
		return false;
	}
	return true;
}
function isValidEmail(the_email) 
{
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\'\>\,\;\:\\\/\"\[\]]/;
	return (emailFilter.test(the_email) && !the_email.match(illegalChars));
}
function validateForm(formElem) 
{
	return validateRichForm(formElem, "#A5ACB2", "#E53F76");
}
function validateRichForm(formElem, good_color, bad_color) 
{
	var inputElem = null;
	var why = '';
	
	inputElem = formElem.email;
	if( inputElem ) 
	{
		if(!isValidEmail(inputElem.value)) 
		{
			why += " * Your Email Address\n";
			inputElem.style.borderColor = bad_color;
			inputElem.focus();
		}
		else 
		{
			inputElem.style.borderColor = good_color;
		}
	}
	
	inputElem = formElem.resume;
	if( inputElem ) 
	{
		if(inputElem.value == inputElem.defaultValue)
		{
			why += " * Your Resume\n";
			inputElem.style.borderColor = bad_color;
			inputElem.focus();
		}
		else 
		{
			inputElem.style.borderColor = good_color;
		}
	}
	if( why != "" ) 
	{
		why = "There is an error with your request.\n\nPlease fill out the following required fields:\n" + why;
		alert(why);
		return false;
	}
	return true;
}
