function checkEmailAddress(email)
{
	var re = /^[_a-zA-Z0-9\.\-]+@[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}$/;
	if (!re.test(email))
	{
		return false;
	}
	else
	{
		return true;
	}
}

function textLengthCheck(id, max)
{
	if (id.value.length > max)
	{
		id.value = id.value.substring(0, max);
	}
	
	var checker = document.getElementById('count_' + id.name);
	
	checker.value = max - id.value.length;
}

function checkRadioButtons(radio)
{
	var radio_choice = false;
	
	for (index = 0; index<radio.length; index++)
	{
		if (radio[index].checked == true)
		{
			radio_choice = true;
		}
	}
	
	return radio_choice;
}

function disableSubmitButton(theButton, text)
{
	theButton.value = text;
	theButton.disabled = true;
}

function saveAsMe (filename)
{
	document.execCommand('SaveAs',null,filename)
}
