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 = '