
    // CEP
        function getEndereco() {
            if($.trim($("#cep").val()) != ""){
                $.getScript("http://cep.republicavirtual.com.br/web_cep.php?formato=javascript&cep="+$("#cep").val(), function(){
                    if(resultadoCEP["resultado"]){
                        $("#endereco").val(unescape(resultadoCEP["tipo_logradouro"])+": "+unescape(resultadoCEP["logradouro"]));
                        $("#bairro").val(unescape(resultadoCEP["bairro"]));
                        $("#cidade_cep").val(unescape(resultadoCEP["cidade"]));
                        $("#estado_cep").val(unescape(resultadoCEP["uf"]));
                    }else{
                        alert("Endereço não encontrado");
                    }
                });				
            }			
        }
    // CEP
    
    
    // Limit
        var max=100;
        var ancho=300;
        function progreso_tecla(obj) {
         var progreso = document.getElementById("progreso");  
         if (obj.value.length < max) {
            progreso.style.backgroundColor = "#FFFFFF";    
            progreso.style.backgroundImage = "url(../img/textarea.png)";    
            progreso.style.color = "#FF0000";
            var pos = ancho-parseInt((ancho*parseInt(obj.value.length))/300);
            progreso.style.backgroundPosition = "-"+pos+"px 0px";
          } else {
            progreso.style.backgroundColor = "#CC0000";    
            progreso.style.backgroundImage = "url()";    
            progreso.style.color = "#FFFFFF";
            alert("use somente 100 caracteres");
          } 
          progreso.innerHTML = "("+obj.value.length+" caracteres usados de "+max+")";
        }	
    // Limit
	
	
	
	// Aumentar e diminuir fonte
		//Specify affected tags. Add or remove from list:
		var tgs = new Array( 'div' );
		
		//Specify spectrum of different font sizes:
		var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
		var startSz = 2;
		
		function ts( trgt,inc ) {
		if (!document.getElementById) return
		var d = document,cEl = null,sz = startSz,i,j,cTags;
		sz += inc;
		if ( sz < 0 ) sz = 0;
		if ( sz > 6 ) sz = 6;
		startSz = sz;
		if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];
		
		cEl.style.fontSize = szs[ sz ];
		
		for ( i = 0; i < tgs.length; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0; j < cTags.length; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
		}
		}
	// Aumentar e diminuir fonte
