function grabar(grado,curso,area,asignatura){

var id_peso=get(grado+curso+area+asignatura);

var parametros = {"accion":'grabar_peso',
                          "grado":grado,
                          "curso":curso,
                          "area":area,
                          "asignatura":asignatura,
                          "peso":id_peso
                           };
        $.ajax({
                data:  parametros,
                url:"app/model/insertar_labor_academica.php",
                type:  'post',
                success:function (response){
                        if (response=='1'){
                            alert("EL PESO SUPERA EL 100% DEL AREA");
                            document.getElementById(grado+curso+area+asignatura).value="";
                        }
                        else
                           alert(response);
                }
        });

}

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



//-----------------------------------
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 menu_ingresar(){
  document.location.href="../ingresar.php?action=";
}

