<!--

// Find Page Name
MyString = String(window.location);
MyArrayOfS = MyString.split("/");
MyPage = MyArrayOfS[MyArrayOfS.length-1];

// Some variables

if ( MyPage.substring(0,13) == "guestbook.php" || MyPage.substring(0,10) == "emails.php") {
  var base= "../images/";
} else {
  var base= "images/";
}

var nrm = new Array();
var omo = new Array();

if ( MyPage == "events.html" || MyPage == "beauwaters.html" || MyPage == "cuxton.html" || MyPage == "the_rosecroft.html" ||
     MyPage == "events.php" || MyPage == "beauwaters.php" || MyPage == "cuxton.php" || MyPage == "the_rosecroft.php" ) {
  var stuff = new Array('home','news','lessons','events','videos','about_kav','links','guestbook','photos','about_kavemen','tsunami','juking','all_clubs','beauwaters','cuxton','the_rosecroft');
}
else {
  var stuff = new Array('home','news','lessons','events','videos','about_kav','links','guestbook','photos','about_kavemen','tsunami','juking');
}

// Pre-load part.

if (document.images)
{
	for (i=0;i<stuff.length;i++)
	{
		nrm[i] = new Image;
		nrm[i].src = base + stuff[i] + "_off_b.gif"
		omo[i] = new Image;
		omo[i].src = base + stuff[i] + "_on_b.gif";
	}
}


// The functions: first mouseover, then mouseout
function over(no)
{
	if (document.images)
	{
		document.images[stuff[no]].src = omo[no].src
	}
}

function out(no)
{
	if (document.images)
	{
		document.images[stuff[no]].src = nrm[no].src
	}
}

// End -->
