
//-----------------------------------------------------
function get(id){
    return document.getElementById(id).value;
}
//----------------------

function retornar(){
    
    var dir=parametro('dir'); 
    var id=parametro('id');
            
    window.location="../menu_coordinador.php?id="+id+"&dir="+dir;
}
   

function parametro( name ){
	var regexS = "[\\?&]"+name+"=([^&#]*)";
	var regex = new RegExp ( regexS );
	var tmpURL = window.location.href;
	var results = regex.exec( tmpURL );
	if( results == null )
		return "";
	else
		return results[1];
}


function busque_info(){
    var per=get('p_id1');
    var grad=get('g_id1');
    var asig=get('a_id1');    
    
    var dir=parametro('dir'); 
    var id=parametro('id');
    
    if(per==''){
        alert('Ingrese Periodo');
        exit();
    }
    
    if(grad==''){
        alert('Ingrese Grado');
        exit();
    }

    if(asig==''){
        alert('Ingrese Asignatura');
        exit();
    }
    
    
 window.location="app/modelo/mostrar_info.php?periodo="+per+"&grado="+grad+"&asigntura="+asig+"&id="+id+"&dir="+dir;

}



function retroceder(){
    window.location="menu_alumno.php";
}


function retrocesopp(){
    var dir=parametro('dir'); 
    var id=parametro('id');
    window.location="../../logros_coordinador.php?id="+id+"&dir="+dir;
}


//----------------------------

function limpiar_criterios(){
    
    document.getElementById('p_id1').value='';
    document.getElementById('p_id2').value='';
    document.getElementById('g_id1').value='';
    document.getElementById('g_id2').value='';
    document.getElementById('a_id1').value='';
    document.getElementById('a_id2').value='';

     document.getElementById('p_id1').focus();
}