<!-- Begin

function textCounter(field, countfield, maxlimit)
{
  if (field.value.length > maxlimit) 
    // if too long...trim it!
    field.value = field.value.substring(0, maxlimit);
  else 
    // otherwise, update character counter
    countfield.value = field.value.length;
}


function CountTaxBasis(obj) 
{
  min = 1; // minimum number required

  box1 = obj.form.CON_CORP.checked;
  box2 = obj.form.CON_HIRE_CORP.checked;
  box3 = obj.form.CON_HIRE_IND.checked;
  box4 = obj.form.CON_HIRE_W2.checked;
  box5 = obj.form.CON_IND.checked;
  box6 = obj.form.CON_W2.checked;
  box7 = obj.form.FULLTIME.checked;

  count = (box1 ? 1 : 0) + (box2 ? 1 : 0) + (box3 ? 1 : 0) + (box4 ? 1 : 0) + (box5 ? 1 : 0) + (box6 ? 1 : 0) + (box7 ? 1 : 0);

  if (count < min) 
  {
    alert("At least one \"Tax Basis\" value must be selected.");
    obj.checked = true;
  }
}


function checkForAndRemoveAllCaps(frmObj) 
{
  var index;
  var tmpStr;
  var tmpChar;
  var preString;
  var postString;
  var strlen;

  tmpStr = frmObj.value.toUpperCase();

  if (frmObj.value == tmpStr)  
  {

    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 == " " && 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;
          }
        }
      }
    alert("All caps are not recommended for this field.\nThis field's value will be changed to upper and lower case characters.\nTo avoid this action, turn off the Caps Lock key\nand enter a value with both upper and lower case characters.")
    }
    
    frmObj.value = tmpStr;

  }
}



function changeBox(cbox) 
{
  box = eval(cbox);
  box.checked = !box.checked;
}



function changeRadio(cbox) 
{
  box = eval(cbox);
  box.selected = !box.selected;
}



function getLogoutPerm() 
{
  return window.confirm("Are you sure that you want to logout?")
}



var submitDone;
submitDone = 0;

function preventDoublePosts(thisform) 
{
  if (document.all && thisform.cmdSubmit) 
  {
    thisform.cmdSubmit.disabled = true;
    thisform.cmdSubmit.value = 'Processing...';
  }

  if (submitDone == 0) 
  {
    submitDone = 1;
    var all_good;
    all_good = Form_Validator(thisform);
    if (!all_good)
    {
      submitDone = 0;
      thisform.cmdSubmit.disabled = false;
      thisform.cmdSubmit.value = 'Submit';
    }
    return all_good;
  }
  else 
  { 
    if (!thisform.cmdSubmit || !document.all) 
    {
      alert("Processing..."); 
    }
    return false; 
  }
}




var checkflag = "false";

function check(field) 
{
  if (checkflag == "false") 
  {
    for (i = 0; i < field.length; i++) 
    {
      field[i].checked = true;
    }
    
    checkflag = "true";
    return "Uncheck All"; 
  }
  else 
  {
    for (i = 0; i < field.length; i++) 
    {
      field[i].checked = false; 
    }

  checkflag = "false";

  return "Check All"; 
  }
}



var bookmarkurl="http://www.postonce.com";
var bookmarktitle="PostOnce";
function addbookmark()
{
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) 
  {
    if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle)
  }
}



function block_textarea_email_entry (field) 
{
  var emailsArray = field.value.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
  if (emailsArray) 
  {
    alert ("Entry of an email address is not allowed for this field.\nPostOnce automatically includes your contact email with job distributions.\nClick the field name for more information.");
    field.focus();
    return (false);
  }
  else
  {
    return (true);
  }
}

//-->