function checkNewMail()	{
	if (document.getElementById('subject').value.length == 0 || document.getElementById('subject').value == 'subject')	{
		alert("Please enter a subject for your email");
		document.getElementById('subject').focus();
		return false;
		}
	if (document.getElementById('reply').value.length < 20)	 {
		alert("Email text  must be a minimum of 20 characters");
		document.getElementById('reply').focus();
		return false;
		}
	}

function checkDelete()	{
	if (!document.getElementById('delete').checked && !document.getElementById('saved').checked)		{
		alert("Please check whether you wish to delete the checked emails or move them to the saved folder");
		return false;
		}

	if (document.getElementById('delete').value == 3 && document.getElementById('delete').checked)	{
		return confirm("are you sure you want to permanently delete these emails?");
		}
	}

function checkAll(ids)	{
	for (var x = 0 ; x < ids.length ; x++)	{
		if (document.getElementById(ids[x]).checked == false)	{
			document.getElementById(ids[x]).checked = true;
		    }
	    }
	}