var x = 3
var y = 1 
function startClock(xx) { 
  x = x-y 
  old_xx=xx;
  if(x==0) { 
    xx++;
    if(xx>2) 
      xx=1;
  }
  //document.getElementById('clock').value = x 
  setTimeout("startClock("+xx+")", 2000) 
  if(x==0) { 
    for(i=1; i<=4; i++) {
      old_src=document.getElementById('pic'+i).src;
      new_src= old_src.replace("_"+old_xx+".jpg","_"+xx+".jpg");
      //alert(new_src);
      document.getElementById('pic'+i).src=new_src;
    }
    x=3; 
  } 
}
function startClock2(xx) { 
  x = x-y 
  old_xx=xx;
  if(x==0) { 
    xx++;
    if(xx>2) 
      xx=1;
  }
 
  setTimeout("startClock2("+xx+")", 2500) 
  if(x==0) { 
    for(i=1; i<=4; i++) {
      document.getElementById('pic'+i+'_'+old_xx).style.display='none';
      document.getElementById('pic'+i+'_'+xx).style.display='';
    }
    x=3; 
  } 
}

