var fDesc=new Array(); fDesc[1] = "the prayers, in other words is an accountant assistance, a timer and agenda in order to keep a schedule for the prays. It has multiple functions and audio guides to not loose the track of the prayers."; fDesc[2] = "the combination of two other top-selling well-known puzzle games: Tetris and Sokoban. From the first one, it takes the gravity rules, and from the second one, the fact of pushing boxes."; 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 = '...'; } }