function loadImage(img)
     {
        var im = document.getElementById("Central"); //Obtengo el TD
		im.innerHTML = "<img src="+img+"></img>"; 
		var cmx = crearObjeto()

		cmx.open("get", img, true);
  				
		cmx.send(null);  
     }
function crearObjeto()
{ 
        try { 
                objetus = new ActiveXObject("Msxml2.XMLHTTP"); 
        } catch (e) { 
                try { 
                        objetus= new ActiveXObject("Microsoft.XMLHTTP"); 
                } catch (E) { 
                        objetus= false; 
                } 
        } 
        if (!objetus && typeof XMLHttpRequest!='undefined') { 
                objetus = new XMLHttpRequest(); 
        } 
        return objetus 
}
//Funciones necesarias para la cookies del contador de visitas-----------------------------------------------------------------

var num = 0;

function mandarGalleta(nombre, valor, caducidad) 
{
	document.cookie = nombre + "=" + escape(valor) + ((caducidad == null) ? "" : ("; expires=" + caducidad.toGMTString()));
}

function consultarGalleta(nombre) 
{
	var buscamos = nombre + "=";
	
	if (document.cookie.length > 0) 
	{
		i = document.cookie.indexOf(buscamos);
		if (i != -1) 
		{
			i += buscamos.length;
			j = document.cookie.indexOf(";", i);
			if (j == -1)
				j = document.cookie.length;
			return unescape(document.cookie.substring(i,j));
		}
	}
}

function Contador() 
{
	var time = new Date();
	var dia = time.getDate();
	var mes = time.getMonth();
	var anno = time.getYear();
	
    var fecha = new Date (anno, mes, dia+1);		//fecha de expiracion de la cookie
    
    if (!(num=consultarGalleta("Visitas")))	// Si no existe la cookie "Visitas" 
		num = 0;								// reseteo a 0 la variable num

	num++;
    mandarGalleta("Visitas", num, fecha);
	document.getElementById('celda_contadora').innerHTML = "<span class='visitas'>Visita #"+num+"</span>";
      //document.write(num+" veces.");
}

//-------------------------------------------------------------------------------------------------------------------------------

function efecto_links(contenedor,estado)
{
	if(estado==1)
		document.getElementById(contenedor).style.backgroundColor='#C8BF9E';
	else
		document.getElementById(contenedor).style.backgroundColor='';
}

function efecto_select(contenedor)
{
	document.getElementById(contenedor).style.backgroundColor='#000000';
	document.getElementById(contenedor).style.enabled=false;
}


