// 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/sonsub_sq.jpg", "http://www.sonsub.com","Click to launch Sonsub Website","Sonsub"]
dynimages[1]=["images/web/screenshots/ardene.jpg", "http://www.ardenehouse.co.uk","Click to launch Ardene House Website","http://www.ardenehouse.co.uk"]
dynimages[2]=["images/web/screenshots/ahb_sq.jpg", "http://www.aberdeen-harbour.co.uk","Click to launch Aberdeen Harbour Board Website","http://www.aberdeen-harbour.co.uk"]
dynimages[3]=["images/web/screenshots/instalec_sq.jpg", "http://www.instalec.co.uk","Click to launch Instalec Networking Website","Instalec Networking"]
dynimages[4]=["images/web/screenshots/jamieson_sq.jpg", "http://www.jamieson-carry.com", "Click to launch Jamieson and Carry Website","Jamieson and Carry Jewellery"]
dynimages[5]=["images/web/screenshots/stewartsproperties_sq.gif", "http://www.stewartsproperties.com","Click to launch Stewarts Properties Website","Stewarts Properties"]
dynimages[6]=["images/web/screenshots/northernstar_sq.gif", "http://www.northernstarawards.co.uk/","Click to launch Northern Star Business Awards Website","Northern Star Business Awards"]
dynimages[7]=["images/web/screenshots/arrcraib_sq.jpg", "http://www.arr-craib.co.uk","Click to launch Arr Craib Website","Arr Craib"]
dynimages[8]=["images/web/screenshots/standrews_sq.jpg", "http://www.thestandrewsprize.com", "Click to launch The St Andrews Prize Website","The St Andrews Prize for the Environment"]
dynimages[9]=["images/web/screenshots/capture_sq.jpg", "http://www.captureimaging.co.uk/","Click to launch Capture Imaging Solutions Website","Capture Imaging Solutions"]
dynimages[10]=["images/web/screenshots/transition_sq.jpg", "http://www.transition-extreme.com","Click to launch Transition Skate Website","Transition Skate"]
dynimages[11]=["images/web/screenshots/businesspark_sq.jpg","http://www.aberdeenbusinesspark.com", "Click to launch Aberdeen Business Park Website", "Aberdeen Business Park Homepage"]
dynimages[12]=["images/web/screenshots/wireline_sq.jpg", "http://www.wireline-engineering.com", "Click to launch Wireline Engineering Website","Wireline Engineering"]
dynimages[13]=["images/web/screenshots/classicmg_sq.gif", "http://www.mearns-gill.com/classic", "Click to launch Mearns and Gill Classic Website","Mearns and Gill Classic Website"]


//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
}
}

