

/***********************************************
* 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
***********************************************/

//Specify image paths and optional link (set link to "" for no link):
var dynimages=new Array()
// first column of thumbnails
dynimages[0]=["Img_1_1.jpg", ""]
dynimages[1]=["Img_1_2.jpg", ""]
dynimages[2]=["Img_1_3.jpg", ""]
dynimages[3]=["Img_1_4.jpg", ""]
dynimages[4]=["Img_1_5.jpg", ""]
dynimages[5]=["Img_1_6.jpg", ""]
// 2nd column 
dynimages[6]=["Img_2_1.jpg", ""]
dynimages[7]=["Img_2_2.jpg", ""]
dynimages[8]=["Img_2_3.jpg", ""]
dynimages[9]=["Img_2_4.jpg", ""]
dynimages[10]=["Img_2_5.jpg", ""]
dynimages[11]=["Img_2_6.jpg", ""]
// 3rd column 
dynimages[12]=["Img_3_1.jpg", ""]
dynimages[13]=["Img_3_2.jpg", ""]
dynimages[14]=["Img_3_3.jpg", ""]
dynimages[15]=["Img_3_4.jpg", ""]
dynimages[16]=["Img_3_5.jpg", ""]
dynimages[17]=["Img_3_6.jpg", ""]
// 4th column 
dynimages[18]=["Img_4_1.jpg", ""]
dynimages[19]=["Img_4_2.jpg", ""]
dynimages[20]=["Img_4_3.jpg", ""]
dynimages[21]=["Img_4_4.jpg", ""]
dynimages[22]=["Img_4_5.jpg", ""]
dynimages[23]=["Img_4_6.jpg", ""]



//Preload images ("yes" or "no"):
var preloadimg="yes"

//Set optional link target to be added to all images with a link:
var optlinktarget=""

//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/////
function preload(dynarr){
if (preloadimg=="yes"){
for (x=0; x<dynarr.length; x++){
var myimage=new Image()
myimage.src=dynarr[x][0][0]
}
}
}
function returnimgcode(theimg){
var imghtml=""
imghtml+=theimg[2]+'<br \ /> '
if (theimg[1]!="")
imghtml+='<a href="'+theimg[1]+'" target="'+optlinktarget+'">'
imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'">'
if (theimg[1]!="")
imghtml+='<\/a>'
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
}
}


/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

var clickmessage="Images protected by copyright."

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

function disableallimageclicks(msg)
{
clickmessage = msg;
if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
}