// Imagerotate
var imgindices = new Array(4);
imgindices[1]=0;
imgindices[2]=1;
imgindices[3]=2;
imgindices[4]=3;

if (imageindex===undefined) var imageindex = 1;
if (imageindex==null || !parseInt(imageindex)>0) imageindex = 1; 
if (imageindex <= 0) imageindex = 1;
if (imageindex > 4) imageindex = 4;

$(function() {
  $('#imagerotlayer').cycle({ 
    timeout:  5000, 
    speed:  2000,
    startingSlide: imgindices[imageindex]
  }); 
});
