function reSizeIframe(iframe){
            var iframe_aux = document.getElementById(iframe);
            var ver = navigator.appVersion;
            var thestart = parseFloat(ver.indexOf("MSIE"))+1;
            var brow_ver = parseFloat(ver.substring(thestart+4,thestart+7));
            
            
            
            
            if ((navigator.appName.indexOf('Internet Explorer') > 0) && (brow_ver <= 7)) {
                iframe_aux.height = iframe.contentWindow.document.body.scrollHeight; //IE6, IE7
            }
            else {
                // if (navigator.appName.toString() == "Netscape") {//FF 3.0.11, Opera 9.63, Chrome
                iframe_aux.height = iframe_aux.contentDocument.documentElement.scrollHeight;
            }
            
}



function iframeAutoHeight(quem){
    //by Micox - elmicox.blogspot.com - elmicox.com - webly.com.br  
    if(navigator.appName.indexOf("Internet Explorer")>-1){ //ie sucks
        var func_temp = function(){
            var val_temp = quem.contentWindow.document.body.scrollHeight + 15
            quem.style.height = val_temp + "px";
        }
        setTimeout(function() {func_temp()},100) //ie sucks
    }else{
        var val = quem.contentWindow.document.body.parentNode.offsetHeight + 15
        quem.style.height= val + "px";
    }    
}



function apagarConteudoInputNewsletter(formName, nameCampo){
    eval('document.'+formName+'.'+nameCampo.name+'.value = ""');
}

function recolocarConteudoInputNewsletter(formName, nameCampo){
    var campo = eval('document.'+formName+'.'+nameCampo.name);
    var validacao = true;
    
    
    if (campo.value.length < 1) validacao = false;
    else if(!valida_EMAIL(campo.value)) validacao = false;
    
    
    if(!validacao) campo.value = 'email';
    
    
}

function enviarConteudoInputNewsletter(formName, nameCampo){
    var form = eval('document.'+formName);
    var campo = eval('document.'+formName+'.'+nameCampo);
    
    
	//validar email --------------------------------------------------------
	if (campo.value.length < 1){
                alert("Preencha o Email");
		campo.focus();
		return false;
	}

        if(!valida_EMAIL(campo.value)){
                alert("O email digitado esta invalido.");
		campo.focus();
		return false;
        }
        
        
    form.submit();
}
