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 OpenSector(id,inspeccion){
	for (i=1; i<document.getElementById('grid').rows.length-1; i++){
		var sec = document.getElementById('grid').rows[i].cells[1].innerHTML;
		if(id==sec){
			win ="window.open('../pl/permisos_construccion_anuales_rept.pl?lan=es&appid=LaUnion&i8_inspeccion_id="+id+"&v128_inspeccion="+inspeccion+"','InspeccionMensualidades','left=100,top=20,width=675,height=550,scrollbars=yes,toolbar=no,menubar=yes,resizable=yes')";
		}
	}
	if (!openwindow || openwindow.closed){
		openwindow=eval(win);
	}else{openwindow.focus();}
}