<!--

function changeCase(frmObj) {
var index;
var tmpStr;
var tmpChar;
var preString;
var postString;
var strlen;
tmpStr = frmObj.value.toLowerCase();
strLen = tmpStr.length;
if (strLen > 0)  {
for (index = 0; index < strLen; index++)  {
if (index == 0)  {
tmpChar = tmpStr.substring(0,1).toUpperCase();
postString = tmpStr.substring(1,strLen);
tmpStr = tmpChar + postString;
}
else {
tmpChar = tmpStr.substring(index, index+1);
if (((tmpChar == " ") || (tmpChar == ".")) && index < (strLen-1))  {
tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
preString = tmpStr.substring(0, index+1);
postString = tmpStr.substring(index+2,strLen);
tmpStr = preString + tmpChar + postString;
} } } }
frmObj.value = tmpStr;
}

function formCheck(theForm)
{

  if (theForm.IMW_1.value == "")
  {
    alert("Please enter your First Name.");
    theForm.IMW_1.focus();
    return (false);
  }
  
  if (theForm.IMW_2.value == "")
  {
    alert("Please enter your Last Name.");
    theForm.IMW_2.focus();
    return (false);
  }

  if (theForm.IMW_3.value == "")
  {
    alert("Please enter your Email Address.");
    theForm.IMW_3.focus();
    return (false);
  }

  if(theForm.IMW_3.value.indexOf('@')<1)
  {
    alert("Please enter your full Email Address.");
    theForm.IMW_3.focus();
    return (false);
  }
  
  if(theForm.IMW_3.value.indexOf('.')<1)
  {
    alert("Please enter your full Email Address.");
    theForm.IMW_3.focus();
    return (false);
  }
  
  if (theForm.IMW_4.value != "") {
  if (theForm.IMW_4.value.length < 3)
  {
    alert("Please enter at least 3 digits for your Area Code.");
    theForm.IMW_4.focus();
    return (false);
  }
  }
  
  if (theForm.IMW_4.value != "") {
  var checkOK = "0123456789";
  var checkStr = theForm.IMW_4.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Please only enter digits for your daytime Area Code.");
    theForm.IMW_4.focus();
    return (false);
  }
  }
  
  if (theForm.IMW_4.value != "") {
  if (theForm.IMW_5.value.length < 7)
  {
    alert("Please enter at least 7 digits for your Daytime Phone Number.");
    theForm.IMW_5.focus();
    return (false);
  }
  }
  
  if (theForm.IMW_5.value != "") {
  var checkOK = "0123456789-";
  var checkStr = theForm.IMW_5.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Please only enter digits in your Daytime Phone Number.");
    theForm.IMW_5.focus();
    return (false);
  }
  }
  
  if (theForm.IMW_5.value != "") {
  if (theForm.IMW_5.value.indexOf('-')<1)
  {
    alert("Please include the hyphen sparator in your Daytime Phone Number.");
    theForm.IMW_5.focus();
    return (false);
  }
  }
  
  if (theForm.IMW_6.value == "")
  {
    alert("Please enter your Question or Concern.");
    theForm.IMW_6.focus();
    return (false);
  }

  return (true);
}

//-->


