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

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

function limpiar_pendientes(){
   
    document.getElementById('s_id1').value='';
    document.getElementById('s_id2').value='';

    document.getElementById('p_id1').value='';
    document.getElementById('p_id2').value='';

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

}

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

function mostrar_pendientes(){

var v1=get('s_id1');
var v2=get('p_id1');

if (v1=="") {
    alert("Digite Sede");
    return 0;
}
if (v2=="") {
    alert("Digite Periodo");
    return 0;
}

       
window.open("planillas_por_digitar.php?periodo="+v2+'&sede='+v1);

}


function retornar_m(){
    
    location.href="../menu.php";

}
   

function retornar_planillas_pendientes(){

    var periodo=get('p_id1');
    var sede=get('s_id1');

    window.open('planillas_pendientes.php?periodo='+periodo+'&sede='+sede,"width=1000,height=500,scrollbars=NO");

}


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];
}
