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 OpenCargos(id){
    var winame = "Cargos";
    var fields = "";
    var values = "";
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/RTM_v30/bin/gdfl.pl?lan=es&appid=RTM_v30&clase=smea_cargos&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 OpenAbonos(id){
    var winame = "Abonos";
    var fields = "";
    var values = "";
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/RTM_v30/bin/gdfl.pl?lan=es&appid=RTM_v30&clase=smea_abonos&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 OpenAbonosSola(id){
    var winame = "AbonosSola";
    var fields = "";
    var values = "";
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/RTM_v30/bin/gdfl.pl?lan=es&appid=RTM_v30&clase=smea_abonos_sola&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 OpenBalance(id_smea,id_sim){
    var winame = "Balance";
    var fields = "";
    var values = "";
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/RTM_v30/pl/smea_balance.pl?lan=es&appid=RTM_v30&clase=smea&id_smea="+id_smea+"&id_sim="+id_sim+"&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()}
}