//---Máscaras, verificação do Campos---------------------------------------------------
  
		//onBlur="return txtBoxFormat(this.form, this.name, '999.999.999-99', event);"
			function txtBoxFormat(objForm, strField, sMask, evtKeyPress) {
			 var i, nCount, sValue, fldLen, mskLen,bolMask, sCod, nTecla;
			
			 if(document.all) { // Internet Explorer
			  nTecla = evtKeyPress.keyCode;
			 } else
			  if(document.layers) { // Nestcape
			   nTecla = evtKeyPress.which;
			  } else {
			   nTecla = evtKeyPress.which;
			   if (nTecla == 8) {// 8 = backspace
				return true;
			   }
			 }
			 
			
			 sValue = objForm[strField].value;
			
			 while (sValue.indexOf('.') != -1)
			  sValue = sValue.toString().replace(".","");
			 while (sValue.indexOf(',') != -1)
			  sValue = sValue.toString().replace(",","");
			 while (sValue.indexOf('-') != -1)
			  sValue = sValue.toString().replace("-","");
			 while (sValue.indexOf('/') != -1)
			  sValue = sValue.toString().replace("/","");
			
			 fldLen = sValue.length;
			 mskLen = sMask.length;
			 
			 i = 0;
			 nCount = 0;
			 sCod = "";
			 mskLen = fldLen;
			 
			 while (i <= mskLen) {
			  bolMask = ((sMask.charAt(i) == "-") || (sMask.charAt(i) == ":") || (sMask.charAt(i) == ".") || (sMask.charAt(i) == "/"))
			  bolMask = bolMask || ((sMask.charAt(i) == "(") || (sMask.charAt(i) == ")") || (sMask.charAt(i) == " "))
			
			  
			  if (bolMask) {
			   sCod += sMask.charAt(i);
			   mskLen++;
			  } else {
			   sCod += sValue.charAt(nCount);
			   nCount++;
			  }
			  i++;
			 }
			 
			 objForm[strField].value = sCod;
			
			 if (nTecla != (8 && 9 && 0 && ''))
			  if (sMask.charAt(i-1) == "9")
			   return ((nTecla > 47) && (nTecla < 58));
			  else return true;
			 else return true;
			
			}
