function fill_colegios( comuna ) { document.ficha_postulacion.accion.value = 'colegios'; document.ficha_postulacion.referer.value=document.location.href; document.ficha_postulacion.submit(); } function $P( id ){ return document.getElementById( id ); } var templatelib = { select: function( o1, id ) { o2 = $P(id); var name = o2.getAttribute( 'REL' ); if( o1.value == '+' ) { o2.style.display = ''; o2.name = name; o1.name = 'tmp_'+id; setTimeout( function() { o2.focus(); }, 50 ); // delay pq sino no hace el focus :( } else { o2.style.display = 'none'; o2.name = 'tmp_'+id; o1.name = name; } }, } function newID() { var id; do { id = "obj_"+Math.round( 10000000*Math.random() ); } while( $P( id ) != null ); return id; } function clone( id ) { tb = $P( 'tb_' + id ).cloneNode( true ); tb.id = newID(); tr = document.createElement( 'TR' ); tr.innerHTML = 'Quitar'; tb.appendChild( tr ); $P( id ).insertBefore( tb, $P( 'tf_add_' + id ) ); tb.style.display = ''; } function checkSelect( s ) { [ 'info[cursos][elecciones][0]', 'info[cursos][alternativas][0]', 'info[cursos][alternativas][1]', 'info[cursos][elecciones][1]' ].forEach( function( id, k ) { if( s.id == id || $P( id ).value == 0 || s.value == 0 || s.value != $P( id ).value ) return; alert( 'No puedes elegir el mismo curso más de una vez' ); s.selectedIndex = ''; } ); } function checksubmit( form ) { m = ''; if( m ) { alert( m ); return false; } document.ficha_postulacion.referer.value=document.location.href; return true; } document.writeln( '
No existen postulaciones activas
' );