  <!-- common
  // Set Boolean values to make sure browser is feature compatible
  imgObject = 0;
  onUpdate  = 0;
  bAgent = navigator.userAgent;
  bName  = navigator.appName;
  bVer   = parseFloat (navigator.appVersion);

  // Test if Mouse Over Capability (>= Netscape Version 3.xx)
  if (((bName == "Netscape" && bVer >=3)) || 
     (bName == "Microsoft Internet Explorer" && bVer >=4))
     imgObject = 1;


// mine


// check if standings page form submission is ok
function isStandingsFormValid(formToValidate)
{
    var formIsValid = true;

//    if ( formToValidate.STEAMSHORT.value=="AA" )
//        {
//        alert("Please choose a Team and try again.");
//        formIsValid = false;
//        }
//    else
//        {
//        formToValidate.notFirst.value = "Y";
//        }

    return formIsValid;
}




// begin functions for REP Roster Checker

function valueChangeSubmit(theForm)
{
// alert ("inside value change function notFirst = [" + theForm.notFirst.value + "] and doCheck = [" + theForm.doCheck.value + "]" );


    if ( theForm.notFirst.value == "Y" )
        {
// alert ("inside if statement");
        theForm.PLR1A.value = 0;
        theForm.PLR1B.value = 0;
        theForm.PLR2A.value = 0;
        theForm.PLR2B.value = 0;
        theForm.PLR3A.value = 0;
        theForm.PLR3B.value = 0;
        theForm.PLR4A.value = 0;
        theForm.PLR4B.value = 0;
        }

    theForm.notFirst.value = "Y";
    theForm.doCheck.value = "N";
    theForm.newTeam.value = "Y";

// alert ("exiting value change function notFirst = [" + theForm.notFirst.value + "] and doCheck = [" + theForm.doCheck.value + "]" );
    theForm.submit();

}




// begin functions for postiion checker report

function submitPositionChecker(theForm)
{
    var str = "";

    theForm.newTeam.value = "N";
    theForm.notFirst.value = "Y";
    theForm.doCheck.value = "N";


    // if no players have been selected
    if ( theForm.PLR1A.value == 0 && theForm.PLR1B.value == 0 && theForm.PLR2A.value == 0 && theForm.PLR2B.value == 0 && theForm.PLR3A.value == 0 && theForm.PLR3B.value == 0 && theForm.PLR4A.value == 0 && theForm.PLR4B.value == 0 )
        {
        alert ("Please select at least one player")
        return(false);
        }

    // if at least one player has not been selected, check if the user wants to continue
    if ( theForm.PLR1A.value == 0 || theForm.PLR1B.value == 0 || theForm.PLR2A.value == 0 || theForm.PLR2B.value == 0 || theForm.PLR3A.value == 0 || theForm.PLR3B.value == 0 || theForm.PLR4A.value == 0 || theForm.PLR4B.value == 0 )
        {
        str = "You did not fill in all the names, do you want to continue?"
        if ( !confirm(str) )
            {
            return(false);
            }
        }


//    theForm.STEAMSHORT.value = "AA";

    theForm.doCheck.value = "Y";

    return true;
}





function resetPositionChecker(theForm)
{

    theForm.notFirst.value = "N";
    theForm.doCheck.value = "N";

    theForm.submit();
}

// end functions for REP Roster Checker


// begin functions for schedule page
function isScheduleFormValid(formToValidate)
{
    var formIsValid = true;

    return formIsValid;
}


function filterScheduleByDiv(theForm)
{
    theForm.Clubs.value = "";

    theForm.submit();
}

// end functions for schedule page






function isFormValid(formToValidate)
{
    var formIsValid = true;

//if ( document.all.STEAMSHORT.value=="AA" )
    if ( formToValidate.STEAMSHORT.value=="AA" )
        {
        alert("Please choose a Team and try again.");
        formIsValid = false;
        }
    else
        {
        formToValidate.notFirst.value = "Y";
        }

    return formIsValid;
}


function submitFormNoValid(formToValidate)
{
//    alert("Inside submitFormNoValid function");

    formToValidate.notFirst.value = "Y";

    return true;
}



// this function allows the user to choose only one of the following
// Division, Club or Team
function selectDivClubTeam(theForm, mval)
{

    if ( mval == 1 )
        {
        theForm.SCLUB.value="AA"
        theForm.STEAMSHORT.value="AA";
        }

    if ( mval == 2 )
        {
        theForm.SDIVS.value="AA"
        theForm.STEAMSHORT.value="AA";
        }

    if ( mval == 3 )
        {
        theForm.SDIVS.value="AA"
        theForm.SCLUB.value="AA";
        }

    return;
}



// start of Results Page functions


function getResults(formToValidate)
{
    var formIsValid = true;


    if ( formToValidate.STEAMSHORT.value=="AA" && formToValidate.SDIVS.value=="AA")
        {
        alert("Please choose a Team and try again.")
        formIsValid = false;
        }

    return formIsValid;

}



function getxNewFriendly()
{

alert("Inside getNewFriendly.");
        var w = window.open('','Printable','menubar=yes,toolbar=no,location=no,resizable=no,scrollbars=yes,width=610,height=450');
        var tmp = w.document;


        'tmp.write('<!--#include file="../common/inc/firstInclude.inc"-->');
        tmp.write('<html><head>');
        tmp.write('<!-- #include file="inc/KeyWords.inc" -->');
        tmp.write('<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >');
        tmp.write('<title><%=mLeag%> Printer Friendly Report</title>');
        tmp.write('<link rel="stylesheet" href="css/style.css" type="text/css">');
        tmp.write('<script language="javascript" type="text/javascript" src="../common/js/league.js"></script>');
        tmp.write('</head><body>');
        tmp.write('<tr style="background-color: rgb(0,42,178); color: white;font-weight: bold;"><td colspan="10" class="bLine" width="100%" align="center"> Match Details</td></tr>');
        tmp.write('<tr style="background-color: rgb(158,219,77); color: black;font-weight: bold;">');
        tmp.write('<td width="5%" align="center">&nbsp;</td>');
        tmp.write('<td width="6%" align="center" title="Match Position">Pos</td>');
        tmp.write('<td width="5%" align="center" title="Week Period">Wk</td>');
        tmp.write('<td width="10%" align="center" title="Scheduled Date">Sch. Date</td>');
        tmp.write('<td width="10%" align="center" title="Game Status : Whether Played">Play Date</td>');
        tmp.write('<td width="10%" align="center">Status</td>');
        tmp.write('<td width="20%" align="center">Home Team</td>');
        tmp.write('<td width="7%" align="center">Score</td>');
        tmp.write('<td width="20%" align="center">Away Team</td>');
        tmp.write('<td width="4%" align="center">&nbsp;</td>');
        tmp.write('</tr></table>');


tmp.write(opener.document.all.secondTable.value)
tmp.write(opener.document.all.thirdTable.value)




       tmp.write(theTop);
        tmp.write(theBody);
        tmp.write(theBOttom);

	tmp.close();


       void('');
       return;
}









function getFriendly(theForm)
{
    if ( theForm.STEAMSHORT.value=="AA" && theForm.SDIVS.value=="AA" && theForm.SWEEKS.value=="AA" )
        {
        alert("No data displayed for printing.")
        return;
        }
    else
        {
        var w = window.open('PFriendly.asp','Printable','menubar=yes,toolbar=no,location=no,resizable=no,scrollbars=yes,width=610,height=450');
        void('');
        return;
        }
}

function getWeekly(theForm, dtype)
{
    if ( theForm.SDIVS.value!="AA" && theForm.SWEEKS.value!="AA" && theForm.STEAMSHORT.value=="AA" )
        {
        var w = window.open('pfWeekly.asp','Printable','menubar=yes,toolbar=no,location=no,resizable=no,scrollbars=yes,width=750,height=480');
        void('');
        return;
        }
    else
        {
        alert("Please select a Week and a " + dtype + " with no team and click 'List Results' before the weekly report.")
        return;
        }
}

// end of Results Page functions



// Start of PTAScores1 functions
function isScores1FormValid(theForm)
{
    var formIsValid = true;


    if ((theForm.SDIV.value=="AA")  || (theForm.SCLUBA.value=="11") || (theForm.SCLUBB.value=="11"))
        {
        alert("Please choose a Division/Club and try again.");
        formIsValid = false;
        }

    return formIsValid;
}

function isScores2FormValid(theForm)
{
    var formIsValid = true;


    if ((theForm.SDIV.value=="AA")  || (theForm.SCLUBA.value=="11") || (theForm.SCLUBB.value=="11"))
        {
        alert("Please choose a Division/Club and try again.");
        formIsValid = false;
        }

    return formIsValid;
}




function filterScores1ByDiv(theForm)
{
    theForm.SCLUBA.value = "";
    theForm.SCLUBB.value = "";

    theForm.submit();
}




function getMatchdts(theForm, mVal, T1, T2, P)
{

    theForm.action='PTAScoresEnt.asp';

    theForm.TEAM1.value = T1
    theForm.TEAM2.value = T2
    theForm.MPRD.value = P;
    theForm.MPOS.value = mVal
    theForm.MACT.value = "S";
   
    theForm.submit();

}




function getMatchdts2(theForm, mVal, T1, T2, P)
{

    theForm.action='PTAScoresEnt2.asp';

    theForm.TEAM1.value = T1
    theForm.TEAM2.value = T2
    theForm.MPRD.value = P;
    theForm.MPOS.value = mVal
    theForm.MACT.value = "S";
   
    theForm.submit();

}





// end of PTAScores1 functions



// start of PTAScoresEnt functions
// if doSwitch = 1, return page to previous screen
function ValScores(theForm, doSwitch)
{
    var str, team;

//alert("Inside valScores function");


    /*===================================================*/
    /* check if Penalty Point is a property of this form */
    /*===================================================*/
    if ( theForm.FORMPEN.value == 'True' )
        {
        /* if so, check if onlyany of the penalty point boxes have been checked */
        /* if so, check if a team to penalize has been selected */
        if ( theForm.GAMEP.checked && (!theForm.P1W.checked && !theForm.P2W.checked) )
            {
            alert("You need to choose which team to penalize.");
            return(false);
            }
        }



    /*===================================================*/
    /* check if Weather Delay is a property of this form */
    /*===================================================*/
    if ( theForm.FORMWET.value == 'True' )
        {
        /* if so, check if weather delay has been checked */
        /* if so, force all 4 players to "Weather Delay", zero out the scores and who won */
        if ( theForm.GAMEW.checked )
            {
            str = "You have set this match to Weather Delay, is that correct?"
            if ( confirm(str) )
                {
                setWet(theForm, "On");
                setPlayerNum(theForm, "991", "991", "991", "991")
                setSetScore(theForm, "0", "0", "0", "0", "0", "0")

                theForm.GAMEWON.value="0"
                theForm.PENWON.value="0"

                /* if everything checks out, then set action to update */
                switchback(theForm);
                return(true);
                }
            else
                {
                 return(false);
                }
            }
       }

    /*===================================================*/
    /* check if Default is a property of this form       */
    /*===================================================*/
    if ( theForm.FORMDEF.value == 'True' )
        {
        /* if so, check if Default has been checked   */
        /* if so, check if a winner has been selected */
        if (theForm.GAMED.checked)
            {
            if (theForm.GAMEWON.value == 1 || theForm.GAMEWON.value == 2)
                {
                }
            else
                {
                alert("Please select a winner.");
                return(false);
                }

            str = "You have marked this match as a Default, is that correct?"
            if ( confirm(str) )
                {
                setDef(theForm, "On");

                /* if a mtach is defaulted, the score needs to be forced to 6-0, 6-0  */
                if ( theForm.GAMEWON.value == 1 )
                    {
                    setSetScore(theForm, "6", "6", "0", "0", "0", "0")
                    }
                else if ( theForm.GAMEWON.value == 2 )
                    {
                    setSetScore(theForm, "0", "0", "0", "6", "6", "0")
                    }
                else
                    {
                    alert ("impossible code #1")
                    }

                /* does this league allow names for defaults */
                /* or do they use Default Win and Default Loss */
                /* if it is the latter, force the name here and submit */
                /* otherwise, continue on */
                if ( theForm.FORMALLOW.value == 'False' )
                    {
                    if ( theForm.GAMEWON.value == 1 )
                        {
                        setPlayerNum(theForm, "997", "997", "998", "998")
                        }
                    else if ( theForm.GAMEWON.value == 2 )
                        {
                        setPlayerNum(theForm, "998", "998", "997", "997")
                        }
                    else
                        {
                        alert ("impossible code #2")
                        }

                    theForm.PENWON.value="0"

                    /* if everything checks out, then set action to update */
                    switchback(theForm);
                    return(true);
                    }
                }
            }
        }


    /*===================================================*/
    /* check if Penalty Point is a property of this form */
    /*===================================================*/
    if ( theForm.FORMPEN.value == 'True' )
        {
        /* if so, check if any of the penalty point boxes have been checked */
        /* if so, check if a team to penalize has been selected */
        if ( theForm.P1W.checked || theForm.P2W.checked )
            {
            if ( theForm.P1W.checked )
                {
                team = theForm.TEAMNAME1.value;
                }
            else if ( theForm.P2W.checked )
                {
                team = theForm.TEAMNAME2.value;
                }
            str = "You have selected to penalize " + team + ", is that correct?"
            if ( confirm(str) )
                {
                /* if the home team was penalized */
                if ( theForm.P1W.checked )
                    {
                    //setPenHome(theForm, "On");
                    theForm.GAMEWON.value = "2";
                    setSetScore(theForm, "0", "0", "0", "6", "6", "0");
                    }
                else if ( theForm.P2W.checked )
                    {
                    //setPenHome(theForm, "On");
                    theForm.GAMEWON.value = "1";
                    setSetScore(theForm, "6", "6", "0", "0", "0", "0");
                    }
                else
                    {
                    alert ("impossible code #1")
                    }
                if ( theForm.GAMEP.checked )
                    {
                    theForm.FORMPOINT.value = 1;
                    }
                else
                    {
                    theForm.FORMPOINT.value = 0;
                    }
                }
            }
        }

    /* a winner must be selected */
    if (theForm.GAMEWON.value == 1 || theForm.GAMEWON.value == 2)
        {
        }
    else
        {
        alert("Please select a winner.");
        return(false);
        }

    /* if any of the 4 are not filled in, return false */
    if ( (theForm.T1PLR1.value=="999") || (theForm.T1PLR2.value=="999") )
        {
        alert("Please select valid players.");
        return(false);
        }
    if ( (theForm.T2PLR1.value=="999") || (theForm.T2PLR2.value=="999") )
        {
        alert("Please select valid players.");
        return(false);    
        }

    /* The winning team must have 2 valid players */
    if ( theForm.GAMEWON.value == 1 && (theForm.T1PLR1.value=="992" || theForm.T1PLR2.value=="992") )
        {
        alert("The winning team must have 2 valid players.");
        return(false);    
        }

    if ( theForm.GAMEWON.value == 2 && (theForm.T2PLR1.value=="992" || theForm.T2PLR2.value=="992") )
        {
        alert("The winning team must have 2 valid players.");
        return(false);    
        }

    /* if same name used more than once, return false and they are not No Player (992)*/
    if (theForm.T1PLR1.value==theForm.T1PLR2.value)
        {
        if ( theForm.T1PLR1.value=="992" )
            {
            /* if either is No Player, then it is ok */
            }
        else
            {
            alert("Please select different players for the home team.");
            return(false); 
            }
        }
    if (theForm.T2PLR1.value==theForm.T2PLR2.value)
        {
        if (theForm.T2PLR1.value=="992" )
            {
            /* if either is No Player, then it is ok */
            }
        else
            {
            alert("Please select different players for the away team.");
            return(false); 
            }
        }



    /* if everything checks out, then set action to update */
    if ( doSwitch == 1 )
        {
        switchback(theForm)
        }
    else
        {
        /* if everything checks out, then set action to update */
        theForm.MACT.value="U";
        theForm.action="PTAScoresEnt2.asp";
        theForm.submit();
        }

    return(true);
}



function switchback(theForm)
{
    var i = 0;


    // do the update
    theForm.MACT.value="U";
    theForm.action="PTAScoresEnt.asp";
    theForm.submit();


    // delay to allow scores to be updated
    for (i=0; i<50000; i++)
        {
        theForm.action="PTAScores1.asp";
        }


    // return to scores1 page
    theForm.action="PTAScores1.asp";
    theForm.MACT.value="S";
    theForm.submit();

}






function setPlayerNum(theForm, p1, p2, p3, p4)
{
    theForm.T1PLR1.value = p1
    theForm.T1PLR2.value = p2
    theForm.T2PLR1.value = p3
    theForm.T2PLR2.value = p4
}


function setSetScore(theForm, s1, s2, s3, s4, s5, s6)
{
    theForm.T1S1.value = s1
    theForm.T1S2.value = s2
    theForm.T1S3.value = s3
    theForm.T2S1.value = s4
    theForm.T2S2.value = s5
    theForm.T2S3.value = s6
}





function mwin(theForm, mOpt)
{
    if (mOpt==1)
        {
        theForm.GAMEWON.value = 1;
        theForm.T1W.checked = true;
        theForm.T2W.checked = false;
        }
    else
        {
        theForm.GAMEWON.value = 2;
        theForm.T1W.checked = false;
        theForm.T2W.checked = true;
        }
}


function pwin(theForm, mOpt)
{
    if (mOpt==1)
        {
        theForm.PENWON.value = 1;
        theForm.P1W.checked = true;
        theForm.P2W.checked = false;
        }
    else
        {
        theForm.PENWON.value = 2;
        theForm.P1W.checked = false;
        theForm.P2W.checked = true;
        }
}



/* checking retired matches */
function mRetDef(theForm, mOpt)
{
    /* if retired was checked */
    if (mOpt==1)
        {
        if (!theForm.GAMER.checked)
            {
            setRet(theForm, "Off");
            }
        else
            {
            setRet(theForm, "On");
            }
        setDef(theForm, "Off");
        setWet(theForm, "Off");
        setPenHome(theForm, "Off")
        setPenAway(theForm, "Off")
        setPenPoint(theForm, "Off")
        }
    else if (mOpt==2) /* if default was checked */
        {
        if (!theForm.GAMED.checked)
            {
            setDef(theForm, "Off");
            }
        else
            {
            setDef(theForm, "On");
            }
        setRet(theForm, "Off");
        setWet(theForm, "Off");
        setPenHome(theForm, "Off")
        setPenAway(theForm, "Off")
        setPenPoint(theForm, "Off")
        }
    else if (mOpt==3) /* if weather delay was checked */
        {
        if (!theForm.GAMEW.checked)
            {
            setWet(theForm, "Off");
            }
        else
            {
            setWet(theForm, "On");
            }
        setDef(theForm, "Off");
        setRet(theForm, "Off");
        setPenHome(theForm, "Off")
        setPenAway(theForm, "Off")
        setPenPoint(theForm, "Off")
        }
    else if (mOpt==4) /* if home team penalty is checked */
        {
        if (!theForm.P1W.checked)
            {
            setPenHome(theForm, "Off");
            setPenPoint(theForm, "Off")
            }
        else
            {
            setPenHome(theForm, "On");
            }
        setDef(theForm, "Off");
        setRet(theForm, "Off");
        setWet(theForm, "Off");
        setPenAway(theForm, "Off")
        }
    else if (mOpt==5) /* if away team penalty is checked */
        {
        if (!theForm.P2W.checked)
            {
            setPenAway(theForm, "Off");
            setPenPoint(theForm, "Off")
            }
        else
            {
            setPenAway(theForm, "On");
            }
        setDef(theForm, "Off");
        setRet(theForm, "Off");
        setWet(theForm, "Off");
        setPenHome(theForm, "Off")
        }
    else if (mOpt==6) /* if extra penality point box is checked */
        {
        if (!theForm.GAMEP.checked)
            {
            setPenPoint(theForm, "Off")
            }
        else
            {
            setPenPoint(theForm, "On")
            setDef(theForm, "Off");
            setRet(theForm, "Off");
            setWet(theForm, "Off");
            }
        }
    else
        {
        alert("Impossible code where mOpt = [" + mOpt + "]");
        }
}



function setDef(theForm, opt)
{
    if ( theForm.FORMDEF.value == 'True' )
        {
        if ( opt == 'On' ) /* turn it on */
            {
            theForm.GAMED.value = "D";
            theForm.GAMED.checked = true;
            }
        else if ( opt == 'Off' ) /* uncheck the box */
            {
            theForm.GAMED.value = "";
            theForm.GAMED.checked = false;
            }
        else
            {
            alert("Impossible code where mOpt = [" + mOpt + "]");
            }
        }
}

function setRet(theForm, opt)
{
    if ( theForm.FORMRET.value == 'True' )
        {
        if ( opt == 'On' ) /* turn it on */
            {
            theForm.GAMER.value = "R";
            theForm.GAMER.checked = true;
            }
        else if ( opt == 'Off' ) /* uncheck the box */
            {
            theForm.GAMER.value = "";
            theForm.GAMER.checked = false;
            }
        else
            {
            alert("Impossible code where mOpt = [" + mOpt + "]");
            }
        }
}

function setWet(theForm, opt)
{
    if ( theForm.FORMWET.value == 'True' )
        {
        if ( opt == 'On' ) /* turn it on */
            {
            theForm.GAMEW.value = "W";
            theForm.GAMEW.checked = true;
            }
        else if ( opt == 'Off' ) /* uncheck the box */
            {
            theForm.GAMEW.value = "";
            theForm.GAMEW.checked = false;
            }
        else
            {
            alert("Impossible code where mOpt = [" + mOpt + "]");
            }
        }
}


function setPenHome(theForm, opt)
{
    if ( theForm.FORMPEN.value == 'True' )
        {
        if ( opt == 'On' ) /* turn it on */
            {
            theForm.P1W.value = "P";
            theForm.P1W.checked = true;
            }
        else if ( opt == 'Off' ) /* uncheck the box */
            {
            theForm.P1W.value = "";
            theForm.P1W.checked = false;
            }
        else
            {
            alert("Impossible code where mOpt = [" + mOpt + "]");
            }
        }
}

function setPenAway(theForm, opt)
{
    if ( theForm.FORMPEN.value == 'True' )
        {
        if ( opt == 'On' ) /* turn it on */
            {
            theForm.P2W.value = "P";
            theForm.P2W.checked = true;
            }
        else if ( opt == 'Off' ) /* uncheck the box */
            {
            theForm.P2W.value = "";
            theForm.P2W.checked = false;
            }
        else
            {
            alert("Impossible code where mOpt = [" + mOpt + "]");
            }
        }
}


function setPenPoint(theForm, opt)
{
    if ( theForm.FORMPEN.value == 'True' )
        {
        if ( opt == 'On' ) /* turn it on */
            {
            theForm.GAMEP.value = "P";
            theForm.GAMEP.checked = true;
            }
        else if ( opt == 'Off' ) /* uncheck the box */
            {
            theForm.GAMEP.value = "";
            theForm.GAMEP.checked = false;
            }
        else
            {
            alert("Impossible code where mOpt = [" + mOpt + "]");
            }
        }
}





// end of PTAScoresEnt functions



// start of Player functions

// playeredit function
function ValidForm(frm)
{ 
    var pname, str;

    with (frm)
        {
        if (selectPlayer.value.length > 0)
            {		
            pname = selectPlayer.options[selectPlayer.selectedIndex].text
            str = "You edited info on '" + pname + "'.  Do you wish to save your changes?"
            if (!confirm(str))
                {
                return false;
                }
            }
	else
            {
            alert("Please select a player to edit");selectPlayer.focus();return false;
            }

	msg = "Please enter a valid ";
	if (fname.value.length <= 0) {alert(msg + "first name");fname.focus();return false;}
	if (!isNaN(fname.value))     {alert(msg + "first name");fname.focus();return false;}
	if (lname.value.length <= 0) {alert(msg + "last name");lname.focus();return false;}
	if (!isNaN(lname.value))     {alert(msg + "last name");lname.focus();return false;}
	if (email.value.indexOf("@") < 0 && email.value.length > 3) {alert(msg + "email");email.focus();return false;}

//alert("do i get here hProcType.value was [" + hProcType.value + "]")
        hProcType.value='edit';
//alert("hProcType.value is now [" + hProcType.value + "]")

	return true;

    }    //with
}


// reset selectPlayer to null
function resetSelectPlayer(frm)
{
    with (frm)
        {
//alert("before reset - selectPlayer = [" + selectPlayer.value + "]");
        selectPlayer.value = "";
//alert("after reset - selectPlayer = [" + selectPlayer.value + "]");


	return true;

    }    //with
}




// end of Player functions




//PTAdirections function
function getClubInfo(theForm)
{
    var formIsValid = true;

    if (theForm.Clubs.value=="11")
        {
        alert("Please select a club.");
        formIsValid = false;
        }
    else 
        {
        theForm.CLUB_ID.value = theForm.Clubs.value;
        theForm.all.CLUB_NAME.value = "Club Name";
        }

    return formIsValid;
}




// end of PTAdirections function


// Printer friendly report function


function showPFfriendly()
{
var pHref = opener.location.host
var cHref = location.host

var pHost = opener.location.host
var cHost = location.host



document.open()

document.write(opener.document.all.secondTable.value)
document.write(opener.document.all.thirdTable.value)


document.close()


}








function getCodeVal()
{

    if (document.getElementById) 
        {
        alert("W3C DOM-compliant code")
        }
    else if (document.all) 
        {
        alert("DHTML DOM-compliant code")
        }
    else if (document.layers) 
        {
        alert("LDOM-compliant code")
        }
    else
        {
        alert("You do not have Support For HTML")
        }
}





// 
function Login(dest) {
	document.forms[0].hdest.value=dest;
	document.forms[0].action="login.asp";
	document.forms[0].submit();
}
function LoadPage(src) {
	document.forms[0].action=src;
	document.forms[0].submit();
}

function LoadCommonParam() {	
	
/*	with (document.forms[0]) {
		hplr_id.value = '<%=mhplr_id%>';	
		hclb_id.value = '<%=mhclb_id%>';
		hteam_id.value = '<%=mhteam_id%>';
		hdiv_id.value = '<%=mhdiv_id%>';
		hdiv_name.value = '<%=mhdiv_name%>';
		hplr_fname.value = '<%=mhplr_fname%>';
		hplr_lname.value = '<%=mhplr_lname%>';
		hplr_security_level.value = '<%=mhplr_security_level%>';
		hinvalidLogin.value = '<%=invalidLogin%>';
		hloggedIn.value = '<%=loggedIn%>';	
		alert("hloggedIn.value="+hloggedIn.value);
	} */
	
}
    
function dropMove(site) {
    if (onUpdate == 1)
      {
      if (site != "") {top.location=site}
      return false;
      }
    else {return true;} // Return true to complete form submission
}
  
function greetingfunc() {
	var now = new Date();
	var pm, truehour, hour
	var truehour = now.getHours();
	if(truehour >= 12) {
		if(truehour >= 13) {
			hour=truehour-12
		}
		else{
		   hour=truehour
		}
		pm="PM"
	}
	else{
		hour=truehour
		pm="AM"
		if (truehour < 1) {
		   hour = 12
		}
		
	}

	var minutes = now.getMinutes();
		if(minutes < 10){
		minutes="0" + minutes
		}
		
	var greeting
	
	if(truehour < 12){
		greeting="Good Morning!"	
	}
	else if(truehour< 18 && truehour >= 12) {
		greeting="Good Afternoon!"
	}
	else {
		greeting="Good Evening!"
	}
	document.write(greeting)
	document.write("&nbsp;&nbsp;It is&nbsp;")
	var time=hour + ":" + minutes + " " + pm + "."
	document.write(time)
}
  
  function imgSwap(ImgName, ImgObject) {
    if (imgObject == 1)
      {document.images[ImgName].src = eval(ImgObject + ".src")}
  }

  // Preload Images For This Page
  if (imgObject == 1)
    {
    over_01 = new Image(30,25);
    over_01.src = "/images/top_link_01.gif";
    over_02 = new Image(62,25);
    over_02.src = "/images/top_link_02.gif";
    over_03 = new Image(63,25);
    over_03.src = "/images/top_link_03.gif";
    over_04 = new Image(32,25);
    over_04.src = "/images/top_link_04.gif";
    over_05 = new Image(45,25);
    over_05.src = "/images/top_link_05.gif";
    over_06 = new Image(52,25);
    over_06.src = "/images/top_link_06.gif";
    o1 = new Image(30,25);
    o1.src = "/images/o1.gif";
    o2 = new Image(62,25);
    o2.src = "/images/o2.gif";
    o3 = new Image(63,25);
    o3.src = "/images/o3.gif";
    o4 = new Image(32,25);
    o4.src = "/images/o4.gif";
    o5 = new Image(45,25);
    o5.src = "/images/o5.gif";
    o6 = new Image(52,25);
    o6.src = "/images/o6.gif";
    }
  // -->

