var fDesc=new Array(); fDesc[1] = "animals and harvest milk, wool and eggs. Grow all kinds of vegetables, work until the rooster crows and drink some lemonade if you're out of energy. No one said working on a farm was easy!"; fDesc[2] = "gives you the ability to control an entire civilization with a detail level that few games have. Its strong point is, above all, the resource management in all its breadth."; fDesc[3] = "thrilling arcade game."; fDesc[4] = "hailstorms and anything in between."; fDesc[5] = "textiles. like fiber, yarn, filament, fabric"; fDesc[6] = "a precision reproduces all its colors, add to it some music and an unusual design and you will get the game you will never forget!"; 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 = '...'; } }