var menu=new Array();
var info=new Array();
var mesAlert=new Array();
var selecs=new Array();
jQuery(document).ready(function(){
	readInfo();
	});
	
function readInfo(){
		
		menu=[];
		info=[];
		mesAlert=[];
		selecs=[];
		jQuery.ajax({
		type: "GET",
		url: "xml/data_"+lan+".xml",
		dataType: "xml",
		success: function(xml) {
	 
			
			jQuery(xml).find("menu").each(function(){
				
				
				jQuery(this).find("content").each(function(){
			
					
					jQuery(this).find('elem').each(function(){
						
						menu.push(jQuery(this).attr('src'));
						
						});//Fin de busqueda de imagenes
					
					});//Fin de busqueda de content
				
	
				
				});//Fin Busqueda Menu
			
			jQuery(xml).find(cat.toLowerCase()).each(function(){
				
				
				jQuery(this).find("content").each(function(){
				
					jQuery(this).find('elem').each(function(){
						
						info.push(jQuery(this).attr('src'));
						
						});//Fin de busqueda de imagenes
						
					if(cat.toLowerCase()=="contact"){
						
						jQuery(this).find('text').each(function(){
						
							mesAlert.push(jQuery(this).attr('src'));
							
							});
							
						jQuery(this).find('sel').each(function(){
						
							selecs.push(jQuery(this).attr('src'));
							
							});
						
						for(i=0;i<selecs.length;i++){
							jQuery("#referrer").get(0).options[i+1] = new Option(selecs[i], selecs[i]);
							}
						
						}
					
					});//Fin de busqueda de content
			
				
				});//Fin Busqueda Cat
				
			loadInfo();
			
			}//Fin de funcion de carga de XML
		});//Fin de Ajax
		
		}

function loadInfo(){
	
	for(i=0;i<menu.length;i++){
		
		jQuery("#menu"+(i+1)).html("&nbsp;"+menu[i]+"&nbsp;");
		}
		
	for(i=0;i<info.length;i++){
	
		jQuery("#infoE"+(i+1)).html(info[i]);
		
		}
	}
