// JavaScript Document
	dir= $("url_inicio").value + 'cargarxmlpublicidad.asp';
	doAjax(dir,'','respcargarxmlpublicidad','get','1');
	
	dir= $("url_inicio").value +'cargarxmlpublicidaddestacados.asp';
	doAjax(dir,'','respcargarxmlpublicidaddestacados','get','1');
	//respcargarxml(doAjaxSincrono(dir));
	function respcargarxmlpublicidad(xml){
		var Value = xml.getElementsByTagName('publicidad')[0];
		var publi1 = Value.getElementsByTagName('item')[0];
		var publi2 = Value.getElementsByTagName('item')[1];
		
		//publi1
		imagen1=publi1.getElementsByTagName('imagen')[0].firstChild.data;
		titulo1=publi1.getElementsByTagName('titulo')[0].firstChild.data;
		texto1=publi1.getElementsByTagName('texto')[0].firstChild.data;
		enlace1=publi1.getElementsByTagName('enlace')[0].firstChild.data;
		$("imgpublicidad1").src=imagen1;
		$("titulopublicidad1").innerHTML=titulo1;
		$("titulopublicidad1").href=enlace1;
		$("textopublicidad1").innerHTML=texto1;
		$("textopublicidad1").href=enlace1;

		$("enlacepublicidad1").href=enlace1;
		
		//
		//publi2
		imagen2=publi2.getElementsByTagName('imagen')[0].firstChild.data;
		titulo2=publi2.getElementsByTagName('titulo')[0].firstChild.data;
		texto2=publi2.getElementsByTagName('texto')[0].firstChild.data;
		enlace2=publi2.getElementsByTagName('enlace')[0].firstChild.data;
		$("imgpublicidad2").src=imagen2;
		$("titulopublicidad2").innerHTML=titulo2;
		$("textopublicidad2").innerHTML=texto2;
		$("titulopublicidad2").href=enlace2;
		$("textopublicidad2").href=enlace2;
		$("enlacepublicidad2").href=enlace2;
		//
	}
	function respcargarxmlpublicidaddestacados(xml){
		var Value = xml.getElementsByTagName('publicidaddestacados')[0];
		var n_visibles = Value.getElementsByTagName('n_visibles')[0].firstChild.data;
		var total = Value.getElementsByTagName('item').length;

		i=0;
		mostradas=0;
 		while ((mostradas<n_visibles)&&(i<total)){
			var publides = Value.getElementsByTagName('item')[i];
			var titulo=publides.getElementsByTagName('titulo')[0].firstChild.data;
			var texto=publides.getElementsByTagName('texto')[0].firstChild.data;
			var enlace=publides.getElementsByTagName('enlace')[0].firstChild.data;
			var fechafin=publides.getElementsByTagName('fechafin')[0].firstChild.data;
			
			divdestacados= document.getElementById('publicidadcontenidodestacados');
			
			divtitulodestacados = document.createElement('div');
			divtitulodestacados.id="publicidadtitulodestacados"+i;
			
			divenlacetitulodestacados = document.createElement('a');
			divenlacetitulodestacados.className="texto-11-406387";
			divenlacetitulodestacados.onmouseover = function () {
				this.className="texto-11-406387-sobre";
				
			} 
			divenlacetitulodestacados.onmouseout = function () {
				this.className="texto-11-406387";
				
			} 
			divenlacetitulodestacados.target="_blank";
			divenlacetitulodestacados.href=enlace;
			
			divbenlacetitulodestacados = document.createElement('b');
			divbenlacetitulodestacados.innerHTML=titulo;
			
			divenlacetitulodestacados.appendChild(divbenlacetitulodestacados);
			divtitulodestacados.appendChild(divenlacetitulodestacados);
			divdestacados.appendChild(divtitulodestacados);
			
			divtextodestacados = document.createElement('div');
			divtextodestacados.id="publicidadtextodestacados"
			divtextodestacados.className="texto-11-406387";
			divtextodestacados.innerHTML=texto
			divdestacados.appendChild(divtextodestacados);
			mostradas++;
			i++;
		}
	}