function setActionReport(text)
{
  actionreport.innerHTML="<BR>" + text + "<BR><BR>";
}

function validatepositivenumber(sValue)
{
  var objMatch = new RegExp("^[0-9]+$").exec(sValue);
  return objMatch;
}

function validatepassword(sValue)
{
  var objMatch = new RegExp("^[0-9A-Za-z]{5,20}$").exec(sValue);
  return objMatch;
}

function validatealphanumber(sValue)
{
  var objMatch = new RegExp("^[0-9A-Za-z .'-]+$").exec(sValue);
  return objMatch;
}

function validatenormalchars(sValue)
{
  var objMatch = new RegExp("^[A-Za-z .]+$").exec(sValue);
  return objMatch;
}

function validatephonenumber(sValue)
{
  var objMatch = new RegExp("^[0-9]+$").exec(sValue);
  return objMatch;
}

function validatezipcode(sValue)
{
  var objMatch = new RegExp("([0-9]{4})([A-Za-z]{2})").exec(sValue);
  return objMatch;
}

function validateemail(sValue)
{
  var objMatch = new RegExp("^[A-Za-z0-9_-]+([.][A-Za-z0-9_-]+){0,4}[@][A-Za-z0-9_-]+([.][A-Za-z0-9_-]+){1,3}$").exec(sValue);
  return objMatch;
}

function checkemail(emailIn)
{
  if (validateemail(emailIn))
  {
    return true;
  }
  else
  {
    return false;
  }
}

function setallcheckboxes(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}

