function verifyEmailMatch(form, field1, field2)
{
    if (document.forms[form][field1].value != document.forms[form][field2].value)
    {
	alert("E-mail addresses do not match - please correct.");
    }
}

function verifyFieldsMatch(form, field1, field2, errorid)
{
    if (document.forms[form][field1].value != document.forms[form][field2].value)
    {
	document.getElementById("emailnomatch").innerHTML = "Email Addresses do not match";
    }
    else
    {
	document.getElementById("emailnomatch").innerHTML = "";
    }
}

function alertMismatch(field1, field2)
{
    alert("Fields "+field1+" and "+field2+" do not match!");
}

function alertMessage(msg)
{
    alert(msg);
}

function checkForDataorig(form, field, errorid)
{
    if (document.forms[form][field].value == "")
    {
	document.forms[form][errorid].type = "button";
    }
    else
    {
	document.forms[form][errorid].type = "hidden";	
    }
}
function checkForData(form, field, errorid, errormsg)
{
    if (document.forms[form][field].value == "")
    {
	document.getElementById(errorid).innerHTML=errormsg;
    }
    else
    {
	document.getElementById(errorid).innerHTML="";
    }
}
