//<!-- COUNTDOWN SCRIPT -- Hiding script from old browsers

/* Initializations */
var timerID;
var timerRunning = false;
var today = new Date();
var enday = new Date();
var secPerDay = 0;
var minPerDay = 0;
var hourPerDay = 0;
var secsLeft = 0;
var secsRound = 0;
var secsRemain = 0;
var minLeft = 0;
var minRound = 0;
var minRemain = 0;
var timeRemain = 0;


/* This function will stop the clock */
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

/* This function will start the clock */
function startclock () {
stopclock();
showtime();
}

/*

today is the date today, wow.
enday is the date you want to count til. 

*/

function showtime () {
today = new Date();
enday = new Date("June 25, 2010 00:00:01 EST");
enday.setYear("2010");
secsPerDay = 1000 ;
minPerDay = 60 * 1000 ;
hoursPerDay = 60 * 60 * 1000;
PerDay = 24 * 60 * 60 * 1000;

/*Seconds*/

/*
secsLeft is the raw seconds remaining until the date.
secsRound is the rounded seconds remaining until the date.
secsRemain is the re-configured seconds. 
*/

secsLeft = (enday.getTime() - today.getTime()) / minPerDay;
secsRound = Math.round(secsLeft);
secsRemain = secsLeft - secsRound;
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60;
secsRemain = Math.round(secsRemain);

/*Minutes*/

/*

minLeft is the raw minutes remaining until the date.
minRound is the rounded seconds remaining until the date.
minRemain is the re-configured minutes. 

*/

minLeft = ((enday.getTime() - today.getTime()) / hoursPerDay);
minRound = Math.round(minLeft);
minRemain = minLeft - minRound;
minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft)  * 60) : minRemain = ((minLeft - minRound) * 60);
minRemain = Math.round(minRemain - 0.495);

/*Hours*/
/*
hoursLeft is the raw hours remaining until the date.
hoursRound is the rounded hours remaining until the date.
hoursRemain is the re-configured hours. 
*/

hoursLeft = ((enday.getTime() - today.getTime()) / PerDay);
hoursRound = Math.round(hoursLeft);
hoursRemain = hoursLeft - hoursRound;
hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound - hoursLeft)  * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24);
hoursRemain = Math.round(hoursRemain - 0.5);

/*Days*/
/*
daysLeft is the raw days remaining until the date.
daysRound is the rounded days remaining until the date.
daysRemain is the re-configured days.

*/

daysLeft = ((enday.getTime() - today.getTime()) / PerDay);
daysLeft = (daysLeft - 0.5);
daysRound = Math.round(daysLeft);
daysRemain = daysRound;

/*Time*/
/*
timeRemain makes the clock more elegant.
document.clock.face.value is used to show the time remaining.
timeID controls the refresh rate of the clock. The number is the rate
in milliseconds.
The if statement will stop the clock when the time has expired.
*/

timeRemain = "" + daysRemain + " days " + hoursRemain + " hrs  ";  /* + minRemain + "mins  " + secsRemain + "secs";*/
document.clock.face.value = timeRemain;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
if (daysRemain < 0) {
clearTimeout(timerID);
timerRunning = false;
//this line sets the new page if clock has run out
//window.location.href="index2.htm";
//this line will change the message on the clock face
document.clock.face.value = ("Fishing Is Underway!!!!");



}
}





/*******************this adds second clock**********************/

/* Initializations */

var timerID2;
var timerRunning2 = false;
var today2 = new Date();
var enday2 = new Date();
var secsLeft2 = 0;
var secsRound2 = 0;
var secsRemain2 = 0;
var minLeft2 = 0;
var minRound2 = 0;
var minRemain2 = 0;
var timeRemain2 = 0;

/* This function will stop the clock */
function stopclock2(){
if(timerRunning2)
clearTimeout(timerID2);
timerRunning2 = false;
}

/* This function will start the clock */
function startclock2 () {
stopclock2();
showtime2();
}

/*

today2 is the date today, wow.
enday2 is the date you want to count til. 

*/

function showtime2 () {
today2 = new Date();
enday2 = new Date("June 24, 2010 00:00:01 EST");
enday2.setYear("2010");
secsPerDay = 1000 ;
minPerDay = 60 * 1000 ;
hoursPerDay = 60 * 60 * 1000;
PerDay = 24 * 60 * 60 * 1000;

/*Seconds*/

/*
secsLeft is the raw seconds remaining until the date.
secsRound is the rounded seconds remaining until the date.
secsRemain is the re-configured seconds. 
*/

secsLeft2 = (enday2.getTime() - today2.getTime()) / minPerDay;
secsRound2 = Math.round(secsLeft2);
secsRemain2 = secsLeft2 - secsRound2;
secsRemain2 = (secsRemain2 < 0) ? secsRemain2 = 60 - ((secsRound2 - secsLeft2) * 60) : secsRemain2 = (secsLeft2 - secsRound2) * 60;
secsRemain2 = Math.round(secsRemain2);

/*Minutes*/

/*

minLeft is the raw minutes remaining until the date.
minRound is the rounded seconds remaining until the date.
minRemain is the re-configured minutes. 

*/

minLeft2 = ((enday2.getTime() - today2.getTime()) / hoursPerDay);
minRound2 = Math.round(minLeft2);
minRemain2 = minLeft2 - minRound2;
minRemain2 = (minRemain2 < 0) ? minRemain2 = 60 - ((minRound2 - minLeft2)  * 60) : minRemain2 = ((minLeft2 - minRound2) * 60);
minRemain2 = Math.round(minRemain2 - 0.495);

/*Hours*/
/*
hoursLeft is the raw hours remaining until the date.
hoursRound is the rounded hours remaining until the date.
hoursRemain is the re-configured hours. 
*/

hoursLeft2 = ((enday2.getTime() - today2.getTime()) / PerDay);
hoursRound2 = Math.round(hoursLeft2);
hoursRemain2 = hoursLeft2 - hoursRound2;
hoursRemain2 = (hoursRemain2 < 0) ? hoursRemain2 = 24 - ((hoursRound2 - hoursLeft2)  * 24) : hoursRemain2 = ((hoursLeft2 - hoursRound2) * 24);
hoursRemain2 = Math.round(hoursRemain2 - 0.5);

/*Days*/
/*
daysLeft is the raw days remaining until the date.
daysRound is the rounded days remaining until the date.
daysRemain is the re-configured days.

*/

daysLeft2 = ((enday2.getTime() - today.getTime()) / PerDay);
daysLeft2 = (daysLeft2 - 0.5);
daysRound2 = Math.round(daysLeft2);
daysRemain2 = daysRound2;


timeRemain2 = " " + daysRemain2 + "days  " + hoursRemain2 + "hrs  " + minRemain2 + "mins  " + secsRemain2 + "secs";
timerID2 = setTimeout("showtime2()",1000);
document.clock2.face.value = timeRemain2;
timerRunning2 = true;
if (daysRemain2 < 0) {
clearTimeout(timerID2);
timerRunning2 = false;
/* this line will change the message on the face of the clock */
document.clock2.face.value = ("Online registration has Ended. Register at the Captain's Party, 5:30pm Thursday, June 24.");
}




}