function chgQuote() {

	var quotes = new Array();
	var curQuote;

	quotes[0] = '"The superior person is modest in his speech, but exceeds in his actions."';
	quotes[1] = '"If you lose the ability to be humble, you will never reach the highest level of karate training."';
	quotes[2] = '"Find the kata that work for you, understand them, digest them, and stick with them for life."';
	quotes[3] = '"Life is too short to understand everything."';
	quotes[4] = '"We are facing ourselves when we have the courage to admit our faults."';

	curQuote =(quotes[(Math.floor(Math.random() * quotes.length))]);
	document.frmQuote.txtQuote.value = curQuote;
}

var curPhoto=0;
var photos = new Array();
photos[0] = "photos/sitePhotos/PK_0007_med.jpg";
photos[1] = "photos/sitePhotos/PK_0015_med.jpg";
photos[2] = "photos/sitePhotos/PK_0016_med.jpg";
photos[3] = "photos/sitePhotos/PK_0018_med.jpg";
photos[4] = "photos/sitePhotos/PK_0025_med.jpg";
photos[5] = "photos/sitePhotos/PK_0028_med.jpg";
photos[6] = "photos/sitePhotos/PK_0030_med.jpg";
photos[7] = "photos/sitePhotos/PK_0033_med.jpg";
photos[8] = "photos/sitePhotos/PK_0036_med.jpg";
photos[9] = "photos/sitePhotos/PK_0040_med.jpg";
photos[10] = "photos/sitePhotos/PK_0047_med.jpg";
photos[11] = "photos/sitePhotos/PK_0049_med.jpg";
photos[12] = "photos/sitePhotos/PK_0050_med.jpg";
photos[13] = "photos/sitePhotos/PK_0097_med.jpg";
photos[14] = "photos/sitePhotos/PK_0098_med.jpg";
photos[15] = "photos/sitePhotos/PK_0099_med.jpg";
photos[16] = "photos/sitePhotos/PK_0100_med.jpg";
photos[17] = "photos/sitePhotos/PK_0102_med.jpg";
photos[18] = "photos/sitePhotos/PK_0104_med.jpg";
photos[19] = "photos/sitePhotos/PK_0110_med.jpg";
photos[20] = "photos/sitePhotos/PK_0111_med.jpg";
photos[21] = "photos/sitePhotos/PK_0112_med.jpg";
photos[22] = "photos/sitePhotos/PK_0113_med.jpg";
photos[23] = "photos/sitePhotos/PK_0121_med.jpg";
photos[24] = "photos/sitePhotos/PK_0137_med.jpg";
photos[25] = "photos/sitePhotos/PK_0166_med.jpg";
photos[26] = "photos/sitePhotos/PK_0168_med.jpg";
photos[27] = "photos/sitePhotos/PK_0172_med.jpg";
photos[28] = "photos/sitePhotos/PK_0174_med.jpg";

photos[29] = "photos/sitePhotos/PK_0115_med.jpg";
photos[30] = "photos/sitePhotos/PK_0089_med.jpg";
photos[31] = "photos/sitePhotos/PK_0068_med.jpg";
photos[32] = "photos/sitePhotos/PK_0073_med.jpg";
photos[33] = "photos/sitePhotos/PK_0076_med.jpg";
photos[34] = "photos/sitePhotos/PK_0081_med.jpg";


<!-- (hor) 7,15,16,18,25,28,30,33,36,40,47,49,50,97,98,99,100,102,104,110,111,112,113,121,137,166,168,172,174, (vert)115, 89, 68,73,76,81 -->

var stdHeight = 288;
var stdWidth=432;

function chgPic(dir){
	if (dir == -1) {
		if (curPhoto == 0) curPhoto = 34; else curPhoto --;
	} else if (dir == 99) {
		if (curPhoto == 34) curPhoto = 0; else curPhoto ++;
		}
		else curPhoto = dir;

	if (curPhoto >=29) {
		document.getElementById("slide1").height=stdWidth;
		document.getElementById("slide1").width=stdHeight;
	}
	else {
		document.getElementById("slide1").height=stdHeight;
		document.getElementById("slide1").width=stdWidth;		
	}

	document.getElementById("slide1").src=photos[curPhoto];

}

function swap(picName) {
	var tmp = picName.src.split("Thumb");

	if (picName.src.indexOf("Thumb") > -1) {
		picName.src=tmp[0] + ".jpg";
		picName.width=492;
		picName.height=394;
	}
	else {
		picName.src=tmp[0].split(".jpg")[0]+ "Thumb.jpg";
		picName.width=165;
		picName.height=132;
	}
}

function resize(picName) {

	var strTemp, arrTemp, strNew
	strTemp = picName.src;

	if (strTemp.indexOf("thumb") > -1) {
		arrTemp = strTemp.split("thumb");
		strNew = arrTemp[0] + "med" + arrTemp[1];
		picName.src = strNew;
		switch (picName.width)
		{
			case 157: {
				 picName.width=392;
				 picName.height=522;
				 break;
			}
			case 209: {
				picName.width = 522;
				picName.height=392;
				break;
			}
		}
	}
	else {
		arrTemp = strTemp.split("med");
		strNew = arrTemp[0] + "thumb" + arrTemp[1];
		picName.src = strNew;
		switch (picName.width)
		{
			case 392: {
				 picName.width=157;
				 picName.height=209;
				 break;
			}
			case 522: {
				picName.width = 209;
				picName.height=157;
				break;
			}
		}
	}
}
