﻿
// pre load images
if(document.images){
    // rSmart
    var ad_rotator_img = new Image();
    ad_rotator_img.src = "images/rSmart_logo_icodeon.png";
    // Fronter
    ad_rotator_img = new Image();
    ad_rotator_img.src = "images/logo_cmyk_fronter.gif";
    // Signify
    ad_rotator_img = new Image();
    ad_rotator_img.src = "images/logo.jpg";
    // Its Learning
    ad_rotator_img = new Image();
    ad_rotator_img.src = "images/IT 100pxHigh.gif";
    // Harvest Road
    ad_rotator_img = new Image();
    ad_rotator_img.src = "images/HRH-col.gif";
    // CADE_logo_home.gif
    ad_rotator_img = new Image();
    ad_rotator_img.src = "images/CADE_logo_home.gif";
    // MDC learning
    ad_rotator_img = new Image();
    ad_rotator_img.src = "images/MDC_icodeon.jpg";
    // Editure
    ad_rotator_img = new Image();
    ad_rotator_img.src = "images/editure.gif";
}

onload = doStartRotator;

var arr_Html = new Array();

arr_Html[0] = "<a target='_blank' href='http://www.rsmart.com' title='Click here'><img src='images/rSmart_logo_icodeon.png' width='138' height='46'/></a>"
+ "<p><br/>\'...a service and support provider for the Sakai Collaboration and Learning Environment...\'</p>";

arr_Html[1] = "<a target='_blank' href='http://fronter.co.uk/uk/' title='Click here'><img src='images/logo_cmyk_fronter.gif' width='140' height='30'/></a>"
+ "<p><br/>\'...a strategic partnership with Icodeon in the Fronter Open Learning Platform...\'</p>";

arr_Html[2] = "<a target='_blank' href='www.signify.co.za' title='Click here'><img src='images/logo.jpg' width='140' height='111'/></a>"
+ "<p><br/>\'...thank you for the high level of support we received...Thanks Icodeon, from the Signify team!\'</p>";

arr_Html[3] = "<a target='_blank' href='http://www.itsolutions.no' title='Click here'><img src='images/IT 100pxHigh.gif' width='140' height='42'/></a>"
+ "<p><br/>\'...Its Learning: springboard to knowledge...\</p>";

arr_Html[4] = "<a target='_blank' href='http://www.harvestroad.com/' title='Click here'><img src='images/HRH-col.gif' width='140' height='31'/></a>"
+ "<p><br/>\'...a provider of digital object management software...\'</p>";

arr_Html[5] = "<a target='_blank' href='http://www.uic.edu/sph/cade/' title='Click here'><img src='images/CADE_logo_home.gif' width='140' height='49'/></a>"
+ "<p><br/>\'...excellent customer service - it's been a pleasure working with Icodeon...\'</p>";

arr_Html[6] = "<a target='_blank' href='http://www.mdconline.co.uk/' title='Click here'><img src='images/MDC_icodeon.jpg' width='140' height='61'/></a>"
+ "<p><br/>\'...first choice for workplace learning and development...\'</p>";

arr_Html[7] = "<a target='_blank' href='http://www.editure.com/' title='Click here'><img src='images/editure.gif' width='140' height='46'/></a>"
+ "<p><br/>\'...a leading provider of education services to the K-12 market worldwide...\'</p>";



var int_Count = 0;

function doStartRotator() {
  doUpdateRotator();
  setInterval("doUpdateRotator()", 5000);
}

function doUpdateRotator() {
  doDisplayRotator("rotatorDiv", arr_Html[int_Count]);
  int_Count ++;
  if (int_Count==arr_Html.length){
    int_Count=0;
  }
}

function doDisplayRotator(id, text)
{
	if (document.getElementById)
	{
		x = document.getElementById(id);
		x.innerHTML = '';
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all[id];
		x.innerHTML = text;
	}
	else if (document.layers)
	{
		x = document.layers[id];
		text = '<p>' + text + '</p>';
		x.document.open();
		x.document.write(text);
		x.document.close();
	}
}

