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 NotificacionAgregar(){
	var lan   = document.form.lan.value;
	var appid = document.form.appid.value;
	var clase = document.form.clase.value;	
    var id    = document.form.id.value;
    var openwindow;
    if (!openwindow || openwindow.closed){
		win ="window.open('/cgi-bin/"+appid+"/bin/rcrd.pl?lan="+lan+"&appid="+appid+"&clase="+clase+"_notificaciones&id="+id+"','GestorGet','left=100,top=20,width=675,height=550,scrollbars=no,toolbar=no,menubar=no,resizable=no')";
		alert(win);
		openwindow=eval(win);
    }else{openwindow.focus()}
}
function OpenNotaText(id,clase,tip,per){
	var lan   = document.form.lan.value;
	var appid = document.form.appid.value;	
    winame="OpenContratoText_"+id;
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/"+appid+"/pl/notificacion_rept.pl?lan="+lan+"&appid="+appid+"&clase="+clase+"&id="+id+"&tipo="+tip+"&i8_periodo="+per+"','"+winame+"','left=0,top=0,width=1000,height=700,resizable=yes,scrollbars=yes')";
	openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}
function OpenNotaUpload(id,clase,fid){
	var lan   = document.form.lan.value;
	var appid = document.form.appid.value;	
    winame="OpenContratoUpload_"+id;
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/"+appid+"/bin/upld.pl?lan="+lan+"&appid="+appid+"&clase="+clase+"s_contratos&id="+id+"&doc_id="+fid+"','"+winame+"','left=0,top=0,width=1000,height=700,resizable=yes,scrollbars=no')";
	openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}
function OpenNotaImagen(id,clase,fid){
	var lan   = document.form.lan.value;
	var appid = document.form.appid.value;
    winame="OpenContratoImagen_"+id;
    if (!openwindow[winame] || openwindow[winame].closed){
	win ="window.open('/cgi-bin/"+appid+"/bin/opfld.pl?lan="+lan+"&appid="+appid+"&clase="+clase+"s_contratos&id="+id+"&doc_id="+fid+"','"+winame+"','left=0,top=0,width=1000,height=700,resizable=yes,scrollbars=no')";
	openwindow[winame]=eval(win);
    }
    else{openwindow[winame].focus()}
}