You can put the following function in the same / threaded area of ββdivsArray.
function baka(idx) { document.getElementById(divsArray[idx]).style.visibility = 'hidden'; }
Then you can do
baka(0); baka(1); baka(2); baka(3);
or
for (var i = 0; i < 4; i++) baka(i);
It looks pointless, but if you have more of these arrays, you can change your function as follows:
function aho(arr, idx) { document.getElementById(arr[idx]).style.visibility = 'hidden'; }
and skip any array like this:
for (var i = 0; i < divsArray.length; i++) aho(divsArray, i);
And no, there are no macros and no templates.
syockit
source share