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  = new Object();
function OpenBalance(id,clase){
    var winame = "Balance";
    var fields = "";
    var values = "";
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/RTM_v23/bin/bsws.pl?lan=es&appid=RTM_v23&clase="+clase+"_balance_financiamientos&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()}
}
function OpenExpediente(id,clase){
    var winame = "Expediente";
    var fields = "";
    var values = "";
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/RTM_v23/bin/REPT.pl?lan=es&appid=RTM_v23&clase="+clase+"s&id="+id+"&fields=&values=','"+winame+"','left=0,top=0,width=800,height=600,resizable=yes,scrollbars=yes')";
	openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}
function OpenNotificacion(id,clase,tip,gid){
    winame="Notificacion_"+id;
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/RTM_v23/pl/mora_notificacion_expediente_tona_rept.pl?lan=es&appid=RTM_v23&clase="+clase+"&id="+id+"&tipo="+tip+"&gid="+gid+"','"+winame+"','left=0,top=0,width=1000,height=700,resizable=yes,scrollbars=yes')";
	openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}
function OpenAdministrativo(id,clase){
    if(clase=="inmueble"){clase="inmueble_administrativo"}
    if(clase=="empresa"){clase="empresa_administrativo"}
    
    winame="Balance";
    var fields="";
    var values="";
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/RTM_v23/bin/gdfl.pl?lan=es&appid=RTM_v23&clase="+clase+"&id="+id+"&fields="+fields+"&values="+values+"&dt_vencimiento=2008-07-31','"+winame+"','left=0,top=0,width=100,height=100,resizable=yes,scrollbars=yes')";
	openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}