$(document).ready(function(){ onloadAction() $(document).pngFix(); }); var Banner=new Array() Banner[0] = "banneri1"; Banner[1] = "mega_two"; Banner[2] = "mega_three"; var B = Banner.length; var whichBanner=Math.round(Math.random()*(B-1)); var current = Banner[whichBanner]; function setBanner(){ if (current == 'mega_two') {document.getElementById(current).style.visibility = 'visible';} if (current == 'banneri1') {document.getElementById(current).style.visibility = 'visible';} if (current == 'mega_three') {document.getElementById(current).style.visibility = 'visible';} } function show(id) {document.getElementById(current).style.visibility = 'hidden';document.getElementById(id).style.visibility= 'visible';current = id; }