//////////////////////////////////////////////////////////////
//Version 4.0


// Set the message for the alert box
am = "This function is disabled!";
//bm = "This function is 2nd disabled!";
bm = "Right-Click has been disabled on this Webpage";


bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(bm)
     return false;
   }
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;




//////////////////////////////////////////////////////////////////

// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 1000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 1;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var showHot = false;       // 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 Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

Picture[1]  = 'images/gallerytwcspring2004/TWC2004x400f1000001.jpg';
Picture[2]  = 'images/gallerytwcspring2004/TWC2004x400f1000002.jpg';
Picture[3]  = 'images/gallerytwcspring2004/TWC2004x400f1000003.jpg';
Picture[4]  = 'images/gallerytwcspring2004/TWC2004x400f1000004.jpg';
Picture[5]  = 'images/gallerytwcspring2004/TWC2004x400f1000005.jpg';
Picture[6]  = 'images/gallerytwcspring2004/TWC2004x400f1000006.jpg';
Picture[7]  = 'images/gallerytwcspring2004/TWC2004x400f1000007.jpg';
Picture[8]  = 'images/gallerytwcspring2004/TWC2004x400f1000008.jpg';
Picture[9]  = 'images/gallerytwcspring2004/TWC2004x400f1000009.jpg';
Picture[10]  = 'images/gallerytwcspring2004/TWC2004x400f1000010.jpg';
Picture[11]  = 'images/gallerytwcspring2004/TWC2004x400f1000011.jpg';
Picture[12]  = 'images/gallerytwcspring2004/TWC2004x400f1000012.jpg';
Picture[13]  = 'images/gallerytwcspring2004/TWC2004x400f1000013.jpg';
Picture[14]  = 'images/gallerytwcspring2004/TWC2004x400f1000014.jpg';
Picture[15]  = 'images/gallerytwcspring2004/TWC2004x400f1000015.jpg';
Picture[16]  = 'images/gallerytwcspring2004/TWC2004x400f1000016.gif';
Picture[17]  = 'images/gallerytwcspring2004/TWC2004x400f1000017.jpg';
Picture[18]  = 'images/gallerytwcspring2004/TWC2004x400f1000018.jpg';
Picture[19]  = 'images/gallerytwcspring2004/TWC2004x400f1000019.jpg';
Picture[20]  = 'images/gallerytwcspring2004/TWC2004x400f1000020.jpg';
Picture[21]  = 'images/gallerytwcspring2004/TWC2004x400f1000021.jpg';
Picture[22]  = 'images/gallerytwcspring2004/TWC2004x400f1000022.jpg';
Picture[23]  = 'images/gallerytwcspring2004/TWC2004x400f1000023.jpg';
Picture[24]  = 'images/gallerytwcspring2004/TWC2004x400f1000024.jpg';
Picture[25]  = 'images/gallerytwcspring2004/TWC2004x400f1000025.jpg';
Picture[26]  = 'images/gallerytwcspring2004/TWC2004x400f1000026.jpg';
Picture[27]  = 'images/gallerytwcspring2004/TWC2004x400f1000027.jpg';

// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[1]  = "1) Everyone together. Nearly 200 karate students attended the 20th Train with the Champions Spring Course from 5th-9th April 2004. The course is the largest held in the South West of England, located in Torbay, Devon, and attracts karateka from all over the country for 5 days training.";
Caption[2]  = "2) Sensei Sherry (Chief Instructor): \"Line up!\"";
Caption[3]  = "3) Seminars always begin with the warm up, here taken by Sensei Brennan.";
Caption[4]  = "4) The course is an ideal opportunity to participate in sport together with members of your family. White belts or beginners are always welcome.";
Caption[5]  = "5) Karate helps improve your coordination and flexibility.";
Caption[6]  = "6) and of course your self-defense skills.";
Caption[7]  = "7) After the warm up the students are divided into classes specific to their level of experience or grade. Shown here is the most advanced black belts or 2nd Dan and above class. As a new format to the course they had the opportunity to have a class to themselves all week, where they could concentrate on their own syllabus. This was greatly appreciated by everyone training.";
Caption[8]  = "8) Here Sensei Sherry takes the higher Dan class through the kata Gankaku, demonstrating all the techniques himself in meticulous detail.";
Caption[9]  = "9) Not happy with the quality of the techniques performed by the class, Sensei Sherry asks for the techniques to be repeated until correct. A firm task master, but what else is expected of a Chief Instructor?";
Caption[10] = "10) A difficult move in Gankaku, where the arms are used as blocks, full shoulder and hip rotation is required.";
Caption[11] = "11) The large number of 1st Dans, are shown here in their own class, being instructed by Sensei O\'Neill in the kata Jitte. Sensei O\'Neill showing his knee position in many of the body forms through the kata.";
Caption[12] = "12) The higher Dan grades had 4 higher Dan katas of their own to master during the week. Here Sensei Poynton on the last day of the course, reviews all the kata studied during the week, first slowly and then with \"speed and power\". I hope you are fit and have a good memory!";
Caption[13] = "13) The instructors change class after each seminar. Here on a different day, Sensei Poynton is instructing the brown belt class in some paired fighting techniques or kumite. Absolute control on your attacking technique is expected even for brown belts, whilst still touching the target area with your fist, foot, elbow or knee for example.";
Caption[14] = "14) Sensei Rhodes is photographed here instilling some of his creative kumite techniques into the coloured belt class of green and purple belts. With his usual deviation of the actual grading syllabus, and a few tweaks here and there, the combinations allow the methodology and application of the grading combinations to be thoroughly understood. From Sensei Rhodes\' point of view it is always important to learn something new on a course such as this.";
Caption[15] = "15) Here Sensei Rhodes is photographed later in the week instructing the 1st Dan black belts in the kata Kanku Dai. And not to be missed the application of some of the techniques is demonstrated....";
Caption[16] = "16) Sensei Rhodes demonstrating an application to the throw from horse-stance position in the kata Kanku Dai. The application is to turn the assailant upside-down and drop him on his head. Since there are a limited number of shodans, instead the volunteer (here Master Jarrett) was gracefully lowered to the ground.";
Caption[17] = "17) Sensei Higgins taking the brown belt class for review at the end of the week. Some of these students were grading for their 1st black belt, directly after this class. During the shodan grading a karateka may be asked to perform any of the coloured belt (Heian) katas. For this reason Sensei Higgins directs the students through all of the Heian katas, here instructing in Heian Yondan.";
Caption[18] = "18) Sensei Higgins taking the brown belts through their basics, important to emphasis the full hip rotation on the reverse punch.";
Caption[19] = "19) The final kiai or effective scream in Heian Sandan, punching to someone behind your head requires a stretch as Sensei Higgins demonstrates. Don\'t forget to kiai!";
Caption[20] = "20) Sensei Brennan meanwhile is instructing the green and purple belts in the fine art of basics. Here they must master the shuto or knife-hand technique.";
Caption[21] = "21) Sensei Brennan shown earlier taking the warm-up. No photos were taken in the beginners class so as not to disturb them, but for newcomers to karate there is also a coloured belt class for white, orange, red and yellow belts";
Caption[22] = "22) Sensei Brennan getting the most out of the green and purple belts by demonstrating from the front. If you can keep up with him while he's going slowly you\'re doing well - Editor.";
Caption[23] = "23) Sensei Brennan making sure the opportunity for a perfect block or disengagement from Gankaku isn't missed.";
Caption[24] = "24) We all come together at the end of the seminar.";
Caption[25] = "25) At the end of the session, all the karateka rejoin for Sensei Sherry to call \"mokuso\" or meditation. This is a chance to relax and breath deeply in through the nose and out through the mouth and meditate on what has been learnt. It also allows time to pass if the karateka have been practising fighting and for calm to be restored.";
Caption[26] = "26) All the Sensei together in fighting ready stance. From the left, Sensei Rhodes, Sensei O\'Neill, Sensei Sherry (Chief Instructor), Sensei Poynton, Sensei Higgins and Sensei Brennan. I must admit to feeling slightly intimidated taking that photo! - Editor";
Caption[27] = "27) You get no smiles then 6 come at once!";

// =====================================
// Do not edit anything below this line!
// =====================================

var numberpreloaded=2;
var loadedallimages=0;
var numberloadedsofar=0;
var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;

var preLoad = new Array();

function setStatusBar(msgStr) { self.status = msgStr; }

setStatusBar("downloading first 5 images of the gallery");

for (iss = 1; iss < numberpreloaded+1; iss++)
{
	preLoad[iss] = new Image();
	preLoad[iss].src = Picture[iss];
	numberloadedsofar=numberloadedsofar+1;
}

for (iss = pss-numberpreloaded+1; iss < pss+1; iss++)
{
	preLoad[iss] = new Image();
	preLoad[iss].src = Picture[iss];
	numberloadedsofar=numberloadedsofar+1;
}

function control(how)
{
	if (showHot)
	{
		if(numberloadedsofar<pss)
		{
			setStatusBar("remaining images will download as you browse the gallery");
		}
		else
		{
			setStatusBar("Bob Rhodes Karate.com, gallery download complete");
		}
		if (how=="F") jss = jss + 1;
		if (how=="B") jss = jss - 1;
		if (jss > (pss)) jss=1;
		if (jss < 1) jss = pss;
		if (document.all)
		//applies to IE 4.0+ returns true
		{
			//document.images.PictureBox.style.filter="blendTrans(duration=0)";
			document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
			document.images.PictureBox.filters.blendTrans.Apply();
		}
		
		document.images.PictureBox.src = preLoad[jss].src;
		//if (1) works
		//if(1)
		//if haven't downloaded image 
		//{
		//	alert("capturepoint haven't got image yet");
		//}
		
		
		if (document.getElementById) 
		{
			document.getElementById("CaptionBox").innerHTML= Caption[jss];
		}
		if (document.all)
		{
			document.images.PictureBox.filters.blendTrans.Play();
		}
		
		if((jss+numberpreloaded)<=pss)
		//if playing in forward direction
		{
			if(preLoad[jss+numberpreloaded]==null)
			//if haven't downloaded image then get it
			{
				preLoad[jss+numberpreloaded] = new Image();
				preLoad[jss+numberpreloaded].src = Picture[jss+numberpreloaded];
				numberloadedsofar=numberloadedsofar+1;
				//alert("capturepoint 1");
			}				
		}
		if((jss+numberpreloaded+1)<=pss)
		//if playing in forward direction
		{
			if(preLoad[jss+numberpreloaded+1]==null)
			//if haven't downloaded image after that then get it
			{
				preLoad[jss+numberpreloaded+1] = new Image();
				preLoad[jss+numberpreloaded+1].src = Picture[jss+numberpreloaded+1];
				numberloadedsofar=numberloadedsofar+1;
			}
		}
		if((jss+numberpreloaded+2)<=pss)
		//if playing in forward direction
		{
			if(preLoad[jss+numberpreloaded+2]==null)
			//if haven't downloaded image after that then get it
			{
				preLoad[jss+numberpreloaded+2] = new Image();
				preLoad[jss+numberpreloaded+2].src = Picture[jss+numberpreloaded+2];
				numberloadedsofar=numberloadedsofar+1;
			}
		}
		if((jss+numberpreloaded+3)<=pss)
		//if playing in forward direction
		{
			if(preLoad[jss+numberpreloaded+3]==null)
			//if haven't downloaded image after that then get it
			{
				preLoad[jss+numberpreloaded+3] = new Image();
				preLoad[jss+numberpreloaded+3].src = Picture[jss+numberpreloaded+3];
				numberloadedsofar=numberloadedsofar+1;
			}
		}
		if((jss+numberpreloaded+4)<=pss)
		//if playing in forward direction
		{
			if(preLoad[jss+numberpreloaded+4]==null)
			//if haven't downloaded image after that then get it
			{
				preLoad[jss+numberpreloaded+4] = new Image();
				preLoad[jss+numberpreloaded+4].src = Picture[jss+numberpreloaded+4];
				numberloadedsofar=numberloadedsofar+1;
			}
		}	
		
		
		if((jss-numberpreloaded)>0)
		//if playing backwards
		{
			if(preLoad[jss-numberpreloaded]==null)
			{
				preLoad[jss-numberpreloaded] = new Image();
				preLoad[jss-numberpreloaded].src = Picture[jss-numberpreloaded];
				numberloadedsofar=numberloadedsofar+1;
				//alert("backwards, made it to download next image " + numberloadedsofar);
			}
		}		
		if((jss-numberpreloaded-1)>0)
		//if playing backwards
		{
			if(preLoad[jss-numberpreloaded-1]==null)
			{
				preLoad[jss-numberpreloaded-1] = new Image();
				preLoad[jss-numberpreloaded-1].src = Picture[jss-numberpreloaded-1];
				numberloadedsofar=numberloadedsofar+1;
			}	
		}//end if 
		if((jss-numberpreloaded-2)>0)
		//if playing backwards
		{
			if(preLoad[jss-numberpreloaded-2]==null)
			{
				preLoad[jss-numberpreloaded-2] = new Image();
				preLoad[jss-numberpreloaded-2].src = Picture[jss-numberpreloaded-2];
				numberloadedsofar=numberloadedsofar+1;
			}	
		}//end if 
		if((jss-numberpreloaded-3)>0)
		//if playing backwards
		{
			if(preLoad[jss-numberpreloaded-3]==null)
			{
				preLoad[jss-numberpreloaded-3] = new Image();
				preLoad[jss-numberpreloaded-3].src = Picture[jss-numberpreloaded-3];
				numberloadedsofar=numberloadedsofar+1;
			}	
		}//end if 
	}//end if showhot
}//end function


