javascript folding example