//////////////////////// Obtener Contenido ////////////////////
function getContenido_cb(z) {
	var datos = z.parseJSON();		
	Effect.BlindDown('textos');	
      
    		
	document.getElementById('textos').innerHTML = datos['contenido'];
    document.getElementById('flash').innerHTML = datos['flash'];
	
	//document.getElementById('flash').innerHTML = datos['modulo'];
	    
		
}
function goContenido(d){	
	document.getElementById('textos').innerHTML= '<div class="divIndicator"><table style="width:500px; height:200px;" ><tr><td valign="middle" align="center"><img src="images/loading.gif" alt="" /> </td></tr></table></div>';
    document.getElementById('flash').innerHTML= '<div class="divIndicator"><center><img src="images/loading.gif" alt="" /> </center></div>';
	setTimeout("Effect.BlindUp('textos');",2000);
    //setTimeout("Effect.BlindUp('flash');",2000);
	setTimeout("x_getContenido('" + d + "',getContenido_cb);",3000);
}
//////////////////////// Obtener Menu ////////////////////
function getMenu_cb(z) {
    var datos = z.parseJSON();
	//Effect.Fade('divMenu');
    //Effect.Appear('divMenu');
    //Effect.Appear('divIdioma');
    
    //document.getElementById('divMenu').innerHTML = datos['menu'];
    //document.getElementById('divIdioma').innerHTML = datos['idioma'];
    //document.getElementById('divIndex').innerHTML = datos['linkhome'];
    
    //setTimeout("x_getContenido('" + datos['modulo'] + "',getContenido_cb);",3000);    
    //setTimeout("goContenido('"+datos['modulo']+"');",2000);
	setTimeout("goContenido('"+datos['modulo']+"');",1000);
    //Effect.Appear('divMenu');
    //document.getElementById('divMenu').innerHTML = "";
}
function goMenu(d){    
    if(d == "en")
    {
        document.getElementById('divIdioma').innerHTML = '<a href="javascript:goMenu(\'es\');void(0);" target="_self" style=" font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9px; color:#7a1616; text-decoration:none"><img border="0" src="images/b_mx.gif"/>&nbsp;Espa&ntilde;ol</a>';
		document.getElementById('divMenuEsp').style.display = "none";
		document.getElementById('divMenuIng').style.display = "";
    }
    else
    {
        document.getElementById('divIdioma').innerHTML = '<a href="javascript:goMenu(\'en\');void(0);" target="_self" style=" font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9px; color:#7a1616; text-decoration:none"><img border="0" src="images/b_us.gif"/>&nbsp;English</a>';
		document.getElementById('divMenuIng').style.display = "none";
		document.getElementById('divMenuEsp').style.display = "";
	}
    //setTimeout("Effect.Fade('divIdioma');",2000);
    //setTimeout("x_getMenu('" + d + "',getMenu_cb);",3000);
	setTimeout("x_getMenu('" + d + "',getMenu_cb);",1);
	
	
}
//////////////////////// FIN Obtener Menu ////////////////////
function getGaleria(z, x) {
      
	if(z==x){ var lin2=z; } else { lin2=z+1; }
	
	if(z==1){ var lin1=1; } else { var lin1=z-1; }
	
	if(z<=9){ var name="marques0"+z+".jpg";	} else { var name="marques"+z+".jpg"; }
	
	Effect.Appear('imagen');	   		
	document.getElementById('imagen').innerHTML = "<img src='galery-images/"+ name +"' border='0' />";
	document.getElementById('ligas').innerHTML = '';
    document.getElementById('ligas').innerHTML = '<img src="images/g06.jpg" alt="" width="600" height="75" border="0" usemap="#Map" /><map name="Map" id="Map"><area shape="rect" coords="498,11,565,40" href="javascript:goGaleria('+ lin2 +', '+ x +');" /><area shape="rect" coords="433,11,496,40" href="javascript:goGaleria('+ lin1 +', '+ x +');" /></map>';
	    
		
}
function goGaleria(d, j){	
	document.getElementById('imagen').innerHTML= '<div class="divIndicator"><table style="width:500px; height:200px;" ><tr><td valign="middle" align="center"><img src="images/loading.gif" alt="" /> </td></tr></table></div>';
	setTimeout("Effect.BlindUp('imagen');",2000);
		setTimeout("getGaleria(" + d + ","+ j +");",3000);
}