// JavaScript Document

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic1.jpg'
theImages[1] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic2.jpg'
theImages[2] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic2.jpg'
theImages[3] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic4.jpg'
theImages[4] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic5.jpg'
theImages[5] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic6.jpg'
theImages[6] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic7.jpg'
theImages[7] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic8.jpg'
theImages[8] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic9.jpg'
theImages[9] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic11.jpg'
theImages[10] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic12.jpg'
theImages[11] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic13.jpg'
theImages[12] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic14.jpg'
theImages[13] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic15.jpg'
theImages[14] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic16.jpg'
theImages[15] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic17.jpg'
theImages[16] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic18.jpg'
theImages[17] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic19.jpg'
theImages[18] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic20.jpg'
theImages[19] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic21.jpg'
theImages[20] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic22.jpg'
theImages[21] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic23.jpg'
theImages[22] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic24.jpg'
theImages[23] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic25.jpg'
theImages[24] = 'http://www.stmartinoftours.org.uk/assets/St-Martins-pic26.jpg'


// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

// End -->

<!-- // text increase 
var textsize = 1;
function changetextsize(up){
	if(up){
		textsize = parseFloat(textsize)+0.2;
	}else{
		textsize =parseFloat(textsize)-0.2;
	}
}

function fsize(size,unit,id){
	var vfontsize = document.getElementById(id);
	if(vfontsize){
		vfontsize.style.fontSize = size + unit;
		createCookie("textsizestyle", textsize, 365);
	}
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

//-->

