	var noticias 	= new  Array();
	
	function busca_noticia(){
		var nameNode, nameTextNode, url;
		
		var xmlhttp   = false;
		if (window.XMLHttpRequest) { // Mozilla, Safari,...
	    	xmlhttp = new XMLHttpRequest();
	        if(xmlhttp.overrideMimeType){
	        	xmlhttp.overrideMimeType('text/xml');
			}
		}else if (window.ActiveXObject){ // IE
			try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			}catch(e){
				try{
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	            } catch (e) {}
	        }
	    }
		url = "xml/noticia.php?Limit=10";
		xmlhttp.open("GET", url,true);
		xmlhttp.onreadystatechange = function(){ 

			if(xmlhttp.readyState == 4){ 
				if(xmlhttp.status == 200){
					if(xmlhttp.responseText != 'false'){
						var IdNoticia, TituloNoticia;
						for(var i=0; i<xmlhttp.responseXML.getElementsByTagName("IdNoticia").length; i++){
						
							nameNode = xmlhttp.responseXML.getElementsByTagName("IdNoticia")[i]; 
							nameTextNode = nameNode.childNodes[0];
							IdNoticia = nameTextNode.nodeValue;
							
							nameNode = xmlhttp.responseXML.getElementsByTagName("TituloNoticia")[i]; 
							nameTextNode = nameNode.childNodes[0];
							TituloNoticia = nameTextNode.nodeValue;
							
							noticias[i]	=	"<a href='?ctt=noticia.php&IdNoticia="+IdNoticia+"'>"+TituloNoticia+"</a>";
							
							if(i==0){
								document.getElementById('l3_l2').innerHTML	=	"<MARQUEE>" + noticias[i] + "</MARQUEE>";
							}
						}
						lista_noticia(0,i);
					}
				}
			} 
			return true;
		}
		xmlhttp.send(null);
	}
	function lista_noticia(i,total){
		if(i == total){
			busca_noticia();
		}else{
			setTimeout("muda_noticia("+(i+1)+","+total+")",15000);
		}
	}
	function muda_noticia(pos,total){
		document.getElementById('l3_l2').innerHTML	=	"<MARQUEE>" + noticias[pos] + "</MARQUEE>";
		lista_noticia(pos,total)
	}
