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
	
	for (i=0;i<capa.length;i++){
		capa[i].hide()	
		capa[i].moveTo(desp[i].pageX(),65)
	}
	empezar = true
}

function posiciona(){
	for (i=0;i<capa.length;i++){
		capa[i].hide()	
		capa[i].moveTo(desp[i].pageX(),65)
	}
}

function mostrar_c(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 mostrar_r(ind){
 if (empezar){
	clearTimeout(retardo)
 }
}

function ocultar_r(ind){
 if (empezar){
	ocultar = capa[ind]
	clearTimeout(retardo)
	retardo = setTimeout("ocultar.hide()",1000)
 }
}

function abreVentana(sURL){
			sURL = "http://www.bancentral.gov.do/" + sURL
			window.open(sURL,"wind","scrollbars,resizable,width=550,height=460,menubar=false,location=false,top=20,left=80")
}

function ent(src) {
	if (!src.contains(event.fromElement)) {
		src.bgColor = "#7e7f3d"; 
	}
}

function sal(src) {
	if (!src.contains(event.toElement)) {
		src.bgColor = "#000080";
	}
}
