/*
 * imgs1 and imgs2 - array of images to rotate
 * strimage - starting image
 * curimage - current image
 * rotate - should images be rotated
 * delay  - time between rotations
 */
function preload_sol_imgs() {
  plnew1 = new Array(imgs1.length);
  plnew2 = new Array(imgs1.length);
  for (i=0;i<imgs1.length;i++){
    plnew1[i] = new Image();
    plnew1[i].src = imgs1[i];
    plnew2[i] = new Image();
    plnew2[i].src = imgs2[i];
  }
}
function init_sol() {
   strimage = 0;
   imgs1 = new Array(6);
   imgs1[0] = "Images/main/clouds.jpg";
   imgs1[1] = "Images/main/clouds.jpg";
   imgs1[2] = "Images/main/clouds.jpg";
   imgs1[3] = "Images/main/clouds.jpg";
   imgs1[4] = "Images/main/clouds.jpg";
   imgs1[5] = "Images/main/clouds.jpg";
   imgs2 = new Array(6);
   imgs2[0] = "Images/main/clouds_base.jpg";
   imgs2[1] = "Images/main/clouds_base.jpg";
   imgs2[2] = "Images/main/clouds_base.jpg";
   imgs2[3] = "Images/main/clouds_base.jpg";
   imgs2[4] = "Images/main/clouds_base.jpg";
   imgs2[5] = "Images/main/clouds_base.jpg";
   lnks = new Array(6);
   lnks[0] = "solution_sv.html";
   lnks[1] = "solution_ec.html";
   lnks[2] = "solution_st.html";
   lnks[3] = "solution_br.html";
   lnks[4] = "solution_dr.html";
   lnks[5] = "solution_nw.html";
   curimage = -1;   
   delay = 6000;
   rotate = true;
   preload_sol_imgs();
   rotate_sol();
}
function rotate_sol() {
   if (rotate){
      if (curimage<(imgs1.length-1)){
         curimage++;
      } else {
         curimage = 0;
      }
      curimage = Math.max(curimage,strimage);
      update_sol();
   }
   setTimeout("rotate_sol()", delay);
}
/*
 * imgselect - image to select
 */
function select_sol(imgselect) {
   rotate = false;
   curimage = imgselect;
   update_sol();
}
function update_sol() {
   if (curimage==0) {
      document.getElementById("solarea").innerHTML =
      "<a "+"href='"+lnks[curimage]+"' "+"onMouseOver='rotate_off()' onMouseOut='rotate_on()' class='solheader1'>"+
      'Server Virtualisation<br>'+
      '<span class="solheader3">Begin the journey to 100% server virtualisation<br>'+
      'Virtualise business critical applications such as Exchange, SQL and Oracle<br>'+
      'Predict potential performance issues and maximise infrastructure efficiency<br>'+
      'Improve service delivery with built-in high availability and disaster recovery features</span></a>'
      }
   else if (curimage==1) {
      document.getElementById("solarea").innerHTML =
      "<a "+"href='"+lnks[curimage]+"' "+"onMouseOver='rotate_off()' onMouseOut='rotate_on()' class='solheader1'>"+
      'End User Computing<br>'+
      '<span class="solheader3">Policy based application and data access from any device<br>'+
      'Access, synchronise and share files anytime and anywhere<br>'+
	  'Provide optimised LAN and WAN access to remote Windows desktops<br>'+
	  'Deliver mobile and offline services to Smartphones, Tablets, PCs and Macs</span></a>'
      }
   else if (curimage==2) {
      document.getElementById("solarea").innerHTML =
      "<a "+"href='"+lnks[curimage]+"' "+"onMouseOver='rotate_off()' onMouseOut='rotate_on()' class='solheader1'>"+
      'Storage<br>'+
      '<span class="solheader3">Solve storage performance problems with a Flash 1st strategy<br>'+
	  'Make use of storage array replication for reliable disaster recovery<br>'+
      'Utilise scale-out storage to provide unmatched scalability and performance<br>'+
  	  'Take advantage of the latest storage efficiency technologies to manage growth</span></a>'
      }
   else if (curimage==3) {
      document.getElementById("solarea").innerHTML =
      "<a "+"href='"+lnks[curimage]+"' "+"onMouseOver='rotate_off()' onMouseOut='rotate_on()' class='solheader1'>"+
      'Networking<br>'+
      '<span class="solheader3">Deploy next-generation converged 10GbE storage and IP networks<br>'+
      'Make network performance and availability issues a thing of the past<br>'+
	  'Build smart secure networks with policies based on user and device identity<br>'+
  	  'Reduce ongoing costs with simpler network designs and support for open standards</span></a>'
      }
   else if (curimage==4) {
      document.getElementById("solarea").innerHTML =
      "<a "+"href='"+lnks[curimage]+"' "+"onMouseOver='rotate_off()' onMouseOut='rotate_on()' class='solheader1'>"+
      'Backup and Recovery<br>'+
      '<span class="solheader3">Recover data and virtual machines from any point-in-time<br>'+
      'Archive to reduce backup data and its impact on storage and networks<br>'+
      'Utilise deduplication to increase performance and minimise tape usage<br>'+
      'Deploy storage array replicas to enable near-instant backup and recovery</span></a>'
      }
   else if (curimage==5) {
      document.getElementById("solarea").innerHTML =
      "<a "+"href='"+lnks[curimage]+"' "+"onMouseOver='rotate_off()' onMouseOut='rotate_on()' class='solheader1'>"+
      'Disaster Recovery & Workload Mobility<br>'+
      '<span class="solheader3">Make disaster recovery affordable with virtualisation<br>'+
      'Minimise or eliminate downtime associated with site outages<br>'+
	  'Make use of storage array replication for reliable disaster recovery<br>'+
  	  'Automate disaster recovery testing, fail-over and fail-back, and workload mobility</span></a>'
      }
   document.getElementById("soltop").style.backgroundImage = 'url('+imgs1[curimage]+')';
   document.getElementById("solbot").style.backgroundImage = 'url('+imgs2[curimage]+')';
}
function rotate_on() {
   rotate = true;
}
function rotate_off() {
   rotate = false;
}
