// JavaScript Document
if (document.all && !document.getElementById) {
   document.getElementById = function(id) {
      return document.all[id];
   }
}

var ImageGroup=new Array();
//Add image titles to this array<
ImageGroup[1] = "../images/p_services/tickets/sample01.jpg";
ImageGroup[2] = "../images/p_services/tickets/sample02.jpg";
ImageGroup[3] = "../images/p_services/tickets/sample03.jpg";
ImageGroup[4] = "../images/p_services/tickets/sample04.jpg";
ImageGroup[5] = "../images/p_services/tickets/sample05.jpg";
ImageGroup[6] = "../images/p_services/tickets/sample06.jpg";
ImageGroup[7] = "../images/p_services/tickets/sample07.jpg";
ImageGroup[8] = "../images/p_services/tickets/sample08.jpg";
ImageGroup[9] = "../images/p_services/tickets/sample09.jpg";
ImageGroup[10] = "../images/p_services/tickets/sample10.jpg";
ImageGroup[11] = "../images/p_services/tickets/sample11.jpg";
ImageGroup[12] = "../images/p_services/tickets/sample12.jpg";
ImageGroup[13] = "../images/p_services/tickets/sample13.jpg";

var CaptionGroup=new Array();
//Define Captions
CaptionGroup[1] = "&nbsp;&nbsp;Actual samples of Draw Tickets&nbsp;&nbsp;";
CaptionGroup[2] = "&nbsp;&nbsp;Draw Sample 1 of 5&nbsp;&nbsp;";
CaptionGroup[3] = "&nbsp;&nbsp;Draw Sample 2 of 5&nbsp;&nbsp;";
CaptionGroup[4] = "&nbsp;&nbsp;Draw Sample 3 of 5&nbsp;&nbsp;";
CaptionGroup[5] = "&nbsp;&nbsp;Draw Sample 4 of 5&nbsp;&nbsp;";
CaptionGroup[6] = "&nbsp;&nbsp;Draw Sample 5 of 5&nbsp;&nbsp;";
CaptionGroup[7] = "&nbsp;&nbsp;Actual samples of Perforated Tickets&nbsp;&nbsp;";
CaptionGroup[8] = "&nbsp;&nbsp;Perforated Sample 1 of 4&nbsp;&nbsp;";
CaptionGroup[9] = "&nbsp;&nbsp;Perforated Sample 2 of 4&nbsp;&nbsp;";
CaptionGroup[10] = "&nbsp;&nbsp;Perforated Sample 3 of 4&nbsp;&nbsp;";
CaptionGroup[11] = "&nbsp;&nbsp;Perforated Sample 4 of 4&nbsp;&nbsp;";
CaptionGroup[12] = "&nbsp;&nbsp;Bespoke Perforated Sample&nbsp;&nbsp;";
CaptionGroup[13] = "&nbsp;&nbsp;Colour Carded Event Tickets&nbsp;&nbsp;";

function DisplayImage(direction){
//alert ("first call");
var CurrentImageNum =parseInt(document.form1.CurrentImage.value);
var TotalImageNum =parseInt(document.form1.TotalImages.value);
//make sure next image is one that exists!
//alert("Called");
if (direction=="f")
   {
    NextImage=CurrentImageNum+1;
	if (NextImage>TotalImageNum)
	   {
	   NextImage=1;
	   }
	}
else
   { 
    NextImage=CurrentImageNum-1;
	if (NextImage<1)
	   { 
	   NextImage=TotalImageNum;
	   }
	} 
   
//alert("NextImage=" + NextImage);
SamplePic.style.filter="blendTrans(duration=2)";
//alert("Call 1a");
document.images.SamplePic.style.filter="blendTrans(duration=CrossFadeDuration)";
//alert("Call2");
document.images.SamplePic.filters.blendTrans.Apply();
//alert("Call3");
document.images.SamplePic.src = ImageGroup[NextImage];

//alert("Call4");
///alert("SamplePic src=" + document.images.SamplePic.src);
document.getElementById("CaptionCell").innerHTML=CaptionGroup[NextImage];
document.images.SamplePic.filters.blendTrans.Play();

document.form1.CurrentImage.value=NextImage;
}