<!-- Start of Gallery Description Code -->
var dKAM = new Array(3);
dKAM[0] = "Welcome to KAM Kartway! Located in Rhome Texas, just west of Texas MotorSpeedway.  Races are held every other Saturday.  The Winter Series finished on March 25th.  KAM Kartway offers the go kart racing experience at its finest for kids starting out at ages 4 and up to adults over 65.  The go kart classes start with the beginner's at age 4 with the KidKart class, moving up to the 3.5 HP Beginner and Advanced classes, then jumping engines to the 6 HP PureStock, HotStock, SuperStock, and Champ classes, and rounding out the fun for adult classes with the two cycle Yamaha and Rotex engines for the KT100 and World Formula.";
dKAM[1] = "Welcome to KAM Kartway! Located in Rhome Texas, just west of Texas MotorSpeedway.  Races are held every other Sunday.   This is go kart racing at its finest for ages 4 and up to adults over 65.  The go kart classes start with the beginner's at age 4 with the KidKart class, moving up to the 3.5 HP Beginner and Advanced classes, then jumping engines to the 6 HP PureStock, HotStock, SuperStock, and Champ classes, and rounding out the fun for adult classes with the two cycle Yamaha and Rotex engines for the KT100 and World Formula.";
dKAM[2] = "Welcome to KAM Kartway! Located in Rhome Texas, just west of Texas MotorSpeedway.  Races are held every other Saturday.  The fall Series started this October!  KAM Kartway offers the go kart racing experience at its finest for kids starting out at ages 4 and up to adults over 65.  The go kart classes start with the beginner's at age 4 with the KidKart class, moving up to the 3.5 HP Beginner and Advanced classes, then jumping engines to the 6 HP PureStock, SuperStock, and Champ classes...rounding out the fun for adult classes with the Yamaha and Rotex engines for the KT100 and World Formula.";

var aSKRA= new Array(1);
aSKRA[0] = "Welcome to the Southern Kart Racing Association! The SKRA is a circuit point racing program for go karts.  Many racers have expressed a desire to travel to other tracks during the racing season, but decided against it due to the widespread difference in rules between tracks.    SKRA has adopted a uniform set of rules that will be followed at each participating track.  SKRA is a members program geared for those that enjoy variety in their racing program.  There are 5 sanctioned SKRA tracks for the 2006 racing season KAM Kartway, Clasic Arena, Texoma, Grand Praire, and J&S Raceway.";

var dLCEC= new Array(1);
dLCEC[0] = "Welcome to Las Colinas Equestrian Center! The Las Colinas Equestrian Center is  renowned as one of the finest equestrian facilities in the Southwest.  And is host to all levels of Hunter Jumper Horse Shows, Horse Trials, Gaited Horses and individual Breed Shows.  <p><p>The Las Colinas Equestrian Center boasts the largest private covered riding arena in the area with seating and climate controlled viewing areas, a smaller covered schooling arena attached, plus four additional outdoor arenas!";

<!-- End of Gallery Description Code Begin -->

<!-- Right Click Warning Code -->
rightClickWarning = "Ahh Ahhh Ahhh... These photos are copyright protected by ActionPhotos by K3. All rights reserved. Unauthorized reproduction is prohibited."

<!-- Right Click Warning Code End -->

<!-- Slide Show Begin -->
function createSWF( w, h, params) {
  var args = "";
  for (var i in params) {
    args += i + "=" + params[i] + "&amp;";
  }
document.writeln('<object width="100%" height="100%" align="middle">'+ '<param name="movie" value="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'"/>'+ '<param name="wmode" value="transparent" />'+ '<embed src="http://www.smugmug.com/ria/ShizamSlides-2007091201.swf?'+args+'" wmode="transparent" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" allowScriptAccess="always" allowNetworking="all"/></object>');
return 1;
}
<!-- Slide Show End -->

/*
--------------------------------------------------
	ContextualizeTitle Settings
--------------------------------------------------
*/
var titleSettings = {
	separator    : ": ",    // Text to insert between parts of title.
	maxLength    : -1,      // Limits length of title (-1 == no limit).
	doPhotos     : true,    // true == append photo captions
	doAlbums     : true,    // true == append album names
	doGalleries  : true,    // true == append gallery names
	stripSmugmug : true,    // true == remove " - powered by SmugMug" from title bar text
	inverse      : false,   // true == reverse order of home/gallery/album/photo
	siteTitle    : null     // null == use normal site title. "" == suppress site title. "Any Value" == replaces normal site title.
};

/*
--------------------------------------------------
	ContextualizeTitle Class
--------------------------------------------------
*/
function ContextualizeTitle ()
{
	var pieces = new TitlePieces();
	var newTitle = "";
	if (titleSettings.inverse)
	{
		newTitle = MakeTitleBackward();
	}
	else
	{
		newTitle = MakeTitleForward();
	}
	if (titleSettings.maxLength > -1)
	{
		newTitle = newTitle.substr(0, titleSettings.maxLength);
	}
	if (titleSettings.stripSmugmug == false)
	{
		newTitle += " - powered by SmugMug";
	}
	document.title = newTitle;

	// METHODS

	function MakeTitleBackward ()
	{
		var title = "";
		title += pieces.Photo
		if (title.length > 0
			&& pieces.Album.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Album;
		if (title.length > 0
			&& pieces.Gallery.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Gallery;
		if (title.length > 0
			&& pieces.Main.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Main;
		return title;
	}

	function MakeTitleForward ()
	{
		var title = "";
		title += pieces.Main;
		if (title.length > 0
			&& pieces.Gallery.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Gallery;
		if (title.length > 0
			&& pieces.Album.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Album;
		if (title.length > 0
			&& pieces.Photo.length > 0)
		{
			title += titleSettings.separator;
		}
		title += pieces.Photo
		return title;
	}

	// CLASSES

	function TitlePieces ()
	{
		this.Main = GetMainTitle();
		this.Gallery = GetGalleryTitle();
		this.Album = GetAlbumTitle();
		this.Photo = GetPhotoTitle();

		function GetMainTitle ()
		{
			var value = titleSettings.siteTitle;
			if (value == null)
			{
				var index = document.title.indexOf("- powered by SmugMug");
				value = document.title.substr(0, index);
			}
			return value;
		}

		function GetGalleryTitle ()
		{
			var value = "";
			if (titleSettings.doGalleries)
			{
				var element = document.getElementById("galleryTitle");
				if (element)
				{
					value = GetTextContent(element);
					if (value.length > 0)
					{
						 // remove " galleries" from title
						var index = value.indexOf(" galleries");
						if (index > -1)
						{
							value = value.substr(0, index);
						}
					}
				}
			}
			return value;
		}

		function GetAlbumTitle ()
		{
			var value = "";
			if (titleSettings.doAlbums)
			{
				var element = document.getElementById("albumTitle");
				if (element)
				{
					value = GetTextContent(element);
				}
			}
			return value;
		}

		function GetPhotoTitle ()
		{
			var value = "";
			if (titleSettings.doPhotos)
			{
				var element = document.getElementById("caption_bottom");
				if (!element)
				{
					element = document.getElementById("caption_top");
				}
				if (element)
				{
					value = GetTextContent(element);
				}
			}
			return value;
		}

	}

} // end of ContextualTitle class

/*
--------------------------------------------------
	Utility Methods
--------------------------------------------------
*/

function GetPhotoCaption()
{
	var caption = "";
	var photoTitle = document.getElementById("caption_bottom");
	if(!photoTitle)
	{
		photoTitle = document.getElementById("caption_top");
	}
	if(photoTitle)
	{
		caption = GetTextContent(photoTitle);
	}
	return caption;
}

function GetTextContent(node)
{
	var text = "";
	if(node)
	{
		if(node.children)
		{
			text = GetTextContent(node.firstChild);
		}
		else
		{
			if(node.nodeValue)
			{
				text = node.nodeValue; // IE
			}
			else
			{
				text = node.textContent; // mozilla
			}
		}
	}
	text = Trim(text);
	return text;
}

function Trim(text)
{
	var regexp = /^\s+|\s+$/g;
	text = text.replace(regexp, "");
	return text;
}

function IsHomePage()
{
	var isHomePage = false;
	// test for the "homepage" class name in the <BODY> tag
	var classStr = document.body.className;
	if (classStr && (classStr.indexOf("homepage") != -1))
	{
		isHomePage = true;
	}
	return isHomePage;
}


