function Alternar()
{
	capa1 = document.getElementById("capa_calendario");
	capa2 = document.getElementById("capa_enlaces");
	solap = document.getElementById("solapas");
	if (capa1.style.display == "block" || capa1.style.display == "") {
		solap.src = "../images/img_menus/04calagen_02pes.gif";
		capa1.style.display = "none";
		capa2.style.display = "block";
	}
	else {
		solap.src = "../images/img_menus/04calagen_01pes.gif";
		capa1.style.display = "block";
		capa2.style.display = "none";
	}	
}

function PrecargarSolapas()
{
	i1 = new Image;
	i1.src = "../images/img_menus/04calagen_01pes.gif";
	i2 = new Image;
	i2.src = "../images/img_menus/04calagen_02pes.gif";
}

//----------------------------------------------------------------- Reloj -----
var timerID = null;
var timerRunning = false;

var nums = "../menu/calendario/imgs/n";

var hh = 0;
var mm = 0;
var ss = 0;

function startclock(h,m,s)
{
	hh = h;
	mm = m;
	ss = s;

	with (document) {
		getElementById("ssd").src = nums+parseInt(ss / 10)+".gif";
		getElementById("ssu").src = nums+(ss % 10)+".gif";
		getElementById("mmd").src = nums+parseInt(mm / 10)+".gif";
		getElementById("mmu").src = nums+(mm % 10)+".gif";
		getElementById("hhd").src = nums+parseInt(hh / 10)+".gif";
		getElementById("hhu").src = nums+(hh % 10)+".gif";
	}

	timerID = setInterval("showtime()", 1000);
	timerRunning = true;
}

function stopclock()
{
	if (timerRunning) clearInterval(timerID);
	timerRunning = false;
}

function showtime()
{
	var act_sig = false;

	ss++;
	if (ss > 59) { ss = 0; mm++; act_sig = true; }
	document.getElementById("ssd").src = nums+parseInt(ss / 10)+".gif";
	document.getElementById("ssu").src = nums+(ss % 10)+".gif";
	
	if (act_sig) {
		act_sig = false;
		if (mm > 59) { mm = 0; hh++; act_sig = true; }
		document.getElementById("mmd").src = nums+parseInt(mm / 10)+".gif";
		document.getElementById("mmu").src = nums+(mm % 10)+".gif";
	
		if (act_sig) {
			if (hh > 23) hh = 0;
			document.getElementById("hhd").src = nums+parseInt(hh / 10)+".gif";
			document.getElementById("hhu").src = nums+(hh % 10)+".gif";
		}
	}
}
//----------------------------------------------------------------- Reloj -----