
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function openWin( windowURL, windowName, windowFeatures ) { 
   return window.open( windowURL, windowName, windowFeatures ) ; 
} 

function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}


function goThere()
	{
	var whichitem=document.form1.sel1.selectedIndex;
	window.location.href=document.form1.sel1.options[whichitem].value;
	}
	
function MM_displayStatusMsg(msgStr)  { //v3.0
	status=msgStr; document.MM_returnValue = true;
}

//next script loads the navigation menu

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

var scr_wd, leftpos;

function fwLoadMenus() {
  if (window.fw_menu_0) return;
	window.fw_menu_0 = new Menu("root",100,17,"Verdana, Arial, Helvetica, sans-serif",10,"#ffffff","#330099","#336633","#ffffff");
    fw_menu_0.addMenuItem("2008 Photos &raquo;","location='gallery/08Tournament/index.htm'");
    fw_menu_0.addMenuItem("2007 Photos &raquo;","location='gallery/07Tournament/07photos1.htm'");
	fw_menu_0.fontWeight="bold";
    fw_menu_0.hideOnMouseOut=true;
   fw_menu_0.writeMenus();
} // fwLoadMenus()

function fwLoadSubMenus() {
   if (window.fw_menu_0) return;
  	window.fw_menu_0 = new Menu("root",100,17,"Verdana, Arial, Helvetica, sans-serif",10,"#ffffff","#330099","#336633","#ffffff");
    fw_menu_0.addMenuItem("2008 Photos &raquo;","location='../gallery/08Tournament/index.htm'");
    fw_menu_0.addMenuItem("2007 Photos &raquo;","location='../gallery/07Tournament/07photos1.htm'");
	fw_menu_0.fontWeight="bold";
    fw_menu_0.hideOnMouseOut=true;
   fw_menu_0.writeMenus();
} // fwLoadSubMenus()

function fwLoadGalMenus() {
   if (window.fw_menu_0) return;
  	window.fw_menu_0 = new Menu("root",100,17,"Verdana, Arial, Helvetica, sans-serif",10,"#ffffff","#330099","#336633","#ffffff");
    fw_menu_0.addMenuItem("2008 Photos &raquo;","location='../../gallery/08Tournament/index.htm'");
    fw_menu_0.addMenuItem("2007 Photos &raquo;","location='../../gallery/07Tournament/07photos1.htm'");
	fw_menu_0.fontWeight="bold";
    fw_menu_0.hideOnMouseOut=true;
   fw_menu_0.writeMenus();
} // fwLoadSubMenus()

//<!-- 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 26, 2009 00:00:01 EST");
enday.setYear("2009");
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 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 22, 2009 23:59:59 EST");
enday2.setYear("2009");
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;
document.clock2.face.value = ("Online registration has Ended. Register at the Captain's Party, 5:30pm Thursday, June 25.");
}




}