My Tripod Page
Make your own free website on Tripod.com
SCORE YOUR TURKEY

<html>

<head>

<title>Calculate Wild Turkey Score</title>



<SCRIPT LANGUAGE="JAVASCRIPT">

<!-- hide form non-javascript browsers>



function ClearForm(form) {



        form.weight.value = "";

        form.beard.value  = "";

        form.leftspur.value = "";

        form.rightspur.value = "";

        form.totalscore.value = "";



}



function CalcScore(weight, beard, leftspur, rightspur) {



        WeightScore=weight*1;

        BeardScore=beard*2;

        LSpurScore=leftspur*10;

        RSpurScore=rightspur*10;



        CalcedScore=WeightScore + BeardScore + LSpurScore + RSpurScore;



        return CalcedScore;



}



function CheckForm(form) {



        if (form.weight.value==null   || form.beard.value==null ||

            form.leftspur.value==null || form.rightspur==null) {

                alert('\nPlease complete the form first');

                return false;

            }

        else if (form.weight.value    <=  0) {

                alert('\nThis is an awful small turkey! \nPlease enter the weight again!');

                return false;

                }

        else if (form.weight.value    >= 40) {

                alert("\nI don't believe you! \nPlease enter the weight again!");

                return false;

                }

        else if (form.beard.value     <=  0) {

                alert("\nIt's got to have a beard to be legal!! \nPlease enter the beard length again!");

                return false;

                }

        else if (form.beard.value     >= 100) {

                alert("\nI don't believe you!!! \nPlease enter the beard length again!");

                return false;

                }

        else if (form.leftspur.value  <=  0) {

                alert("\nEven the little Jake's got a spur! \nPlease enter the left spur length again!");

                return false;

                }

        else if (form.leftspur.value  >=  3) {

                alert("\nI don't believe you!!! \nPlease enter the left spur length again!");

                return false;

                }

        else if (form.rightspur.value <=  0) {

                alert("\nEven the little Jake's got a spur! \nPlease enter the right spur length again!");

                return false;

                }

        else if (form.rightspur.value >=  3) {

                alert("\nI don't believe you!!! \nPlease enter the right spur length again!");

                return false;

                }

        return true;



}





function ComputeForm(form) {



        if (CheckForm(form)) {

               

                YourScore=CalcScore(form.weight.value, form.beard.value,

                                    form.leftspur.value, form.rightspur.value);

                form.totalscore.value=YourScore;



                if (YourScore > 55 && YourScore < 75) {

                        alert("\nNice Gobbler!!!");

                        }

                else if (YourScore > 75) {

                        alert("\nThat's one for the record books!!!");

                        }



                }

        return;



}



// done hiding form non-javascript browsers -->

</SCRIPT>



</HEAD>



<BODY BGCOLOR=#000000 background="images/tropback.jpg">



<FONT COLOR=#ecce88>

<H2><CENTER>Score your Gobbler!!</CENTER></H2>

<CENTER>Enter your measurements in pounds(21.2) and inches(10.3)</CENTER>

<BR>



<CENTER>

<FORM NAME="CTS" method=POST>

<TABLE border=1>

<TR>

<TD><FONT COLOR=#ecce88><DIV ALIGN=CENTER>Weight     (lb.)</DIV></TD>

<TD><FONT COLOR=#ecce88><DIV ALIGN=CENTER>Beard      (in.)</DIV></TD>

<TD><FONT COLOR=#ecce88><DIV ALIGN=CENTER>Left Spur  (in.)</DIV></TD>

<TD><FONT COLOR=#ecce88><DIV ALIGN=CENTER>Right Spur (in.)</DIV></TD>

<TD><FONT COLOR=#ecce88><DIV ALIGN=CENTER>Total Score</DIV></TD>

<TR>



<TR>



<TD><INPUT TYPE=TEXT NAME=weight     SIZE=10 onfocus="this.form.weight.value=''"></TD>

<TD><INPUT TYPE=TEXT NAME=beard      SIZE=10 onfocus="this.form.beard.value=''"></TD>

<TD><INPUT TYPE=TEXT NAME=leftspur   SIZE=12 onfocus="this.form.leftspur.value=''"></TD>

<TD><INPUT TYPE=TEXT NAME=rightspur  SIZE=12 onfocus="this.form.rightspur.value=''"></TD>

<TD><INPUT TYPE=TEXT NAME=totalscore SIZE=10 onfocus="this.form.totalscore.value=''"></TD>

</TR>

</TABLE>



<P>

<INPUT TYPE="button" VALUE="Score it!" onclick="ComputeForm(this.form)">

<INPUT TYPE="reset"  VALUE="Reset"     onclick="ClearForm(this.form)">

</FONT>



<P>



</FORM>

</CENTER>

</BODY>

</HTML>