// JavaScript Document

/***********************************************
* Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Modification to code
/***********************************************
* Code added to enable text below image and a link
* Michele Mitchell
* January 2006
***********************************************/

//Specify image paths and optional link (set link to "" for no link):
var dynimages=new Array()

dynimages[0]=["images/Web/screenshots/oaa.jpg", "http://www.spe-oaa.org", "view website","Offshore Achievement Awards"]
dynimages[1]=["images/Web/screenshots/johnstone.jpg", "http://www.jcifa.co.uk", "view website","Jamieson and Carry Jewellery"]
dynimages[2]=["images/Web/screenshots/jc.jpg", "http://www.jamieson-carry.com", "view website","Johnston Carmichael"]
dynimages[3]=["images/web/screenshots/optima.jpg", "http://www.optimauk.com", "view website","Optima"]
dynimages[4]=["images/Web/screenshots/redspider.jpg", "http://www.redspiders.com", "view website","Red Spider"]
dynimages[5]=["images/Web/screenshots/bydandy.jpg", "http://www.bydandy.co.uk", "view website","Bydandy"]
dynimages[6]=["images/Web/screenshots/decom.jpg", "http://www.decomnorthsea.com", "view website","Decom North Sea"]
dynimages[7]=["images/Web/screenshots/bikebalmoral.jpg", "http://www.bikebalmoral.co.uk", "view website","Bike Balmoral"]
dynimages[8]=["images/Web/screenshots/human.jpg", "http://www.humancognizance.com", "view website","Human Cognizance"]
dynimages[9]=["images/Web/screenshots/converged.jpg", "http://www.converged.co.uk", "view website","Converged"]
dynimages[10]=["images/Web/screenshots/icota.jpg", "http://www.icota-europe.com", "view website","ICoTA Europe"]

//Preload images ("yes" or "no"):
var preloadimg="yes"

//Set optional link target to be added to all images with a link:
var optlinktarget="_blank"

//Set image border width
var imgborderwidth=0

//Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:
var filterstring="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"

///////No need to edit beyond here/////

if (preloadimg=="yes"){
for (x=0; x<dynimages.length; x++){
var myimage=new Image()
myimage.src=dynimages[x][0]
}
}

function returnimgcode(theimg){
var imghtml=""
if (theimg[1]!="")
//imghtml='<a style="font-family:Arial, Helvetica, sans-serif; font-size:12px;"  href="'+theimg[1]+'" target="'+optlinktarget+'">'
///imghtml+='<table align="center"><tr><td style="font-family:Arial, Helvetica, sans-serif; font-size:12px;" align="center" >'
///imghtml+='<img src="'+theimg[0]+'" align="center" border="'+imgborderwidth+'" title="'+theimg[2]+'"></td></tr>'
///imghtml+='<tr><td style="font-family:Arial, Helvetica, sans-serif; font-size:12px;" align="center" > '+theimg[1]+'</td></tr></table>'


imghtml='<a style="font-family:Arial, Helvetica, sans-serif; font-size:12px;"  href="'+theimg[1]+'" target="'+optlinktarget+'">'
imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'" alt="'+theimg[3]+'">'
imghtml+='<table><tr><td><a href="'+theimg[1]+'" target="'+optlinktarget+'"> '+theimg[2]+'</a></td></tr></table>'

if (theimg[1]!="")
imghtml+=''
return imghtml
}

function modifyimage(loadarea, imgindex){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML=returnimgcode(dynimages[imgindex])
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()
return false
}
}


