function show_div(div_id) { document.getElementById(div_id).style.display = 'block'; } function hide_div(div_id) { document.getElementById(div_id).style.display = 'none'; } function showWithdraw(record) { var y ='withdraw_form'+record[record.selectedIndex].value; var tmp = new String; for (var i=0; i < record.length; i++) { tmp='withdraw_form'+record[i].value; document.getElementById(tmp).style.display = 'none'; } document.getElementById(y).style.display = 'block'; }