function addFav(){
    var url      = "http://www.muambabitt.com.br";
    var title    = "muambabitt.com.br - Reggaeton 100% Brasileiro";
    if (window.sidebar) window.sidebar.addPanel(title, url,"");
    else if(window.opera && window.print){
        var mbm = document.createElement('a');
        mbm.setAttribute('rel','sidebar');
        mbm.setAttribute('href',url);
        mbm.setAttribute('title',title);
        mbm.click();
    }
    else if(document.all){window.external.AddFavorite(url, title);}
}  
  

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}







	var xmlhttp;
    var id;
	
	id = 'meio';
    
    function CriaObjetoAjax(){
    try
    {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e)
    {
        try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (e)
        {    
        xmlhttp = false;
        }
    }
    
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined' )
    {
        try
        {
            xmlhttp = new XMLHttpRequest();
        }
        catch (e)
        {
            xmlhttp = false;
        }
    }
    }

    function change()
    {
        if (xmlhttp.readyState==4)
        {
			texto=unescape(xmlhttp.responseText.replace(/\+/g," "));
            document.getElementById(id).innerHTML=texto;
			extraiScript(texto);
        }
    }


    function abrirPag(url,id1){ 
		CriaObjetoAjax();
		if (xmlhttp) {
			id = id1
			xmlhttp.open("GET",url,true);
			xmlhttp.onreadystatechange=change;
			xmlhttp.send(null);	
		}
    }
	
	function extraiScript(texto){
	//Maravilhosa função feita pelo SkyWalker.TO do imasters/forum
	//http://forum.imasters.com.br/index.php?showtopic=165277
		// inicializa o inicio ><
		var ini = 0;
		// loop enquanto achar um script
		while (ini!=-1){
			// procura uma tag de script
			ini = texto.indexOf('<script', ini);
			// se encontrar
			if (ini >=0){
				// define o inicio para depois do fechamento dessa tag
				ini = texto.indexOf('>', ini) + 1;
				// procura o final do script
				var fim = texto.indexOf('</script>', ini);
				// extrai apenas o script
				codigo = texto.substring(ini,fim);
				/**********************
				
				* Alterado por Micox - micoxjcg@yahoo.com.br
				* Alterei pois com o eval não executava funções.
				
				* Alterado por Everton D. Silva - everton.silva@streamingshop.com.br
				* não estava retornando o valor
				***********************/
				var novo = document.createElement('script');
				novo.type         = 'text/javascript';
				novo.language    = 'javascript';
				novo.text = codigo;
				document.body.appendChild(novo);
			}
		}
	}

    function changeFormNews()
    {
        if (xmlhttp.readyState==4)
        {
			texto=unescape(xmlhttp.responseText.replace(/\+/g," "));
            document.getElementById(form).innerHTML=texto;
			extraiScript(texto);
        }
    }	
	

	function setarLoginImprensa() {
		campos = "&usuario="+encodeURI(document.getElementById('usuario').value);
		campos += "&senha="+encodeURI(document.getElementById('senha').value);
	}		

    function LogarImprensa(url,campos){    
		CriaObjetoAjax();
		id = "login";
		if (xmlhttp) {
			xmlhttp.open("GET",url+campos,true);
			xmlhttp.onreadystatechange=change;
			xmlhttp.send(null);	
		}
    }	


	function setarMural() {
		campos = "&nome="+encodeURI(document.getElementById('nome').value);
		campos += "&email="+encodeURI(document.getElementById('email').value);
		campos += "&cidade="+encodeURI(document.getElementById('cidade').value);
		campos += "&uf="+encodeURI(document.getElementById('uf').value);		
		campos += "&mensagem="+encodeURI(document.getElementById('mensagem').value);					
	}		

    function EnviaFormMural(url,campos){    
		CriaObjetoAjax();
		id = "Formulario";
		if (xmlhttp) {
			xmlhttp.open("GET",url+campos,true);
			xmlhttp.onreadystatechange=change;
			xmlhttp.send(null);	
		}
    }	


	function setarContato() {
		campos = "&nome="+encodeURI(document.getElementById('nome').value);
		campos += "&email="+encodeURI(document.getElementById('email').value);
		campos += "&cidade="+encodeURI(document.getElementById('cidade').value);
		campos += "&uf="+encodeURI(document.getElementById('uf').value);		
		campos += "&dd="+encodeURI(document.getElementById('dd').value);		
		campos += "&telefone="+encodeURI(document.getElementById('telefone').value);				
		campos += "&assunto="+encodeURI(document.getElementById('assunto').value);
		campos += "&mensagem="+encodeURI(document.getElementById('mensagem').value);					
	}		

    function EnviaFormContato(url,campos){    
		CriaObjetoAjax();
		id = "Formulario";
		if (xmlhttp) {
			xmlhttp.open("GET",url+campos,true);
			xmlhttp.onreadystatechange=change;
			xmlhttp.send(null);	
		}
    }	

	function setarNews() {
		campos = "&email="+encodeURI(document.getElementById('emailnews').value);
	}

    function EnviaFormNews(url,campos){    
		CriaObjetoAjax();
		form = "news";
		if (xmlhttp) {
			xmlhttp.open("GET",url+campos,true);
			xmlhttp.onreadystatechange=changeFormNews;
			xmlhttp.send(null);	
		}
    }
	
	function setarFaclube() {
		campos = "&email="+encodeURI(document.getElementById('emailfa').value);
	}		

	function EnviaFormFaclube(url,campos){    
		CriaObjetoAjax();
		id = "Conteudo";
		if (xmlhttp) {
			xmlhttp.open("GET",url+campos,true);
			xmlhttp.onreadystatechange=change;
			xmlhttp.send(null);	
		}
    }	