﻿// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================
var movisMSIE = /*@cc_on!@*/false; 
// Set the slideshow speed (in milliseconds)
var movSlideShowSpeed = 3000;

// set movloops
var movloops = 7;
var done_movloops = 0;

var secondshow = false;

// Set the duration of crossfade (in seconds)
var movCrossFadeDuration = 3;

var movPicture = [2]; // don't change this
var movCaption = [2]; // don't change this



// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines starting at the end of the movPicture array.

movPicture[1]  = 'frames/frame1.jpg';
movPicture[2]  = 'frames/frame2.jpg';
movPicture[3]  = 'frames/frame3.jpg';
movPicture[4]  = 'frames/frame4.jpg';
movPicture[5]  = 'frames/frame5.jpg';
movPicture[6]  = 'frames/frame6.jpg';
movPicture[7]  = 'frames/frame7.jpg';
movPicture[8]  = 'frames/frame8.jpg';
movPicture[9]  = 'frames/frame9.jpg';
movPicture[10]  = 'frames/frame10.jpg';
movPicture[11]  = 'frames/frame11.jpg';
movPicture[12]  = 'frames/frame12.jpg';
movPicture[13]  = 'frames/frame13.jpg';
movPicture[14]  = 'frames/frame14.jpg';
movPicture[15]  = 'frames/frame15.jpg';
movPicture[16]  = 'frames/frame16.jpg';
movPicture[17]  = 'frames/frame17.jpg';
movPicture[18]  = 'frames/frame18.jpg';
movPicture[19]  = 'frames/frame19.jpg';



// To add more movCaptions, just continue the pattern, adding to the array below.
// To use fewer movCaptions, remove lines starting at the end of the movCaption array.



movCaption[1]  = "get a new luxury case for your sat-nav - just £29";
movCaption[2]  = "extra long mounts - with mount kits fully flexible - specially for wagons - only £23";
movCaption[3]  = "get yourself a map upgrade - we talk you through - just £40";
movCaption[4]  = "extra chargers are here for £15 - genuine tomtom brand";
movCaption[5]  = "tomtom make - hard cases for protecting your satnav - for just £22";
movCaption[6]  = "long flexible mount - proper sucker for all GO 10//20/30 models - just the job - £19";
movCaption[7]  = "full control - easy to setup and no dangerous leaning forwards - a must Bluetooth Remote - just £40";
movCaption[8]  = "RDS/TMC free traffic over the radio - NO MONTHLY CHARGES - just £45";
movCaption[9]  = "NEW AA CLOSEUP ATLAS for TRUCKS - Low Bridges / Speed Cams  - just £29";
movCaption[10]  = "full tomtom make home charger kit - to make sure your battery lasts longer - £20";
movCaption[11]  = "map upgrade on an SD card - UK just £60 - plus add extra storage - call for others";
movCaption[12]  = "tomtom accessory kit - case and chargers for tomtom ONE - £30";
movCaption[13]  = "spare and replacement chargers - all models just the job - £15";
movCaption[14]  = "LUXURY CASE - tomtom make and best there is - for all the gear - just £30";
movCaption[15]  = "NEW AA STANDARD TRUCKERS ATLAS - Low Bridges - just £22";
movCaption[16]  = "tomtom cases - tomtom make - all models - zip up for £19";
movCaption[17]  = "LUXURY CASE - here for a tomtom ONE is just  - £30";
movCaption[18]  = "Home charger - make sure the battery lasts with proper charge once a month - just £15";
movCaption[19]  = "Screen protectors avoid those expensive scratches - exact sizes - easy fitting £9";

// START CODE PROPER //

var movtss;
var moviss;
var movjss = 1;
var movpss = movPicture.length-1;

var movpreload = [11];
for (moviss = 1; moviss < movpss+1; moviss++)
								{
								movpreload[moviss] = new Image();
								movpreload[moviss].src = movPicture[moviss];
								}
							
														
function movrunslideshow()
						{
						if (done_movloops >= movloops)
										{
												if (movisMSIE)	
												{
												document.images.movingpicbox.filters.blendTrans.Stop();
												}
												if (secondshow) {
																movtss = setTimeout('movrunslideshow()', movSlideShowSpeed);
																}
												return;
												}
						if (movisMSIE)		
																{
																document.images.movingpicbox.style.filter="blendTrans(duration=3)";
																document.images.movingpicbox.style.filter="blendTrans(duration=movCrossFadeDuration)";
																document.images.movingpicbox.filters.blendTrans.Apply();
																}
						//document.images.movingpicbox.src = movpreload[Math.floor(Math.random() * 11)+1].src;//
						document.images.movingpicbox.src = movpreload[movjss].src; //this is the movjss slide in order that cycles
						if (document.getElementById) 	
																{
																document.getElementById("movCaptionbox").innerHTML= movCaption[movjss]; //
															//	document.getElementById("movCaptionbox").innerHTML = movCaption[Math.floor(Math.random() * 10)+1]; // a random quote as well
																}														
						if (movisMSIE)				
																{
																document.images.movingpicbox.filters.blendTrans.Play();
																}
						movjss = movjss + 1;	
						/* movSlideShowSpeed = 3000;  speed it after initial delay */
						/* if (movjss > (movpss)) movjss=1;  old line replay*/
						if (movjss > movpss) 
																{
																done_movloops=done_movloops+1;
																movjss=1;
																}
						movtss = setTimeout('movrunslideshow()', movSlideShowSpeed);
						}

// this turns an option or off
function showhide (obj,state) 
{
							if (state === "show") 	{
							var movmyvar = document.getElementById('movingpicbox').style.display;
													document.getElementById(obj).style.display = "block";
													return;
													}
													else 
													{
													document.getElementById(obj).style.display = "none";
													return;
													}
}

/* body onload="setTimeout('movrunslideshow()',4500)" bgcolor="#000000" */
function startupmov ()
{
showhide("movingpicbox","show");
setTimeout('movrunslideshow()',4500);
}