
function numCharMonitor(watchField,countField,maxlimit)
{
  var a = document.getElementById(watchField);
  var b = document.getElementById(countField);

  if (a && b)
  {
    if (a.value.length > maxlimit)
    {
      a.value = a.value.substring(0, maxlimit);
    }
    else
    {
      b.innerHTML = maxlimit - a.value.length;
    }
  }
  return true;
}

function toggleMe(item)
{
  var e=document.getElementById(item);
  if(!e)return true;
  if(e.style.display=="none"){
	e.style.display="block"
  } else {
	e.style.display="none"
  }
  return true;
}
function TPApopup(href,width,height,scroll)
{
  if(!width)  width=400;
  if(!height) height=300;
  if(!scroll) scroll = 1;
  var myname = "TPApopup";
  LeftPosition=(screen.width)?(screen.width-width)/2:100;TopPosition=(screen.height)?(screen.height-height)/2:100;
  settings='width='+width+',height='+height+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
  TPAwin=window.open(href,myname,settings);
  TPAwin.focus();
}
