<!--
// Image Control for Icomm Technologies
// image+link randomisation, 2004 rich pearce. www.latenightcoldcoffee.co.uk

//adImages
var adSelection = 0;
adImages = new Array;
adImages[1] = new Image();
adImages[1].src = "/images/it-offers/central-weighing.gif";
adImages[2] = new Image();
adImages[2].src = "/images/it-offers/rowley-hughes-thompson.gif";
adImages[3] = new Image();
adImages[3].src = "/images/it-offers/got-the-boot.gif";
adImages[4] = new Image();
adImages[4].src = "/images/it-offers/95pc-tsp-renew.gif";
adImages[5] = new Image();
adImages[5].src = "/images/it-offers/anne-sendall-group.gif";
adImages[6] = new Image();
adImages[6].src = "/images/it-offers/lee-pembertons.gif";
adImages[7] = new Image();
adImages[7].src = "/images/it-offers/creative-web-design.gif";
adImages[8] = new Image();
adImages[8].src = "/images/it-offers/mail-defender.gif";
adImages[9] = new Image();
adImages[9].src = "/images/it-offers/gold-certified-partner.gif";

var adLink = new Array;
adLink[1] = "/cases/case-cw.htm";
adLink[2] = "/cases/case-rht.htm";
adLink[3] = "/press/got-the-boot-accolade.htm";
adLink[4] = "/press/index.htm";
adLink[5] = "/cases/case-annesendall.htm";
adLink[6] = "/cases/case-leepembertons.htm";
adLink[7] = "/web-design/website-portfolio.htm";
adLink[8] = "/promotions/index.htm#maildefender";
adLink[9] = "/press/gold-certified-partner.htm";

//photoImages
var photoSelection = 0;
photoImages = new Array;
photoImages[1] = new Image();
photoImages[1].src = "/images/woman-mobile-water.jpg";
photoImages[2] = new Image();
photoImages[2].src = "/images/man-notebook.jpg";
photoImages[3] = new Image();
photoImages[3].src = "/images/woman-mobile-smiling.jpg";
photoImages[4] = new Image();
photoImages[4].src = "/images/woman-pc.jpg";
photoImages[5] = new Image();
photoImages[5].src = "/images/man-on-bench.jpg";



function randomNum(low,high) {
//returns a random number betwen low and high, inclusive.
  return low+Math.floor(Math.random()*(high-low+1));
}

function getRandomImages(){
//adImages - banner rotation for case studies and other features
  var adNumItems = adImages.length-1;
	adSelection = randomNum(1,adNumItems);
	document.adImage.src = adImages[adSelection].src;
	
//photoImages - decorative image rotation
  var photoNumItems = photoImages.length-1;
	photoSelection = randomNum(1,photoNumItems);
	document.photoImage.src = photoImages[photoSelection].src;
}

function goToSelected(){
  if (adLink[adSelection] != null){
  	eval("window.open(url = adLink[" + adSelection + "],'_self');");
  }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//-->