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 Generar(){
	var openwindow1;
	var cla	= document.form.clase.value;
	var ano	= document.form.i4_ano.options[document.form.i4_ano.selectedIndex].value;
	var mes	= document.form.i2_mes.options[document.form.i2_mes.selectedIndex].value;
	var per	= ano+""+mes;
	if (!openwindow1 || openwindow1.closed){
		win ="window.open('/cgi-bin/RTM_v30/pl/moras_sectores_rept.pl?lan=es&appid=RTM_v30&clase="+cla+"&i8_periodo="+per+"','GenerarSectoresMoras','left=100,top=20,width=675,height=550,scrollbars=yes,toolbar=no,menubar=no,resizable=yes')";
		openwindow1=eval(win);
	}else{openwindow1.focus()}
	
}
function ShowCalendar(form,datetype,separator){
        var openwindow;
	if (!openwindow || openwindow.closed) {
		win ="window.open('/RTM_v30/libraries/html/clnd.html?pbf="+form+"&datetype="+datetype+"&separator="+separator+"','Calendar','left=200,top=200,width=250,height=250,scrollbars=no,toolbar=no,menu=no')";
		openwindow=eval(win);
	}else{openwindow.focus()}
}