// JavaScript Document
/*-----------------------------------------------------------
Comment Header

Project		: JavaScript Timer
Author		: Sebastian Lenczewski
File Type	: Javascript (.js)
Date Created: June 5, 2008
Comments	: A javascript timer function that can be used
			to control and trigger timed events.  This can 
			be added to any tag in the "onmouseover", 
			"onmouseout" or any other control that requires
			a triggered event over a set period of time.

-----------------------------------------------------------*/


//GLOBAL VARIABLS


// -----CONTROL VARIABLES----- Edit these values to control the peramiters of the timer.

// the number of seconds untill set triggered event will occure.
lengthOfTime = 5;
//Others to note:
//var timeRemaining	- a variable that can be used to display the seconds as it counts down
//var seconds - a variable that displays seconds counting up to the total length of time


// add any extra global variables here. (only works when js files included in header)
var numberOfStories;
var presentStory = 1;
var previousStory;
var nextStroy;







// ----------FUNCTIONS----------- Edit these values to control the peramiters of the timer.

//startTimer() 	- used when the timer is first  actived eg. onload="startTimer()"					

//runTimer()	- used to resume the timer is stoped or paused

//stopTimer()	- use to stop the timer from counting

//pauseTimer()	- used to pause the counting, but can be resumed from same position

//resumeEvent()	- used to resume count down from the same position in time



// -----CONTROL FUNCTIONS----- Edit these values to control the peramiters of the timer.






//////////////////////////////////////////////////////////////////////////////////
//function: startEvent()
//author:	Sebastian, Lenczewski
//date:		6 June, 2008
//purpose:	webdevelopment tool
//////////////////////////////////////////////////////////////////////////////////


// add the code that runs once when the timer is initialy started up
function startEvent()
{
	//alert("Timer was started");	
/*
	if (navigator.appName.indexOf("Microsoft")!=-1) {
		alert(document.body.clientHeight);
		//leftpos = document.body.clientWidth / 2 - 100;
	}else{
		alert(window.innerHeight);
		//leftpos = window.innerWidth / 2 - 100;
	}
*/
}








//////////////////////////////////////////////////////////////////////////////////
//function: runEvent()
//author:	Sebastian, Lenczewski
//date:		6 June, 2008
//purpose:	webdevelopment tool
//////////////////////////////////////////////////////////////////////////////////


// add the code desiered to be triggered when the timer goes off
function runEvent()
{
	
//alert("The timer has finished and your event has been triggered");

nextFeature();


}










//////////////////////////////////////////////////////////////////////////////////
//function: stopEvent()
//author:	Sebastian, Lenczewski
//date:		6 June, 2008
//purpose:	webdevelopment tool
//////////////////////////////////////////////////////////////////////////////////


// add code below to be run when the timer is stopped
function stopEvent()
{
	//alert ("Timer has been stopped");	
}












//////////////////////////////////////////////////////////////////////////////////
//function: pauseEvent()
//author:	Sebastian, Lenczewski
//date:		6 June, 2008
//purpose:	webdevelopment tool
//////////////////////////////////////////////////////////////////////////////////


// add code below that you wish to be run when the timer is paused
function pauseEvent()
{
	//alert("The timer has been paused");
	

}








//////////////////////////////////////////////////////////////////////////////////
//function: resumeEvent()
//author:	Sebastian, Lenczewski
//date:		6 June, 2008
//purpose:	webdevelopment tool
//////////////////////////////////////////////////////////////////////////////////


// add code below that you wish to be run when the timer is paused
function resumeEvent()
{
	//alert("The timer has been resumed");
}








