function On(qual){	
	document.getElementById(qual).style.display = "block";
}

function Off(qual){
	document.getElementById(qual).style.display = "none";
}


//-----------------MASCARA P/ CAMPOS DE NÚMEROS
function formata(campo, mask, evt) {
 
 if(document.all) { // Internet Explorer
    key = evt.keyCode; }
    else{ // Nestcape
       key = evt.which;
     }

 string = campo.value;  
 i = string.length;

 if (key != 8 && key != 0) {
  if (mask.charAt(i) == '§') {
	return (key > 47 && key < 58);
  } 
  else {
       if (mask.charAt(i) == '!') {  
	   		return true;
		}
   		for (c = i; c < mask.length; c++) {
         	if (mask.charAt(c) != '§' && mask.charAt(c) != '!')
        		campo.value = campo.value + mask.charAt(c);
      		else if (mask.charAt(c) == '!'){
                return true;
       		}
			else {
         		return (key > 47 && key < 58);
          	}
       	}
    }
  }
}
//-----------------MASCARA P/ CAMPOS DE NÚMEROS

jQuery.fn.extend({
	defTxt: function(){
		this.focus(function(){clTxt(this)});
		this.blur(function(){clTxt(this)});
		function clTxt(thefield){
			if(thefield.defaultValue==thefield.value){
				thefield.value=''
			}else if(thefield.value==''){
				thefield.value=thefield.defaultValue
			}
		}  
	}
});		
$(function(){
	$('.txtFrm').defTxt();
});

