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];
month1 		= months[month];
dateString	= (String(weekday))+" "+(String(monthday))+" DE "+(String(month1))+", "+(String(year));
var xmlHttp;
function enviar(){
	var facturador  = document.form.c3_tipo_facturador_id.value;
	var generador   = document.form.c3_tipo_generador_id.value;
	var na		= document.form.archivo.value.replace(/^.*(\\|\/|\:)/, '');
	    na		= na.replace(/ /g,'_');
	    na		= na.replace(/.txt/g,'');
	var dt_cobal	= na.split('_');
	document.getElementById("boton").disabled = true;
	document.form.nombre_archivo.value = na;
	document.form.custom_values.value = generador+","+facturador+","+dt_cobal[dt_cobal.length-1];
	if(facturador!="" && generador!="" && na!=""){
		document.form.submit();
	}else{alert("Campos Vacios")}
}
