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))+" , "+(String(year));
var openwindow	= new Array(10);
var winame;
function GenerarBoletas(){
    winame="Generar";
    var fields="";
    var values="";
    var c11_sector_id= document.form.c11_sector_id.value;
    var ubi_id	     = document.form.ubi_id.value;
    var ubi_tipo	 = document.form.ubi_tipo.value;
    if (!openwindow[winame] || openwindow[winame].closed){
        win ="window.open('../pl/inmuebles_avisos_cobros_rept.pl?lan=es&appid=NuevoCuscatlan&clase=inmuebles&c11_sector_id="+c11_sector_id+"&ubi_id="+ubi_id+"&ubi_tipo="+ubi_tipo+"','"+winame+"','left=0,top=0,width=100,height=100,resizable=yes,scrollbars=yes')";
        openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}
function OpenFicha(id){
    winame="OpenFichas";
    var fields="";
    var values="";
    if (!openwindow[winame] || openwindow[winame].closed){
        win ="window.open('../pl/inmueble_ficha_cuenta_rept.pl?lan=es&appid=NuevoCuscatlan&clase=inmuebles&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){
    winame="contribuyentes";
    var fields="";
    var values="";
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('../bin/REPT.pl?lan=es&appid=NuevoCuscatlan&clase=inmuebles&id="+id+"&fields="+fields+"&values="+values+"','"+winame+"','left=10,top=1,width=900,height=700,resizable=yes,scrollbars=yes')";
	openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}