weekdays 	= new Array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado");
months 		= new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
today 		= new Date();
weekday 	= today.getDay();
monthday 	= today.getDate();
month 		= today.getMonth();
year 		= today.getFullYear();
weekday		= weekdays[weekday];
month 		= months[month];
dateString	= (String(weekday))+" "+(String(monthday))+" "+(String(month))+" de "+(String(year));
var openwindow;
var win;
function OpenLink(id){
	if (!openwindow || openwindow.closed){
		win ="window.open('/cgi-bin/RTM_v30/pl/inmuebles_avisos_cobros_urgentes_detalle_rept.pl?lan=es&appid=RTM_v30&&cliente="+id+"','MoraSectorExpedientesNotificador','left=100,top=20,width=675,height=550,scrollbars=yes,toolbar=no,menubar=yes,resizable=yes')";
		openwindow=eval(win);
	}else{openwindow.focus()}
}
function OpenBalance(id){
    winame="inmueble_balance";
    var fields="";
    var values="";
    if (!openwindow[winame] || openwindow[winame].closed){
        win ="window.open('/cgi-bin/RTM_v30/bin/BSWS.exe?lan=es&appid=RTM_v30&clase=inmueble_balance&id="+id+"&fields="+fields+"&values="+values+"','"+winame+"','left=0,top=0,width=100,height=100,resizable=yes,scrollbars=yes')";
        openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}