function start(){ update_reflections() ; Get('button_update').addEventListener('click', update_reflections) ; } function update_reflections(){ var base_height = 600 ; var select = Get('select_units') ; var units = select.options[select.selectedIndex].value ; var np = parseFloat(Get('form_np').value) ; var GETs = '?' ; GETs = GETs + 'M=' + Get('form_M' ).value ; GETs = GETs + '&m1=' + Get('form_m1' ).value ; GETs = GETs + '&m2=' + Get('form_m2' ).value ; GETs = GETs + '&m3=' + Get('form_m3' ).value ; GETs = GETs + '&m4=' + Get('form_m4' ).value ; GETs = GETs + '&pmin=' + Get('form_pmin').value ; GETs = GETs + '&pmax=' + Get('form_pmax').value ; GETs = GETs + '&np=' + Get('form_np' ).value ; GETs = GETs + '&unit=' + units ; var height = 10 + base_height + 20*(np+2) ; Get('reflections_wrapper').style.height = height + 'px' ; var height = base_height + 20*(np+2) ; Get('reflections_wrapper').innerHTML = '<\/object>' ; Get('link').href = 'index.php' + GETs ; } function Get(id){ return document.getElementById(id) ; }