/******************************************************************************
* Photo Album 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
******************************************************************************/

//Modified by JCReign to fix image pop-up's
var dimension="5x3" //Specify dimension of gallery (number of images shown), such as 4 images X 2 images

var popupsetting=[1, "width=680px, height=520px, scrollbars, resizable"] //Specify dimensions of popup window

//Specify images:
//galleryarray[x]=["path_to_image", "optional_title_attribute", "optional_text_description", "optional_link"]
var galleryarray=new Array()
galleryarray[0]=["picgallery/featuredvehicles/86chevyastro/astro00001SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro00001Large.JPG"]
galleryarray[1]=["picgallery/featuredvehicles/86chevyastro/astro00003SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro00003Large.JPG"]
galleryarray[2]=["picgallery/featuredvehicles/86chevyastro/astro00004SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro00004Large.JPG"]
galleryarray[3]=["picgallery/featuredvehicles/86chevyastro/astro00005SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro00005Large.JPG"]
galleryarray[4]=["picgallery/featuredvehicles/86chevyastro/astro00017SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro00017Large.JPG"]
galleryarray[5]=["picgallery/featuredvehicles/86chevyastro/astro0030SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro0030Large.JPG"]
galleryarray[6]=["picgallery/featuredvehicles/86chevyastro/astro0031SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro0031Large.JPG"]
galleryarray[7]=["picgallery/featuredvehicles/86chevyastro/astro006SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro006Large.JPG"]
galleryarray[8]=["picgallery/featuredvehicles/86chevyastro/astro013SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro013Large.JPG"]
galleryarray[9]=["picgallery/featuredvehicles/86chevyastro/astro05SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro05Large.JPG"]
galleryarray[10]=["picgallery/featuredvehicles/86chevyastro/astro12SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro12Large.JPG"]
galleryarray[11]=["picgallery/featuredvehicles/86chevyastro/astro3SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro3Large.JPG"]
galleryarray[12]=["picgallery/featuredvehicles/86chevyastro/astro4SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro4Large.JPG"]
galleryarray[13]=["picgallery/featuredvehicles/86chevyastro/astro5SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro5Large.JPG"]
galleryarray[14]=["picgallery/featuredvehicles/86chevyastro/astro7SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro7Large.JPG"]
galleryarray[15]=["picgallery/featuredvehicles/86chevyastro/astro8SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astro8Large.JPG"]
galleryarray[16]=["picgallery/featuredvehicles/86chevyastro/astroDSC00001SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astroDSC00001Large.JPG"]
galleryarray[17]=["picgallery/featuredvehicles/86chevyastro/astroDSC00003SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astroDSC00003Large.JPG"]
galleryarray[18]=["picgallery/featuredvehicles/86chevyastro/astroDSC00004SMALL.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/astroDSC00004Large.JPG"]
galleryarray[19]=["picgallery/featuredvehicles/86chevyastro/daytonaDSC00008.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/daytonaDSC00008.JPG"]
galleryarray[20]=["picgallery/featuredvehicles/86chevyastro/daytonaDSC00011.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/daytonaDSC00011.JPG"]
galleryarray[21]=["picgallery/featuredvehicles/86chevyastro/daytonaDSC00057.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/daytonaDSC00057.JPG"]
galleryarray[22]=["picgallery/featuredvehicles/86chevyastro/DBDrags06002.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/DBDrags06002.jpg"]
galleryarray[23]=["picgallery/featuredvehicles/86chevyastro/DBDrags06003.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/DBDrags06003.jpg"]
galleryarray[24]=["picgallery/featuredvehicles/86chevyastro/DBDrags06004.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/DBDrags06004.jpg"]
galleryarray[25]=["picgallery/featuredvehicles/86chevyastro/DBDrags06058.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/DBDrags06058.jpg"]
galleryarray[26]=["picgallery/featuredvehicles/86chevyastro/DSC00001.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00001.JPG"]
galleryarray[27]=["picgallery/featuredvehicles/86chevyastro/DSC00002.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00002.JPG"]
galleryarray[28]=["picgallery/featuredvehicles/86chevyastro/DSC00003.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00003.JPG"]
galleryarray[29]=["picgallery/featuredvehicles/86chevyastro/DSC00009.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00009.JPG"]
galleryarray[30]=["picgallery/featuredvehicles/86chevyastro/DSC00010.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00010.JPG"]
galleryarray[31]=["picgallery/featuredvehicles/86chevyastro/DSC00012.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00012.JPG"]
galleryarray[32]=["picgallery/featuredvehicles/86chevyastro/DSC00013.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00013.JPG"]
galleryarray[33]=["picgallery/featuredvehicles/86chevyastro/DSC00014.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00014.JPG"]
galleryarray[34]=["picgallery/featuredvehicles/86chevyastro/DSC00015.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00015.JPG"]
galleryarray[35]=["picgallery/featuredvehicles/86chevyastro/DSC00025.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00025.JPG"]
galleryarray[36]=["picgallery/featuredvehicles/86chevyastro/DSC00027.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00027.JPG"]
galleryarray[37]=["picgallery/featuredvehicles/86chevyastro/DSC00033.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00033.JPG"]
galleryarray[38]=["picgallery/featuredvehicles/86chevyastro/DSC00034.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00034.JPG"]
galleryarray[39]=["picgallery/featuredvehicles/86chevyastro/DSC00044.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00044.JPG"]
galleryarray[40]=["picgallery/featuredvehicles/86chevyastro/DSC00057.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00057.JPG"]
galleryarray[41]=["picgallery/featuredvehicles/86chevyastro/DSC00058.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00058.JPG"]
galleryarray[42]=["picgallery/featuredvehicles/86chevyastro/DSC00059.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00059.JPG"]
galleryarray[43]=["picgallery/featuredvehicles/86chevyastro/DSC00060.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00060.JPG"]
galleryarray[44]=["picgallery/featuredvehicles/86chevyastro/DSC00070.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00070.JPG"]
galleryarray[45]=["picgallery/featuredvehicles/86chevyastro/DSC00071.JPG", "", "", "picgallery/featuredvehicles/86chevyastro/big/DSC00071.JPG"]
galleryarray[46]=["picgallery/featuredvehicles/86chevyastro/final05Brackets.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/final05Brackets.jpg"]
galleryarray[47]=["picgallery/featuredvehicles/86chevyastro/final05Death Match Results.bmp", "", "", "picgallery/featuredvehicles/86chevyastro/big/final05Death Match Results.bmp"]
galleryarray[48]=["picgallery/featuredvehicles/86chevyastro/IMG_0170SMALL.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/IMG_0170Large.jpg"]
galleryarray[49]=["picgallery/featuredvehicles/86chevyastro/IMG_0171SMALL.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/IMG_0171Large.jpg"]
galleryarray[50]=["picgallery/featuredvehicles/86chevyastro/teamnutzchevyastro.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/TeamNutzChevyAstro.jpgg"]
galleryarray[51]=["picgallery/featuredvehicles/86chevyastro/world 05IMG_0068.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/world 05IMG_0068.jpg"]
galleryarray[52]=["picgallery/featuredvehicles/86chevyastro/world 05IMG_0069.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/world 05IMG_0069.jpg"]
galleryarray[53]=["picgallery/featuredvehicles/86chevyastro/world 05IMG_0070.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/world 05IMG_0070.jpg"]
galleryarray[54]=["picgallery/featuredvehicles/86chevyastro/world 05IMG_0071.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/world 05IMG_0071.jpg"]
galleryarray[55]=["picgallery/featuredvehicles/86chevyastro/world 05IMG_0098.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/world 05IMG_0098.jpg"]
galleryarray[56]=["picgallery/featuredvehicles/86chevyastro/world 05IMG_0152.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/world 05IMG_0152.jpg"]
galleryarray[57]=["picgallery/featuredvehicles/86chevyastro/world finals 2005.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/world finals 2005.jpg"]
galleryarray[58]=["picgallery/featuredvehicles/86chevyastro/WORLDFINALS05.jpg", "", "", "picgallery/featuredvehicles/86chevyastro/big/WORLDFINALS05.jpg"]



var href_target="_new" //Enter target attribute of links

var totalslots=dimension.split("x")[0]*dimension.split("x")[1]

function buildimage(i){
var tempcontainer=galleryarray[i][3]!=""? '<a href="'+galleryarray[i][3]+'" target="'+href_target+'" onClick="return popuplinkfunc(this)">' : ""
tempcontainer+='<img src="'+galleryarray[i][0]+'" border="1" title="'+galleryarray[i][1]+'">'
tempcontainer=galleryarray[i][3]!=""? tempcontainer+'</a>' : tempcontainer
tempcontainer=galleryarray[i][2]!=""? tempcontainer+'<br \/>'+galleryarray[i][2] : tempcontainer
return tempcontainer
}

function jumptopage(p){
var startpoint=(p-1)*totalslots
var y=1;
for (i=0; i<totalslots; i++){
document.getElementById("slide"+i).innerHTML=(typeof galleryarray[startpoint+i]!="undefined")? buildimage(startpoint+i) : ""
}
while(document.getElementById("navlink"+y)!=null){
document.getElementById("navlink"+y).className=""
y++
}
document.getElementById("navlink"+p).className="current"
}

var curimage=0
for (y=0; y<dimension.split("x")[1]; y++){
for (x=0; x<dimension.split("x")[0]; x++){
if (curimage<galleryarray.length)
document.write('<div id="slide'+curimage+'" class="slideshow">'+buildimage(curimage)+'</div>')
curimage++
}
document.write('<br style="clear: left" />')
}

function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
var popwin=open(imgsrc.href, "popwin", popupsetting[1])
popwin.focus()
return false
}
else
return true
}

