var capa = new Array()
var desp = new Array()
var retardo
var ocultar
var empezar = false

function windowOnload() {
	capa[0] = cbeGetElementById('c1').cbe
	capa[1] = cbeGetElementById('c2').cbe
	capa[2] = cbeGetElementById('c3').cbe
	capa[3] = cbeGetElementById('c4').cbe
	capa[4] = cbeGetElementById('c5').cbe
  capa[5] = cbeGetElementById('c6').cbe
	
	desp[0] = cbeGetElementById('ancla1').cbe
	desp[1] = cbeGetElementById('ancla2').cbe
	desp[2] = cbeGetElementById('ancla3').cbe
	desp[3] = cbeGetElementById('ancla4').cbe
	desp[4] = cbeGetElementById('ancla5').cbe
	desp[5] = cbeGetElementById('ancla6').cbe

	situa()	
	
	empezar = true
	
	window.defaultStatus='C.I.A.S. Comite Independiente Anti-Sida'
}

function situa(){
	for (i=0;i<capa.length;i++){
		capa[i].hide();
		coordY = desp[i].pageY() - 2;
		coordX = desp[i].pageX() + 100;
		capa[i].moveTo(coordX,coordY);
	}
}

function muestra_coloca(ind){
 if (empezar){
	for (i=0;i<capa.length;i++)
		if (ind != i) capa[i].hide()
	clearTimeout(retardo)
	if (! capa[ind].visibility()){
		capa[ind].show()
	}
 }
}

function muestra_retarda(ind){
 if (empezar){
	clearTimeout(retardo)
 }
}

function oculta_retarda(ind){
 if (empezar){
	ocultar = capa[ind]
	clearTimeout(retardo)
	retardo = setTimeout("ocultar.hide()",1000)
 }
}

function pon_colorea(src) {
	if (!src.contains(event.fromElement)) {
		src.bgColor = "F3F7E7";
	}
}

function sal_colorea(src) {
	if (!src.contains(event.toElement)) {
		src.bgColor = "DEEBB7";
	}
}


<!-- contador de visitas
function GetCookie (name) { 
var arg = name + "="; 
var alen = arg.length; 
var clen = document.cookie.length; 
var i = 0; 
while (i < clen) {
var j = i + alen; 
if (document.cookie.substring(i, j) == arg) 
return getCookieVal (j); 
i = document.cookie.indexOf(" ", i) + 1; 
if (i == 0) break; 
} 
return null;
}
function SetCookie (name, value) { 
var argv = SetCookie.arguments; 
var argc = SetCookie.arguments.length; 
var expires = (argc > 2) ? argv[2] : null; 
var path = (argc > 3) ? argv[3] : null; 
var domain = (argc > 4) ? argv[4] : null; 
var secure = (argc > 5) ? argv[5] : false; 
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) + 
((domain == null) ? "" : ("; domain=" + domain)) + 
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) { 
var exp = new Date(); 
exp.setTime (exp.getTime() - 1); 
var cval = GetCookie (name); 
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var expDays = 30;
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function tamt(){
var countt = GetCookie('count');
return countt;
}
// final contador de visitas -->


<!-- abrir ventana acerca de
function abrir_acercade(url){
window.open(url,"blank","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=354,height=312");
}

<!-- abrir ventana de ayuda
function abrir_ayuda(){
url='ayuda/ayuda.htm'
window.open(url,"blank","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
}

<!-- fecha
today=new Date();

function isnArray() {

 argnr=isnArray.arguments.length

 for (var i=0;i<argnr;i++) {

  this[i+1] = isnArray.arguments[i];

  }

 }


var isnMonths=new isnArray("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");

var isnDays= new isnArray("Lunes","Martes","Miercoles","Jueves","Viernes","Sábado","Domingo");

isnDays[0]="Domingo";

function escribe_fecha(){
document.write(isnDays[today.getDay()]+", "+today.getDate()+" de "+isnMonths[today.getMonth()+1]+" de "+today.getYear());
}

<!-- hora
function hora(){
var fecha = new Date()
var hora = fecha.getHours()
var minuto = fecha.getMinutes()
var segundo = fecha.getSeconds()
if (hora < 10) {hora = "0" + hora}
if (minuto < 10) {minuto = "0" + minuto}
if (segundo < 10) {segundo = "0" + segundo}
var horita = hora + ":" + minuto + ":" + segundo
document.getElementById('hora').firstChild.nodeValue = horita
tiempo = setTimeout('hora()',1000)
}

function escribe_hora(){
document.write('<span id="hora">')
document.write ('000000</span>')
hora()
}

