// 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/motion/nstar_animation.jpg","Northern Star Business Awards - Animation & Motion Graphic Idents", ""]
dynimages[1]=["images/motion/apsc_woman.jpg","ASPC - 3D Animated Television Commercial", "ASPC - 3D Animated Television Commercial"]
dynimages[2]=["images/motion/kvaerner_motion.jpg","Aker Kvaerner - Animation for Digital Signage", "Aker Kvaerner - Animation for Digital Signage"]
dynimages[3]=["images/motion/ww_dolly.jpg", "William Wilson - 3D Animated Television Commercial", "William Wilson - 3D Animated Television Commercial"]
dynimages[4]=["images/motion/total.jpg", "TOTAL E&P UK PLC - Animation for Multimedia Applications", "TOTAL E&P UK PLC - Animation for Multimedia Applications"]
dynimages[5]=["images/motion/robertsons.jpg", "Robertson Stone Centre Television Commercial", "Robertson Stone Centre Television Commercial"]
dynimages[6]=["images/motion/santa.jpg", "Bon Accord Christmas Television Commercial", "Bon Accord Christmas Television Commercial"]
dynimages[7]=["images/motion/stewarts.jpg", "Stewarts Properties - Motiongraphics Television Commercial", "Stewarts Properties - Motiongraphics Television Commercial"]
dynimages[8]=["images/motion/house.jpg", "ASPC - Motiongraphics Television Commercial", "ASPC - Motiongraphics Television Commercial"]



//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+='<div name="'displaytext'" style="'position:absolute;left:200;top:0;white-space: nowrap;'">'+theimg[2]+'</div>'
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
}
}

