function showNews(data,antal,offset) { str = ''; str += '
'; for (i=offset; i < data.length && i < (offset+antal); i++) { current = data[i].split('|'); str += 'OMXC20'; } str += '
'; /*str += ''; str += ''; str += ''; str += ''; str += '
OMXC20
';*/ return str; } function skift(antal,offset) { str = showNews(elements,antal,offset); document.getElementById('contentdiv').innerHTML=str; }