This is a little more complicated. It would probably be easier to use a separate array for the titles with every other entry blank, less math would need to be changed in the script:
Code:
Car_Image_Sources=new Array(
"thumb/photo1.jpg","large/photo1.jpg",
"thumb/photo2.jpg","large/photo2.jpg",
"thumb/photo3.jpg","large/photo3.jpg",
"thumb/photo4.jpg","large/photo4.jpg" // NOTE No comma after last line
);
Car_Image_Titles=new Array(
"Title One","",
"Title Two","",
"Title Three","",
"Title Four","" // NOTE No comma after last line
);
The script would need to be edited in a few places (add the red parts):
Code:
function Carousel(){
if(document.getElementById){
for(i=0;i<Car_Image_Sources.length;i+=2){
C_Pre_Img[i]=new Image();C_Pre_Img[i].src=Car_Image_Sources[i]}
C_MaxW=Car_Image_Width/Math.sin(Math.PI/Car_NoOfSides)+C_HalfNo+1;
Car_Div=document.getElementById("Carousel");
for(i=0;i<C_HalfNo;i++){
CW_I[i]=document.createElement("img");Car_Div.appendChild(CW_I[i]);
CW_I[i].style.position="absolute";
CW_I[i].style.top=0+"px";
CW_I[i].style.height=Car_Image_Height+"px";
if(Car_Border){
CW_I[i].style.borderStyle="solid";
CW_I[i].style.borderWidth=1+"px";
CW_I[i].style.borderColor=Car_Border_Color}
CW_I[i].src=Car_Image_Sources[2*i];
CW_I[i].lnk=Car_Image_Sources[2*i+1];
CW_I[i].ttl=Car_Image_Titles[2*i];
CW_I[i].onclick=C_LdLnk;
CW_I[i].onmouseover=C_Stp;
CW_I[i].onmouseout=C_Rstrt}
CarImages()}}
Code:
if(Car_Direction){
CW_I[C_HalfNo]=CW_I[0];
for(i=0;i<C_HalfNo;i++)CW_I[i]=CW_I[i+1];
CW_I[C_HalfNo-1].src=Car_Image_Sources[C_CrImg];
CW_I[C_HalfNo-1].ttl=Car_Image_Titles[C_CrImg];
CW_I[C_HalfNo-1].lnk=Car_Image_Sources[C_CrImg+1]}
else{ for(i=C_HalfNo;i>0;i--)CW_I[i]=CW_I[i-1];
CW_I[0]=CW_I[C_HalfNo];
CW_I[0].src=Car_Image_Sources[C_CrImg];
CW_I[0].ttl=Car_Image_Titles[C_CrImg];
CW_I[0].lnk=Car_Image_Sources[C_CrImg+1]}
Code:
var lightlink=document.createElement('a');
lightlink.setAttribute('rel', 'lightbox', 0);
function C_LdLnk(){if(this.lnk){lightlink.title=this.ttl;lightlink.href=this.lnk;myLightbox.start(lightlink);}};
Bookmarks