function mascaraCPF(tf)
{
  if (!(navigator.appName == "Netscape" && parseInt(navigator.appVersion) <= 4))
  {
    if (tf.value.length == 3)
    {
      tf.value += ".";
    }
    if (tf.value.length == 7)
    {
      tf.value += ".";
    }
    if (tf.value.length == 11)
    {
      tf.value += "-";
    }
  }
}

function mascaraCEP(tf)
{
  if (!(navigator.appName == "Netscape" && parseInt(navigator.appVersion) <= 4))
  {
    if (tf.value.length == 5)
    {
      tf.value += "-";
    }
  }
}

function mascaraData(tf)
{
  if (!(navigator.appName == "Netscape" && parseInt(navigator.appVersion) <= 4))
  {
    if (tf.value.length == 2)
	{
      tf.value += "/";
    }
    if (tf.value.length == 5)
	{
      tf.value += "/";
     }
   }
}

function openWinCenter(URL, N, W, H, S)
{
	L = (screen.width - W) / 2;
	T = (screen.height - H) / 2;
	newWin = window.open(URL, N,"scrollbars="+S+",width=" + W + ",height=" + H +",top=" + T+ ",left=" + L);
	newWin.focus();
}

function changeEnem( param )
{
	field = 'rowEnem';
    row = document.getElementById(field).style.display;
    if( param == "show")
    {
      if(navigator.appName == "Netscape")
        document.getElementById(field).style.display = "table-row";
      else
        document.getElementById(field).style.display = "inline";
    }
    else
    {
      document.getElementById(field).style.display = "none";
    }
}