﻿//	kyvoad.js
//	written by: R. White, November 2009 
//	contains the Javascript instructions for the kyvoad.com Web Pages

function displayNewPage(contents) {
    document.getElementById(contents).target = "_blank";
}

function normalText() {
    document.getElementById("body").style.fontSize = 1 + "em";
}

function largeText() {
    document.getElementById("body").style.fontSize = 2 + "em";
}

function xLargeText() {
    document.getElementById("body").style.fontSize=3+"em";
}

var t ;
var num = 0 ;
var firstTime=true ;
var pics = new Array(15) ;

function changePictures() {
	
	document.getElementById( 'toppic' ).src = pics[num] ;

	if( num < pics.length - 1 ) {
		num++ ;
	}
	else {
		num = 0 ;
	}
	

	t = setTimeout('changePictures()', 3000) ;
	
}

function setPictures( pictureName ) {
	
	pics[0] = 'pictures/index/index0.jpg' ;
	pics[1] = 'pictures/index/index1.jpg' ;
	pics[2] = 'pictures/index/index2.jpg' ;
	pics[3] = 'pictures/index/index3.jpg' ;
	pics[4] = 'pictures/index/index4.jpg' ;
	pics[5] = 'pictures/index/index5.jpg' ;
	pics[6] = 'pictures/index/index6.jpg' ;
	pics[7] = 'pictures/index/index7.jpg' ;
	pics[8] = 'pictures/index/index8.jpg' ;
	pics[9] = 'pictures/index/index9.jpg' ;
	pics[10] = 'pictures/index/index10.jpg' ;
	pics[11] = 'pictures/index/index11.jpg' ;
	pics[12] = 'pictures/index/index12.jpg' ;
	pics[13] = 'pictures/index/index13.jpg' ;
	pics[14] = 'pictures/index/index14.jpg' ;
	pics[15] = 'pictures/index/index15.jpg';
	pics[16] = 'pictures/index/index16.jpg';
	firstTime = false;
	
	changePictures() ;
}

function resetTimeout() {
	clearTimeout(t) ;
	num=0 ;
	firstTime = true ;
}

