<!--

// nav --------------------------------------------------------------------------

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

// inpage funcs --------------------------------------------------------------------------

function MM_openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}

function openwin(url)
{
	nwin=window.open(url, "nwin",config="scrollbars=yes,resizable=yes,toolbar=yes,location=yes,status=yes,menubar=yes,");
	nwin.focus();
}

function openwin2(Archivo) {
	win2 = window.open(Archivo,"popular","width=600,height=450,scrollbars=no,resizable=no");
}

// goto.js --------------------------------------------------------------------------

var URL_HOME="/espanol/pagina+inicial.htm";
var URL_ABOUT_US="/espanol/sobre+nosotros/identidad+corporativa.htm";
var URL_CONTACT_US="/espanol/contactenos.htm";
var URL_SITE_MAP="/espanol/mapa+del+sitio.htm";
var URL_FAQ="/espanol/preguntas+frecuentes/preguntas.htm"; 
var URL_SEARCH="/espanol/buscar.htm";
var URL_LANGUAGE="/ingles/../ingles/home+page.htm";
function goURL(url) { document.location.href=url; } 

var currUrl = location.href.toLowerCase();

function goto_cuenta_personal() {
	if(currUrl.indexOf(".com") == -1) {
		document.location.href="http://co15ibanking:85/banco.popular.ib?Personal";
	} else {
		document.location.href="https://www.bpd.com.do/banco.popular.ib?Personal";
	}
}


function goto_cuenta_corporativa() {
	if(currUrl.indexOf(".com") == -1) {
		document.location.href="http://co15ibanking:85/banco.popular.ib?Empresarial";
	} else {
		document.location.href="https://www.bpd.com.do/banco.popular.ib?Empresarial";
	}
}

function goto_demo() {
	if(currUrl.indexOf(".com") == -1) {
		document.location.href="http://co15ibanking/espanol/demo+internet+banking.htm";
	} else {
		document.location.href="http://www.bpd.com.do/espanol/demo+internet+banking.htm";
	}
}

function goto_inmuebles() {
	document.location.href="/espanol/ventas+inmuebles/indice.htm";
}

function goto_acceso_cuentas() {
	if(currUrl.indexOf(".com") == -1) {
		document.location.href="http://co15ibanking:85/banco.popular.ib?Registracion";
	} else {
		document.location.href="https://www.bpd.com.do/banco.popular.ib?Registracion";
	}
}

function goto_acceso_cuentas_personal() {	
	if(currUrl.indexOf(".com") == -1) {
		document.location.href="http://co15ibanking:85/banco.popular.ib?RegistroPersonal";
	} else {
		document.location.href="https://www.bpd.com.do/banco.popular.ib?RegistroPersonal";
	}
}

function goto_acceso_cuentas_empresarial() {
	if(currUrl.indexOf(".com") == -1) {
		document.location.href="http://co15ibanking:85/banco.popular.ib?RegistroEmpresarial";
	} else {
		document.location.href="https://www.bpd.com.do/banco.popular.ib?RegistroEmpresarial";
	}
}

function goto_productos() {
	if(document.location.href.indexOf("/espanol") > 0 || document.location.href.indexOf("/ingles") == -1) {
		document.location.href="/espanol/productos.htm";
	} else {
		document.location.href="/ingles/products.htm";
	}
}

function goto_calculadoras() {
	if(document.location.href.indexOf("/espanol") > 0 || document.location.href.indexOf("/ingles") == -1) {
		document.location.href="/espanol/Calculadoras.htm";
	} else {
		document.location.href="/ingles/calculators.htm";
	}

}

function gotoproductos() {
	goto_productos();
}

function CalcPrestamo() {
	document.location.href="/espanol/CalcPrestamo.htm";
}

function Calc0KM() {
	document.location.href="/espanol/Calc0KM.htm";
}

// date.js --------------------------------------------------------------------------

function showtime () {

	var now = new Date();
	var hours= now.getHours();
	var minutes= now.getMinutes();
	var seconds= now.getSeconds();
	var months= now.getMonth();
	var dates= now.getDate();
	var years= now.getYear();
	var timeValue = "";
	timeValue += ((months >9) ? "" : " ")
	timeValue += ((dates >9) ? "" : " ")
	timeValue = ( months +1)
	timeValue +="/"+ dates;
	timeValue +="/"+  years;
	var ap="A.M.";
	if (hours == 12) {
		ap = "P.M."
	}
	if (hours == 0) {
		hours = 12
	}
	if(hours >= 13){
		hours -= 12;
		ap="P.M."
	}
	var timeValue2 = " " + hours
	timeValue2 += ((minutes < 10) ? ":0":":") + minutes + " " + ap
	return timeValue2;
	
}
function MakeArray(n) {

	this.length = n
	return this
	
}
monthNames = new MakeArray(12)
monthNames[1] = "Enero"
monthNames[2] = "Febrero"
monthNames[3] = "Marzo"
monthNames[4] = "Abril"
monthNames[5] = "Mayo"
monthNames[6] = "Junio"
monthNames[7] = "Julio"
monthNames[8] = "Agosto"
monthNames[9] = "Septiembre"
monthNames[10] = "Octubre"
monthNames[11] = "Noviembre"
monthNames[12] = "Diciembre"
daysNames = new MakeArray(7)
daysNames[1] = "Domingo"
daysNames[2] = "Lunes"
daysNames[3] = "Martes"
daysNames[4] = "Miercoles"
daysNames[5] = "Jueves"
daysNames[6] = "Viernes"
daysNames[7] = "Sabado"

function customDateSpring(oneDate) {

	var theDay = daysNames[oneDate.getDay() +1]
	var theDate =oneDate.getDate()
	var theYear=oneDate.getYear();
	var theMonth = monthNames[oneDate.getMonth() +1]
	var dayth="th"
	return theDay + ", " + theDate + " de " + theMonth + " " + " de "+theYear+" • "+showtime();
	
}

// --------------------------------------------------------------------------

function rightNavFlash() {

	var ad = new Array(10); 
	ad[0]='/resources/ARS-universal.swf';
	ad[1]='/resources/ARS-universal.swf';
	ad[2]='/resources/basket.swf';
	ad[3]='/resources/basket.swf';
	ad[4]='/resources/TARJETA.swf';
	ad[5]='/resources/TARJETA.swf';
	ad[6]='/resources/telebanco.swf';
	ad[7]='/resources/telebanco.swf';
	ad[8]='/resources/pagos_de_servicios.swf';
	ad[9]='/resources/pagos_de_servicios.swf';
	ad[10]='/resources/add_leasing.swf';
	ad[11]='/resources/add_leasing.swf';
	
	var i;
	var adFile;
	i = (new Date()).getSeconds() % ad.length;
	adFile = ad[i];
	adFile = 'http://www.bpd.com.do' + adFile;
	
	MD_WFlash(adFile, 'bannerdiv', 139, 322, true)
	
}

// --------------------------------------------------------------------------

function MD_WFlash(fileUrl, divDestination, sizeX, sizeY, useWmode) {

	var swfHtml;
	swfHtml = '';
	swfHtml += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + sizeX + '" height="' + sizeY + '">';
	swfHtml += '<param name="movie" value="' + fileUrl + '">';
	swfHtml += '<param name="quality" value="high">';

	if(useWmode) {
		swfHtml += '<param name="wmode" value="transparent">';
	}

	if(useWmode) {
		swfHtml += '<embed src="' + fileUrl + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + sizeX + '" height="' + sizeY + '" wmode="transparent">';
	} else {
		swfHtml += '<embed src="' + fileUrl + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + sizeX + '" height="' + sizeY + '">';
	}	
		
	swfHtml += '</embed></object>';

	if(document.getElementById(divDestination)) {
		document.getElementById(divDestination).innerHTML = swfHtml;
	} else {
		document.write(swfHtml);
	}

}

-->