package contact_form;
require Exporter;

our @ISA = qw( Exporter );
our @EXPORT = qw( get_contact_form );

use lib ".";


# START HERE
# If we want the index page, then just call to the index mod
# If we want something else, then open call and close
sub get_contact_form{
  
    my $self = shift;
    my $chpt = shift;
    my $page = shift;
    
    if($chpt ne "index"){
        contact_form_opens( $self );
    }

    contact_form_calls( $self, $chpt, $page );

    if($chpt ne "index"){
        contact_form_closes( $self );
    }
}




#
#
# SETS OPENING PAGE TAGS ETC
sub contact_form_opens{

    my $self = shift;

# INSERT TITLE HERE
    my $title = "Contact Form ";

# INSERT HEADER HTML BETWEEN EOF1'S
my $head =<<EOF1;
EOF1

# INSERT SCRIPT HTML BETWEEN EOF2'S
my $script =<<EOF2;
EOF2
   
# INSERT BODY HTML FROM BETWEEN EOF3'S
my $body=<<EOF3;

 <td width="575" align="center" valign="top" class="bottomRight"> 
        <p>&nbsp;</p>
        <h1><u>Grills By Design Contact Form</u></h1>
        <table width="500" border="0" align="center">
          <tr> 
            <td align="left"><p><font size="+2">Find Something You Like...<br>
                </font><font size="+2"> Fill Out The Form Below For More Information</font></p>
              </td>
          </tr>
          <tr> 
            <td align="left"> <p>&nbsp;</p>
              <form name="form1" method="post" action="/_scripts/formmail.asp">
                <p>&nbsp;</p>
                <input name="_recipients" type="hidden" value="jshardman@grillsbydesign.com" />
                <input name="_requiredFields" type="hidden"
  					value="nameFirst,nameLast,email,comments" />
                <input name="_subject" type="hidden"
					value="GBDWeb Info Request" />
                <p> 
                  <input name="nameFirst" type="text" id="nameFirst">
                  First Name</p>
                <p> 
                  <input name="nameLast" type="text" id="nameLast">
                  Last Name</p>
                <p> 
                  <input name="phone" type="text" id="phone">
                  Contact Phone</p>
                <p> 
                  <input name="email" type="text" id="email">
                  Email</p>
                <p> 
                  <input name="city" type="text" id="city">
                  City </p>
                <p> 
                  <input name="st" type="text" id="st">
                  St.</p>
                <p>Refered By: 
                <p> 
                  <label> 
                  <input type="radio" name="Reference" value="Search">
                  Search Engine</label>
                  <label> 
                  <input type="radio" name="Reference" value="Word Mouth">
                  Word Of Mouth</label>
                  <label> 
                  <input type="radio" name="Reference" value="Trade Show">
                  Trade Show</label>
                  <label> 
                  <input type="radio" name="Reference" value="Other">
                  Other</label>
                  <br>
                <p>If Other Please Note: 
                <p> 
                  <textarea name="RefOther" cols="40" rows="3"></textarea>
                <p> 
                <p> 
                <p>Comments/ Info Request</p>
                <p> 
                  <textarea name="comments" cols="40" rows="7"></textarea>
                </p>
                <p> 
                  <input type="submit" name="Submit" value="Submit">
                  <input name="reset" type="reset" id="reset4" value="Reset">
                </p>
              </form>
              <p>&nbsp;</p></td>
          </tr>
        </table>
        <p align="center">&nbsp;</p>
        <p align="center">&nbsp;</p>
        <p>&nbsp;</p>
        <p align="center">&nbsp;</p>
        		
        </td>

EOF3
# TO HERE

$self->setTitle( $title );
$self->setHead( $head );
$self->setBody( $body );
}



#
#
# CALLS INNER-PAGE MODULES
sub contact_form_calls{

    my $self = shift;
    my $chpt = shift;
    my $page = shift;


}


#
#
# LOAD CLOSING TAGS
sub contact_form_closes{

    my $self = shift;

my $body =<<EOFCLOSE;
EOFCLOSE

    $self->setBody( $body );

}
