var fDesc=new Array(); fDesc[1] = "is the creator of the original script of the video game.The argument of Jericho takes you to a city in the Middle East, Al-Khali, erected on the ruins of other ancient cities."; fDesc[2] = "Lorentzian series is recommended for real data especially for multiple peaked data.This is a Fortran Calculus demo application."; function tCollapseAll(maxID) { document.getElementById("alls_action").innerHTML = "Expand descriptions"; var id=1; for (id=1; id <= maxID; id++) { if (document.getElementById("desc_" + id)) tShowHide(id, 2); } } function tExpandAll(maxID) { document.getElementById("alls_action").innerHTML = "Collapse descriptions"; var id=1; for (id=1; id <= maxID; id++) { if (document.getElementById("more_" + id)) tShowHide(id, 1); } } function tShowHide(id, show) { var s = document.getElementById("more_" + id); if ((s.innerHTML!=fDesc[id] || show==1) && show!=2) { s.innerHTML = fDesc[id]; } else { s.innerHTML = '...'; } }