// page size 14x19 with no margins

function BuildingDataEntryForm()
{

  //   *****    P A G E     V A R I A B L E S      *****

  var location = "";
  var Building_Type = "";
  var Building_Kind = "";
  var num_Offices = 0;
  var num_Employees = 0;
  var Lunch_Seating = 0;
  var Washroom = 0;
  var Storage  = 0;
  var BuildingSizeFactor = 0;
  var BuildingSize = "";



  //   *****    F O R M   D A T A   C O N F E R M A T I O N      *****

  
  Building_Type  = document.BuildingDataEntryForm.BuildingType[document.BuildingDataEntryForm.BuildingType.selectedIndex].value;

  if ( Building_Type == 0 ) 
     {
   	  alert("Arrrrg!  How can I help u if u won't tell me what u want?  Please select a building type. ");
   	  return;
     }
  num_Employees = parseInt(document.BuildingDataEntryForm.numEmployees[document.BuildingDataEntryForm.numEmployees.selectedIndex].value);
  num_Offices   = parseInt(document.BuildingDataEntryForm.numOffices[document.BuildingDataEntryForm.numOffices.selectedIndex].value);
  Lunch_Seating = parseInt(document.BuildingDataEntryForm.LunchSeating[document.BuildingDataEntryForm.LunchSeating.selectedIndex].value);
  Storage       = parseInt(document.BuildingDataEntryForm.Storage[document.BuildingDataEntryForm.Storage.selectedIndex].value);



  if ( (num_Employees + Lunch_Seating + Storage) == 0 ) 
     {
     alert("Arrrrg!  How can I possibly design a "+ Building_Type +" for zero people?  Give me something to work with here. "
     +" Just give me your best guess.");
  	  return;
     }
     
  if ( num_Offices > num_Employees ) 
     {
     alert (" What! Nobody needs more than one office.  Tell Melisa, she can only be at one place at a time anyway and "
     + " that she can only have one office.  Give that space to some one else.  Please re-select");
     return;
     }

  Lunch_Seating = parseInt(document.BuildingDataEntryForm.LunchSeating[document.BuildingDataEntryForm.LunchSeating.selectedIndex].value);
  washroom      = parseInt(document.BuildingDataEntryForm.Washroom    [document.BuildingDataEntryForm.Washroom    .selectedIndex].value);
  Storage       = parseInt(document.BuildingDataEntryForm.Storage     [document.BuildingDataEntryForm.Storage     .selectedIndex].value);





  //      *****     M O D U L A R    B U I L D I N G     C A L C U L A T I O N S      *****

 
   if (   (Building_Type == "Sales_Office_Building")          ||
          (Building_Type == "Professional_Office_Building")   ||
          (Building_Type == "Industrial_Office_Building")     ||
          (Building_Type == "Government_Office_Building")     ||
          (Building_Type == "Transport_Office_Building")      ||
          (Building_Type == "Retail_Building")                ||
          (Building_Type == "Healthcare_Building ")           ||
          (Building_Type == "Bank") )
      {
      Building_Kind = "Modular_Building";


      BuildingSizeFactor = ( (num_Employees * 120) 
                          +   (num_Offices   *  44)
                          +   (Lunch_Seating *  14)
                          +   (washroom      *  22)
                          +   (Storage       *   1) );
     if (BuildingSizeFactor < 200 )
        {BuildingSize = "10x20";}

     if ((BuildingSizeFactor > 200) && (BuildingSizeFactor <= 288))
            {BuildingSize = "12x24";}

     if ((BuildingSizeFactor > 288) && (BuildingSizeFactor <= 384))
            {BuildingSize = "12x32";}

     if ((BuildingSizeFactor > 384) && (BuildingSizeFactor <= 480))
            {BuildingSize = "12x40";}

     if ((BuildingSizeFactor > 480 ) && (BuildingSizeFactor <= 560 ))
            {BuildingSize = "14x40";}

     if ((BuildingSizeFactor > 560 ) && (BuildingSizeFactor <= 624 ))
            {BuildingSize = "12x52";}

     if ((BuildingSizeFactor > 624 ) && (BuildingSizeFactor <= 720 ))
            {BuildingSize = "12x60";}

     if ((BuildingSizeFactor > 720 ) && (BuildingSizeFactor <= 840 ))
            {BuildingSize = "14x60";}

     if ((BuildingSizeFactor > 840 ) && (BuildingSizeFactor <= 1440))
              {BuildingSize = "24x60";}
  
     if ((BuildingSizeFactor > 1440 ) && (BuildingSizeFactor <= 2160))
            {BuildingSize = "36x60";}

     if ((BuildingSizeFactor > 2160 ) && (BuildingSizeFactor <= 2880 ))
            {BuildingSize = "48x60";}

     if ((BuildingSizeFactor > 2880 ) && (BuildingSizeFactor <= 3600 ))
            {BuildingSize = "60x60";}

     if (BuildingSizeFactor > 3600 ) 
        {alert ("To meet your needs, you will need about " + BuildingSizeFactor + " sqft.  This is beyond my abilities to design. "
        +" You should call TMB (905 563 0880) and ask for Doug.  He can create a design you would be proud to have them build." );
        return;
        }
      }  




  //      *****     O F F I C E    T R A I L E R    C A L C U L A T I O N S      *****
 

  if (    (Building_Type == "Office_Trailer")      ||
          (Building_Type == "Transport_Office")    ||
          (Building_Type == "ChangeTrailer")          ||
          (Building_Type == "Rec")          ||
          (Building_Type == "Media_Office_Trailer")        ||
          (Building_Type == "Industrial")          )
     {
      Building_Kind = "Office_Trailer";


     BuildingSizeFactor = ( (num_Employees * 100) 
                         +  (num_Offices   *  44)
                         +  (Lunch_Seating *  10)
                         +  (washroom      *  20)
                         +  (Storage       *   1) );

     
     if (BuildingSizeFactor < 128 )
              {BuildingSize = "8x16";}

     if ((BuildingSizeFactor > 128) && (BuildingSizeFactor <= 200 ))
            {BuildingSize = "10x20";}

     if ((BuildingSizeFactor > 200)  && (BuildingSizeFactor <= 240) )
            {BuildingSize = "10x24";}

     if (BuildingSizeFactor > 240 ) 
        {if (BuildingSizeFactor <= 320 )
            {BuildingSize = "10x32";
            }
        }
     if (BuildingSizeFactor > 320 ) 
        {if (BuildingSizeFactor <= 400 )
            {BuildingSize = "10x40";
            }
        }
     if (BuildingSizeFactor > 400 ) 
        {if (BuildingSizeFactor <= 480 )
            {BuildingSize = "12x40";
            }
        }
     if ((BuildingSizeFactor > 480 ) && (BuildingSizeFactor <= 624 ))
            {BuildingSize = "12x52";}

     if ((BuildingSizeFactor > 624 ) && (BuildingSizeFactor <= 720 ))
            {BuildingSize = "12x60";}

     if ((BuildingSizeFactor > 720 ) && (BuildingSizeFactor <= 1036 ))
            {BuildingSize = "14x74";
            }
     if (BuildingSizeFactor > 1036 ) 
        {alert ("To meet your needs, u will need about " + BuildingSizeFactor + " sqft. "
        +" This is beyond my abilities to design. "
        +" You should call TMB (905 563 0880) and ask for Doug. "
        +" He can create a design that u would be proud to have them build." );
        return;
        }
     }





  //      *****     W A S H R O O M    B U I L D I N G     C A L C U L A T I O N S      *****





  //      *****     O T H E R    B U I L D I N G     C A L C U L A T I O N S      *****


  if (    (Building_Type == "Healthcare")       ||
          (Building_Type == "Classroom")||
          (Building_Type == "Guardshack")  ||
          (Building_Type == "Retail")      ||
          (Building_Type == "Bank") )
    {
      Building_Kind = "other_kind_of_Modular_Building"
      BuildingSizeFactor = ( (num_Employees * 120) 
                          +   (num_Offices   *  44)
                          +   (Lunch_Seating *  14)
                          +   (washroom      *  22)
                          +   (Storage       *   1) );
     
     if (BuildingSizeFactor < 200 )
        {BuildingSize = "10x20";}

     if ((BuildingSizeFactor > 200) && (BuildingSizeFactor <= 288))
            {BuildingSize = "12x24";}

     if ((BuildingSizeFactor > 288) && (BuildingSizeFactor <= 384))
            {BuildingSize = "12x32";}

     if ((BuildingSizeFactor > 384) && (BuildingSizeFactor <= 480))
            {BuildingSize = "12x40";}

     if ((BuildingSizeFactor > 480 ) && (BuildingSizeFactor <= 560 ))
            {BuildingSize = "14x40";}

     if ((BuildingSizeFactor > 560 ) && (BuildingSizeFactor <= 624 ))
            {BuildingSize = "12x52";}

     if ((BuildingSizeFactor > 624 ) && (BuildingSizeFactor <= 720 ))
            {BuildingSize = "12x60";}

     if ((BuildingSizeFactor > 720 ) && (BuildingSizeFactor <= 840 ))
            {BuildingSize = "14x60";}

     if ((BuildingSizeFactor > 840 ) && (BuildingSizeFactor <= 1440))
              {BuildingSize = "24x60";}
  
     if ((BuildingSizeFactor > 1440 ) && (BuildingSizeFactor <= 2160))
            {BuildingSize = "36x60";}

     if ((BuildingSizeFactor > 2160 ) && (BuildingSizeFactor <= 2880 ))
            {BuildingSize = "48x60";}

     if ((BuildingSizeFactor > 2880 ) && (BuildingSizeFactor <= 3600 ))
            {BuildingSize = "60x60";}

     if (BuildingSizeFactor > 3600 ) 
        {
        alert ("To meet your needs, you will need about " + BuildingSizeFactor + " sqft.  This is beyond my abilities to design. "
          +" You should call TMB (905 563 0880) and ask for Doug.  He can create a design you would be proud to have them build." );
        return;
        }
    }        

  


 
//  alert (" U asked me to accomidate " + num_Employees +" people c/w "+ num_Offices +" private offices, "+ Storage +
//        " sqft of storage space and lunch seating for "+ Lunch_Seating +", in a "+ Building_Type +".  U wll need approximately "+
//        BuildingSizeFactor + " sqft.  U should check out a "+ BuildingSize +" "+ Building_Type +"." + Building_Kind ); 





  //                               *****     O U T P U T   V A R I A B L E S     *****  

     var Similar_Location = location + Building_Type + ".htm#"+ BuildingSize;
     var floorplan = '<img src = images/FloorPlans/fp_' + BuildingSize + '_' + Building_Kind + '.gif>';
     var picture = '<img src = pictures/' + BuildingSize + '_' + Building_Kind + '_small.jpg>	';
     var construcgif = 'images/constr26.gif';
     var bkg = 'images/greenchalkboard.gif';




  //   create the new                            D A T A    O U T P U T  window

    //  window.open(url,target,features,replace)  //window.open('dummy.htm','','left=10,top=10');

    newwindow= window.open('EA_output.htm','', 'left=0,top=0,width=750,height=900');
    newdocument=newwindow.document;

    //temporary blurb
    newdocument.write ( '<a href="' + Similar_Location + '">for info on similar equipment, click here.</a> '
                   + 'This page and is about under construction.  Please let us know if it failes.'
                    );
    //temporary blurb



    newdocument.write('<form method="POST" name="Quotation Request" action="--WEBBOT-SELF--" onSubmit="">');
    newdocument.write('  <!--webbot bot="SaveResults" startspan s-email-format="TEXT/PRE"');
    newdocument.write('  b-email-label-fields="TRUE" b-email-subject-from-field="FALSE"');
    newdocument.write('  s-email-subject="Archie Quotation Request From Internet Form"');
    newdocument.write('  s-builtin-fields="REMOTE_NAME REMOTE_USER"');
    newdocument.write('  s-email-address="daniel@turkstra.com" -->');
    newdocument.write('  <strong>[FrontPage Save Results Component]</strong>');
    newdocument.write('  <!--webbot bot="SaveResults" endspan -->');


    newdocument.write('<TABLE width="600" style="font-family: Arial; border-style: ridge" height="291" cellspacing="0" cellpadding="0">');
    newdocument.write('  	<TR><TD height="20" width="600" align="left" colspan="3" bgcolor="#FFFFFF" >');
    newdocument.write ('U asked me to accomidate ' + num_Employees + ' people c/w '+ num_Offices + ' private offices, ' 
                     + Storage + ' sqft of storage space and lunch seating for ' + Lunch_Seating + ', in a ' 
                     + Building_Type + '.  U wll need approximately ' + BuildingSizeFactor + ' sqft.  U should check out a ' 
                     + BuildingSize + ' ' + Building_Type + '.');
    newdocument.write('  		</TD>');
    newdocument.write('  	<TR>');
    newdocument.write('  		<TD height="21" width="200" align="left" ');
    newdocument.write('        <p align="left">');
    newdocument.write('        <b>Standard Features:</b>');
    newdocument.write('  		</TD>');
    newdocument.write('  		<TD height="31" width="400" align="left" colspan="2" rowspan="4" >');
    newdocument.write(        floorplan);
    newdocument.write('        </p>');
    newdocument.write('  		</TD>');
    newdocument.write('  	<TR>');
    newdocument.write('  		<TD height="10" width="200">');
    newdocument.write('        <p align="left">');
    newdocument.write('        Building Size: ' +  BuildingSize);
    newdocument.write('  		</TD>');
    newdocument.write('  	<TR>');
    newdocument.write('  		<TD height="29" width="200">');
    newdocument.write('             95inch ceiling height');
    newdocument.write('  		</TD>');
    newdocument.write('  	<TR>');
    newdocument.write('  		<TD height="1" width="200">');
    newdocument.write(               picture);
    newdocument.write('  		</TD>');
    newdocument.write('  	<TR>');
    newdocument.write('  		<TD width="200" ><b>Exterior</b></TD>');
    newdocument.write('  		<TD width="200" ><b>Electrical</b></TD>');
    newdocument.write('  		<TD width="200" ><b>Interior</b></TD>');
    newdocument.write('  	<TR>');
    newdocument.write('  		<TD height="51" width="200" align="left" valign="top" ><font size="2">');
    newdocument.write('  		 <b>-</b>60 mil PVC roof membrane<br>');
    newdocument.write('  		 <b>-</b>28 ga. Messa steel siding.<br>');
    newdocument.write('        <b>-</b># 32x42 windows</font>');
    newdocument.write('  		</TD>');
    newdocument.write('  		<TD height="27" width="200" valign="top" ><font size="2">');
    newdocument.write('        <b>-</b>100 amp 120/240 hydro panel<br>');
    newdocument.write('        <b>-</b># 1x4 fluorescent lights<br>');
    newdocument.write('        <b>-</b># duplex receptacles<br>');
    newdocument.write('        <b>-</b>#1000 watt EBB heaters');
    newdocument.write('  		</TD>');
    newdocument.write('  		<TD height="55" width="200" valign="top" ><font size="2">');
    newdocument.write('        <b>-</b>wood grain paneling<br>');
    newdocument.write('        <b>-</b>Modulux ceiling<br>');
    newdocument.write('        <b>-</b>1/8&quot; cvt vinyl tile');
    newdocument.write('  		</TD>');
    newdocument.write('  	<TR>');
    newdocument.write('  		<TD height="20" width="600" align="left" colspan="3" >');

  		
    //                                        O t h e r    q u o t l a b l e    O P T I O N S
  		
    newdocument.write('        <b>Options</b>');
    newdocument.write('  		</TD>');
    newdocument.write('  	<TR>');
    newdocument.write('  		<TD height="79" width="200" align="left" ><font size="2">');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>A-frame Toolbox<br>');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>Wood siding<br>');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>32x60 windows<br>');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>Additional doors<br>');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>Additional windows<br>');
    newdocument.write('        <INPUT name="chkRollup" value="ROLL_UP:x" type=checkbox>Roll-Up rear door');
    newdocument.write('  		</TD>');
    newdocument.write('  		<TD height="79" width="200" valign="top" ><font size="2">');
    newdocument.write('         <select size="1" name="D1">');
    newdocument.write('               <option selected>NO Air condtioning</option>');
    newdocument.write('  		  <option>(1) Thru-wall 8000 BTU AC</option>');
    newdocument.write('  		  <option>(2) Thru-wall 8000 BTU AC</option>');
    newdocument.write('  		  <option>(3) Thru-wall 8000 BTU AC</option>');
    newdocument.write('  		  <option>(4) Thru-wall 8000 BTU AC</option>');
    newdocument.write('  		  <option>(5) Thru-wall 8000 BTU AC</option>');
    newdocument.write('  		  <option>(6) Thru-wall 8000 BTU AC</option>');
    newdocument.write('               <option>Roof Mount Central Air</option>');
    newdocument.write('               <option>Bard System Central Air</option>');
    newdocument.write('               <option>Other</option>');
    newdocument.write('               <option>Bard System Central Air</option>');
    newdocument.write('         </select></font><br>');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>Meter base and Stack.<br>');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>Exterior lighting. <br>');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>Speciatly devices. ');
    newdocument.write('  		</TD>');
    newdocument.write('  		<TD height="93" width="200" valign="top" ><font size="2">');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>1/2-Bathroom<br>');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>Plan Table<br>');
    newdocument.write('        <INPUT name="chkPTable" value="P_TABLE:x" type=checkbox>Interior Partitions<br>');
    newdocument.write('        <INPUT name="chkDesktop" value="DESKTOP:x" type=checkbox>Built-In Desktop<br>');
    newdocument.write('        <INPUT name="chkFileCabinet" value="FILE_CABINET:x" type=checkbox>Other Furniture</font>');
    newdocument.write('  		</TD>');
    newdocument.write('  	<TR>');
    newdocument.write('  		<TD height="79" width="200" align="left" ><font color="#000000"> ');
    newdocument.write('  		  Name:<input type="text" name="T1" size="25"><br>');
    newdocument.write('  		  Company:<input type="text" name="T2" size="25"><br>');
    newdocument.write('  		  Phone:<input type="text" name="T5" size="14"><br>');
    newdocument.write('          Fax :&nbsp;&nbsp;&nbsp; <input type="text" name="T6" size="14"></font>');
    newdocument.write('  		</TD>');
    newdocument.write('  		<TD height="79" width="200" valign="top" >Additional notes:<textarea rows="4" name="S1" cols="20"></textarea>');
    newdocument.write('  		</TD>');
    newdocument.write('  		<TD height="93" width="200" valign="top" >');
    newdocument.write('         <font color="#000000"><select size="1" name="D1">');
    newdocument.write('  		  <option>3 Months</option>');
    newdocument.write('          <option>6 Months</option>');
    newdocument.write('          <option>9 Months</option>');
    newdocument.write('          <option>Next Year</option>');
    newdocument.write('          <option>Other</option>');
    newdocument.write('          <option selected>Time to completion</option>');
    newdocument.write('         </select></font><br>');
    newdocument.write('         Email:<input type="text" name="T4" size="25">');
    newdocument.write('         <input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2">');
    newdocument.write('  		</TD>');
    newdocument.write('</table>');
    newdocument.write('</form>');




  newdocument.close();

//newwindow.close();

return;

}

