function flash(largura, altura, arquivo){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+largura+'" height="'+altura+'" id="teste" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" />');
	document.write('<param name="movie" value="swf/'+arquivo+'" /><param name="quality" value="best" /><param name="quality" value="best" /><param name="menu" value="false" /><embed src="swf/'+arquivo+'" wmode="transparent" quality="best" width="'+largura+'" height="'+altura+'" name="teste" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function carrega(url, elemento){

try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}
	
	
    var conteudo = document.getElementById(elemento);

	   xmlhttp.open("GET",url,true);		
	
    //Executada quando o navegador obtiver o código
    xmlhttp.onreadystatechange=function() {
		
		if (xmlhttp.readyState == 1) {
	  		    
	  	}	

        if (xmlhttp.readyState==4){	

            //Lę o texto
            var texto=xmlhttp.responseText

            //Desfaz o urlencode
            texto=texto.replace(/\+/g," ")
            texto=unescape(texto)
			
			if (xmlhttp.status == 200) {
	  			var conteudo=document.getElementById(elemento)
            	conteudo.innerHTML=texto  
	  		}	
        }
    }
    xmlhttp.send(null)
}


function carregaSel(url, elemento){
	
var divPreloader = document.getElementById("divPreloader");
var divProdutos = document.getElementById("divProdutos");	
var divAlert = document.getElementById("divAlert");

divPreloader.style.display = "block";
divProdutos.style.display = "none";
divAlert.style.display = "none";

try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}
	
	
    var conteudo = document.getElementById(elemento);

	   xmlhttp.open("GET",url,true);		
	
    //Executada quando o navegador obtiver o código
    xmlhttp.onreadystatechange=function() {
		
		if (xmlhttp.readyState == 1) {
	  		    
	  	}	

        if (xmlhttp.readyState==4){	

            //Lę o texto
            var texto=xmlhttp.responseText

            //Desfaz o urlencode
            texto=texto.replace(/\+/g," ")
            texto=unescape(texto)
			
			if (xmlhttp.status == 200) {
	  			var conteudo=document.getElementById(elemento)
            	conteudo.innerHTML=texto 
				divPreloader.style.display = "none";
				divProdutos.style.display = "block";
	  		}	
        }
    }
    xmlhttp.send(null)
}
