var mfadeimages = new Array(); //do not change this line

/********************************************************************

ONLY CHANGE WHAT'S BELOW THIS LINE

**********************************************************************/
// Each link is constructed as follows:
// mfadeimage[order in which the image should appear (starting from zero)]=["location of image in hrd ftp space", "where it should link to"];
//
// or mfadeimages[1]=["2", "3"];
//
// where:
// 1 = order to show images
// 2 = location of image on server
// 3 = where the image links to (the web address)
mfadeimages[0]=["http://82.32.11.120:81/springboard/images/rotating_imgs/waste_recycling.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[1]=["http://82.32.11.120:81/springboard/images/rotating_imgs/springboard_graphics.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[2]=["http://82.32.11.120:81/springboard/images/rotating_imgs/electric_motor.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[3]=["http://82.32.11.120:81/springboard/images/rotating_imgs/joseph_stair.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[4]=["http://82.32.11.120:81/springboard/images/rotating_imgs/wheelchair_design.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[5]=["http://82.32.11.120:81/springboard/images/rotating_imgs/cricket_exhibition.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[6]=["http://82.32.11.120:81/springboard/images/rotating_imgs/joseph_shop_stair.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[7]=["http://82.32.11.120:81/springboard/images/rotating_imgs/jephson_garden.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[8]=["http://82.32.11.120:81/springboard/images/rotating_imgs/rotating_columns.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[9]=["http://82.32.11.120:81/springboard/images/rotating_imgs/nature_discovery.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[10]=["http://82.32.11.120:81/springboard/images/rotating_imgs/space_signpost.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[11]=["http://82.32.11.120:81/springboard/images/rotating_imgs/interative_fountain.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[12]=["http://82.32.11.120:81/springboard/images/rotating_imgs/countryside_agency.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[13]=["http://82.32.11.120:81/springboard/images/rotating_imgs/bristol_dock.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[14]=["http://82.32.11.120:81/springboard/images/rotating_imgs/dock_shuttle.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[15]=["http://82.32.11.120:81/springboard/images/rotating_imgs/walkabout_pushchair.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[16]=["http://82.32.11.120:81/springboard/images/rotating_imgs/greenhouse.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[17]=["http://82.32.11.120:81/springboard/images/rotating_imgs/lake.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[18]=["http://82.32.11.120:81/springboard/images/rotating_imgs/wellspring.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[19]=["http://82.32.11.120:81/springboard/images/rotating_imgs/staircase_designers.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[20]=["http://82.32.11.120:81/springboard/images/rotating_imgs/cricket_club.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[21]=["http://82.32.11.120:81/springboard/images/rotating_imgs/suspended_staircase.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[22]=["http://82.32.11.120:81/springboard/images/rotating_imgs/popvase.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[23]=["http://82.32.11.120:81/springboard/images/rotating_imgs/space.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[24]=["http://82.32.11.120:81/springboard/images/rotating_imgs/forestry_com.jpg", "http://82.32.11.120:81/springboard/"];
mfadeimages[24]=["http://82.32.11.120:81/springboard/images/rotating_imgs/force_meter.jpg", "http://82.32.11.120:81/springboard/"];

/********************************************************************

DO NOT CHANGE ANYTHING BELOW THIS LINE

**********************************************************************/

/* =========================================================================

JavaScript Source File -- Created with SAPIEN Technologies PrimalScript 3.1

NAME: 

AUTHOR: Colin Hooper , Colin Hooper
DATE  : 20/09/2006

COMMENT: 
============================================================================ */

/***********************************************
* Fade-in image slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var mslideshow_width = '153px'; //SET IMAGE WIDTH
var mslideshow_height = '153px'; //SET IMAGE HEIGHT
var mpause = 1000; //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
var mcurpos = 10;
var mdegree = 10;
var mcurcanvas = "mcanvas0";
var mcurimageindex = 0;
var mnextimageindex = 1;
var mpreloadedimages = new Array();
var filename = "";

/**
 * Check what browser we're using
 */
var mie4 = document.all;
var mdom = document.getElementById;

/**
 * Load our images into another array - not sure why?
 */
for (q = 0; q < mfadeimages.length; q++) {
	mpreloadedimages[q] = new Image();
	mpreloadedimages[q].src = mfadeimages[q][0];
}

/**
 * Write out the initial div
 */
if (mie4||mdom) {
	document.write('<div style="position:relative;width:'+mslideshow_width+';height:'+mslideshow_height+';overflow:hidden;" id="bannerWrapper"><div  id="mcanvas0" style="position:absolute;width:'+mslideshow_width+';height:'+mslideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10"></div><div id="mcanvas1" style="position:absolute;width:'+mslideshow_width+';height:'+mslideshow_height+';top:0;left:0;filter:alpha(opacity=10);-moz-opacity:10;visibility: hidden"></div></div>')
} else {
	document.write('<img name="mdefaultslide" src="'+mfadeimages[0][0]+'" style="width:'+mslideshow_width+'px; height:'+mslideshow_height+'px;" alt="" />')
}

/**
 * Fades the images out (and in?)
 */
function mfadepic() {
	
	if (mcurpos<100) {
		
		mcurpos += 10;
		
		if (mtempobj.filters) {
			
			mtempobj.filters.alpha.opacity = mcurpos;
			
		} else if(mtempobj.style.MozOpacity) {
			
			mtempobj.style.MozOpacity = mcurpos/101;
		}
			
	} else {
			
		clearInterval(mdropslide);
		mnextcanvas = (mcurcanvas=="mcanvas0") ? "mcanvas0" : "mcanvas1";
		mtempobj = mie4 ? eval("document.all." + mnextcanvas) : document.getElementById(mnextcanvas);
		mtempobj.innerHTML = minsertimage(mnextimageindex);
		mnextimageindex = (mnextimageindex<mfadeimages.length-1) ? mnextimageindex+1 : 0;
		var mtempobj2 = mie4 ? eval("document.all." + mnextcanvas) : document.getElementById(mnextcanvas);
		mtempobj2.style.visibility = "hidden";
						
		setTimeout("mrotateimage()",mpause);
	}
}

function minsertimage(i) {

	var fileext = checkfileext(mfadeimages[i][0]);

	if(fileext == "swf") {
		return minsertswf(i);
	}

	var mtempcontainer = mfadeimages[i][1]!=""? '<a href="'+mfadeimages[i][1]+'" target="'+mfadeimages[i][2]+'">' : "";
	mtempcontainer += '<img src="'+mfadeimages[i][0]+'" border="0">';
	mtempcontainer = mfadeimages[i][1]!=""? mtempcontainer+'</a>' : mtempcontainer;
	return mtempcontainer;
}

/**
 * loads a wsf object into the page
 *
 */
function minsertswf(i) {

	var mtempcontainer = mfadeimages[i][1] != "" ? '<a href="'+mfadeimages[i][1]+'" target="_blank">' : "";	
	
	mtempcontainer += '<object type="application/x-shockwave-flash" data="' + mfadeimages[i][0] + '" width="'+mslideshow_width+'" height="'+mslideshow_height+'">'+'<param name="movie" value="'+mfadeimages[i][0]+'" /></object>';
	
	mtempcontainer = mfadeimages[i][1] != "" ? mtempcontainer + '</a>' : mtempcontainer;	


	return mtempcontainer;
}

/**
 * checks file extensions
 */
function checkfileext(filename)
{
	return (/[.]/.exec(filename)) ? /[^.]+$/.exec(filename) : undefined;
}

function mrotateimage(){

	
	if (mie4||mdom) {
		
		mresetit(mcurcanvas);
		var mcrossobj = mtempobj = mie4 ? eval("document.all."+mcurcanvas) : document.getElementById(mcurcanvas);
		mcrossobj.style.zIndex++;
		mtempobj.style.visibility = "visible";
		var mtemp = 'setInterval("mfadepic()",50)';
		mdropslide = eval(mtemp);
		mcurcanvas = (mcurcanvas == "mcanvas0") ? "mcanvas1" : "mcanvas0";
		
	} else {
		
		document.images.mdefaultslide.src = mfadeimages[mcurimageindex][0];
		mcurimageindex = (mcurimageindex<mfadeimages.length-1) ? mcurimageindex+1 : 0;
		
	}
}

function mresetit(mwhat){
	
	mcurpos = 10;
	
	var mcrossobj = mie4 ? eval("document.all."+mwhat) : document.getElementById(mwhat);
	
	if (mcrossobj.filters) {
		mcrossobj.filters.alpha.opacity = mcurpos;
	} else if (mcrossobj.style.MozOpacity) {
		mcrossobj.style.MozOpacity = mcurpos/101;
	}
}

function mstartit(){
	var mcrossobj = mie4 ? eval("document.all."+mcurcanvas) : document.getElementById(mcurcanvas);
	mcrossobj.innerHTML = minsertimage(mcurimageindex);
	mrotateimage();
}

if (mie4||mdom) {
	window.onload = mstartit;
} else {
	setInterval("mrotateimage()",mpause);
}


