// JavaScript Document
function updateField(a_campo, a_id)
{
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("a_"+a_campo).innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("POST","./a/teste.php?a_campo="+a_campo+"&a_id="+a_id,true);
xmlhttp.send();
document.getElementById("edit_modifier").style.visibility='hidden';
}


function Capitaliza(str){
	str = str.toLowerCase();
   words = str.split(" "); 
   for (i=0 ; i < words.length ; i++){
      testwd = words[i];
      firLet = testwd.substr(0,1); //lop off first letter
      rest = testwd.substr(1, testwd.length -1);
      words[i] = firLet.toUpperCase() + rest;
   }
   words = words.join(" ");
   return words;
}

