var curr_ad = 0;
var preLoad = new Array();
var pass = new Array();
var links = new Array();
      
pass[0] = '/img/index/iphone.gif';
pass[1] = '/img/index/nora.bmp';

links[0] = 'index.php?action=register/user';
links[1] = 'http://www.norauk.com/finalists/';
for(var i=0; i<pass.length; i++)
{
    preLoad[i] = new Image;
    preLoad[i].src = pass[i];
}
      
function RotateBlock()
{
    document.getElementById('ad2').style.backgroundImage = "url("+preLoad[curr_ad].src+")";
    document.getElementById('ahref').href = links[curr_ad];
    if(curr_ad > 0){$('#prize_terms').hide();}
    else {$('#prize_terms').show();}
      		  
    if(curr_ad == 0) curr_ad = 1;
    else curr_ad = 0;
      	  
    setTimeout("RotateBlock()",5000);
}
window.onload=RotateBlock;
