// JavaScript Document
function setcalendario(id, boton) {
	Calendar.setup({
		inputField: id,
		ifFormat:   "%Y-%m-%d",
		button:     boton
	});
}
function salir(){
	pagina = "http://www.upch.edu.pe/facien/fc/sistrada";
	location.href=pagina;
}
function enviarf1(pag){
	document.myuser.action = pag;
	document.myuser.submit();
}
function guardarProfile(){
	document.formprofile.action = "guardarprofile.php";
	document.formprofile.submit();
}
function insertStudent(){
	document.formstudent.action = "insertalumno.php";
	document.formstudent.submit();
}
function insertOffice(){
	document.formoffice.action = "insertoficina.php";
	document.formoffice.submit();
}
function insertStatus(){
	document.formstatus.action = "insertestado.php";
	document.formstatus.submit();
}
function insertDeal(){
	document.formdeal.action = "inserttramite.php";
	document.formdeal.submit();
}
function insertStudentDeal(){
	document.formstudentdeal.action = "insertalumnotramite.php";
	document.formstudentdeal.submit();
}
function viewStudent(){
	document.viewformstudent.action = "viewStudentDetail.php";
	document.viewformstudent.submit();
}
function editStudent(){
	document.edital.action = "editStudentDetail.php";
	document.edital.submit();
}
function viewStudentDeal(value){
	if(value ==""){
		value= document.viewformstudentdeal.codigo.value;
	}
	//alert(value);
	document.viewformstudentdeal.criter.value = value;
	document.viewformstudentdeal.action = "viewStudentDealDetail.php";
	document.viewformstudentdeal.submit();
}
function editOfStatus(id_sol_value, off, fingr){
	document.editdeal.id_sol.value = id_sol_value;
	document.editdeal.off.value = off;
	document.editdeal.fingr.value = fingr;
	document.editdeal.action = "editOfficeStatus.php";
	document.editdeal.submit();
}
function saveStatus(){
	document.editstatus.action = "saveOfficeStatus.php";
	document.editstatus.submit();
}
function insertOfStatus(id_sol_value){
	document.editdeal.id_sol.value = id_sol_value;
	document.editdeal.action = "insertStatus.php";
	document.editdeal.submit();
}
function insertStatusDetail(){
	document.editstatus.action = "saveNewStatus.php";
	document.editstatus.submit();
}
function reportTramite(code_tr_value){
	document.menutramite.code_tr.value = code_tr_value;
	document.menutramite.action = "alumno/reportTramite.php";
	document.menutramite.submit();
}
function viewReport(val){
	document.menutramite.id_sol.value = val;
	document.menutramite.action = "reportTramite.php";
	document.menutramite.submit();
}
function updatefecha(val1, val2){
	document.editdeal.fecha.value = val1;
	document.editdeal.id_sol.value = val2;
	document.editdeal.action = "saveDateinput.php";
	document.editdeal.submit();
}
function updatedata(){
	document.editdate.action = "editDate.php";
	document.editdate.submit();
}
function openhelp(){
	var alto = screen.availHeight;
	var ancho= screen.availWidth;
	alert(alto+"::"+ancho);
	var x = ancho - 300;
	var y = alto - 50;
	resizeTo(x, alto);
	moveTo(0, 0);
	var opciones = "fullscreen=" + 0 +//pantallacompleta + 
						 ",toolbar=" + 0 +//herramientas + 
						 ",location=" + 0 + //direcciones + 
						 ",status=" + 1 +//estado + 
						 ",menubar=" + 0 +//barramenu + 
						 ",scrollbars=" + 1 +//barrascroll + 
						 ",resizable=" + 1 +//cambiatamano + 
						 ",width=" + 300 + //ancho + 
						 ",height=" + y + //alto + 
						 ",left=" + x + //izquierda + 
						 ",top=" + 0; //arriba; */
	
	var ventana = window.open("ayuda.php", "ayuda", opciones, 1); 
}
function insertpersonal(){
	document.formpersonal.action = "insertpersonal.php";
	document.formpersonal.submit();
}
function viewpersonal(){
	document.viewformpersonal.action = "viewpersonalDetail.php";
	document.viewformpersonal.submit();
}
function editpersonal(){
	document.edital.action = "editpersonalDetail.php";
	document.edital.submit();
}
function guardarProfileperfacien(){
	document.formprofile.action = "guardarprofileperfacien.php";
	document.formprofile.submit();
}
function historial(val1, val2){
	document.menutramite.id_sol.value = val1;
	document.menutramite.ver.value = val2;
	document.menutramite.action = "reportTramite.php";
	document.menutramite.submit();
}
function viewStudentDeal1(value){
	if(value ==""){
		value= document.viewformstudentdeal.codigo.value;
	}
	//alert(value);
	document.viewformstudentdeal.criter.value = value;
	document.viewformstudentdeal.action = "viewreport.php";
	document.viewformstudentdeal.submit();
}
function viewStudentDeal1x(value){
	document.viewformstudentdealx.criter.value = value;
	document.viewformstudentdealx.action = "viewreport.php";
	document.viewformstudentdealx.submit();
}
function viewStudentapellido(value){
	if(value ==""){
		value= document.viewformapellido.apellido.value;
	}
	//alert(value);
	document.viewformapellido.apellido.value = value;
	document.viewformapellido.action = "xapellido.php";
	document.viewformapellido.submit();
}
function viewStudentDeal2(value){
	if(value ==""){
		value= document.viewformstudentdeal.codigo.value;
	}
	//alert(value);
	document.viewformstudentdeal.criter.value = value;
	document.viewformstudentdeal.action = "viewreporteco.php";
	document.viewformstudentdeal.submit();
}
function viewStudentDeal4(value){
	if(value ==""){
		value= document.viewformstudentdeal4.codigo.value;
	}
	//alert(value);
	document.viewformstudentdeal4.criter.value = value;
	document.viewformstudentdeal4.action = "viewreportecoconcluidos.php";
	document.viewformstudentdeal4.submit();
}
function guardarProfileconeco(){
	
	document.formprofile.action = "guardarprofileconeconomico.php";
	document.formprofile.submit();
}
function viewStudentDeal3(value){
	if(value ==""){
		value= document.viewformstudentdeal2.codigo.value;
	}
	//alert(val1);
	document.viewformstudentdeal2.criter.value = value;
	//document.viewformstudentdeal.id_sol.value = val1;
	document.viewformstudentdeal2.action = "viewreportconcluidos.php";
	document.viewformstudentdeal2.submit();
}
function viewStudentDeal3x(value){
	document.viewformstudentdeal2.criter.value = value;
	document.viewformstudentdeal2.action = "viewreportconcluidos.php";
	document.viewformstudentdeal2.submit();
}
function reporteX(val1, val2){
	//alert(val1, val2);
	//document.reporte.action = "reporte.php";
	document.reporte.submit();	
}
function insertOfStatus2(id_sol_value){
	document.editdeal.id_sol.value = id_sol_value;
	document.editdeal.action = "insertStatus.php";
	document.editdeal.submit();
}
function insertStatusDetail2(){
	document.editstatus.action = "saveNewStatus2.php";
	document.editstatus.submit();
}
function byname(){
	document.menu2.action="byname.php";
	document.menu2.submit();
}
function byfile(){
	document.menu2.action="fileinsert.php";
	document.menu2.submit();
}
function cargarfile(){
	document.ialumnos.action ="fileinsert.php";
	document.ialumnos.submit();
}
function savestudent(){
	document.ialumnos.action ="guardaralumno.php";
	document.ialumnos.submit();
}
function enviar2(pag){
	document.ialumnos.action = pag;
	document.ialumnos.submit();
}
function guardarStudentDeal(){
	document.formalumnotramite.action = "guardaralumnotramite.php";
	document.formalumnotramite.submit();
}
function suchencode(){
	document.formalumnotramite.action = "ingresotramite.php";
	document.formalumnotramite.submit();
}
function insertstudentfac(){
	document.formalumnotramite.action = "insertalumno.php";
	document.formalumnotramite.submit();
}
function insertstudente(){
	document.insertalumno.action = "savealumno.php";
	document.insertalumno.submit();
}
function insertcarrera(){
	document.carrera.action = "insertcarrera.php";
	document.carrera.submit();
}

