rendered paste body<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><!-- saved from url=(0049)http://matcmadison.edu/schmidt/azure/estimate.htm --><title>Azure Isle Home</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><script language="JavaScript"> var currentScubaCharge=75; var currentGolfCharge=60; var currentRideCharge=25; function initializeForm(){ insertYear(); document.estimate.startmonth.selectedIndex = document.estimate.endmonth.selectedIndex = document.estimate.startday.selectedIndex = document.estimate.endday.selectedIndex = 0; document.estimate.people.value = 0; fieldFocus(0); } function insertYear(){ document.estimate.startyear.value = document.estimate.endyear.value = new Date().getFullYear(); } function checkForNull(fieldValue,fieldName){ if (fieldValue=="" || fieldValue==null){ alert("\nForm Error!\n\nYou must enter data in the "+fieldName+" field"); return false; } return true; } function fieldFocus(index){ document.forms[0].elements[index].select(); document.forms[0].elements[index].focus(); } function validatePeople(){ var numberOfPeople=document.forms[0].people.value; if (!checkForNull(numberOfPeople,"Number of People")){ setTimeout('fieldFocus(0)', 100); return false; } else{ if (!checkNumeric(numberOfPeople)){ alert("\nForm Error!\n\nYou must enter numeric data!"); setTimeout('fieldFocus(0)', 100); return false; } else{ if (!checkPositive(numberOfPeople)){ alert("\nForm Error!\n\nYou must enter a number greater than 0."); setTimeout('fieldFocus(0)', 100); return false; } else{ return true; } } } } function resetScubaCost(){ } function checkPositive(testField){ var stringField=String(testField); for (var sub=0; sub < stringField.length; sub++){ var singleChar = stringField.charAt(sub); if (singleChar < "0" || singleChar > "9"){ return false; } } return true; } function checkNumeric(testField){ var numField=Number(testField); if (isNaN(numField)){ result=false; } return result; } function checkScuba(){ var fieldName="Number of Scuba Divers"; var fieldValue=document.forms[0].scubacount.value; if (fieldValue=="" ||fieldValue==null){ setTimeout('fieldFocus(9)', 100); alert("\nForm Error!\n\nYou must enter data in the "+fieldName+" field"); return false; } else{ if (checkNumeric(fieldValue)){ if (fieldValue>20){ alert("\nForm Error!\n\nThe maximum number of people in a scuba party is 20"); setTimeout('fieldFocus(9)', 100); return false; } else{ scubaCost=Number(fieldValue)*currentScubaCharge; document.forms[0].scubacost.value=scubaCost; return true; } } else{ setTimeout('fieldFocus(9)', 100); alert("\nForm Error!\n\nThe number of people in the scuba party field must contain a number"); return false; } } return false; } function processStartDate(){ document.forms[0].endmonth.selectedIndex = document.forms[0].startmonth.selectedIndex; document.forms[0].endday.selectedIndex = document.forms[0].startday.selectedIndex; var now = new Date(); var currentYear = now.getFullYear(); var currentMonth = now.getMonth(); var currentDay = now.getDate(); var selectedMonth = document.forms[0].startmonth.selectedIndex; var selectedDay = document.forms[0].startday.selectedIndex + 1; if (selectedMonth <= currentMonth){ if (selectedDay < currentDay){ currentYear += 1; } } document.forms[0].startyear.value = currentYear; document.forms[0].endyear.value = currentYear; return true; } function checkGolf(){ var fieldName="Number of Golfers"; var fieldValue=document.forms[0].golfcount.value; if (fieldValue=="" ||fieldValue==null){ setTimeout('fieldFocus(11)', 100); alert("\nForm Error!\n\nYou must enter data in the "+fieldName+" field"); return false; } else{ if (checkNumeric(fieldValue)){ if (fieldValue>20){ setTimeout('fieldFocus(11)', 100); alert("\nForm Error!\n\nThe maximum number of people in a golfing party is 20"); return false; } else{ golfCost=Number(fieldValue)*currentGolfCharge; document.forms[0].golfcost.value=golfCost; return true; } } else{ setTimeout('fieldFocus(11)', 100); alert("\nForm Error!\n\nThe number of people in the golf party field must contain a number"); return false; } } return false; } function resetGolfCost(){ } function checkRide(){ } function resetRideCost(){ } function calcDays(){ var startDate = new Date(document.forms[0].startyear.value, document.forms[0].startmonth.selectedIndex, document.forms[0].startday.selectedIndex + 1); var endDate = new Date(document.forms[0].endyear.value, document.forms[0].endmonth.selectedIndex, document.forms[0].endday.selectedIndex + 1); if (startDate <= endDate){ document.forms[0].totaldays.value = getDifferenceInDays(startDate,endDate); } } function getDifferenceInDays(s, e){ var one_day = 86400000; return Math.ceil( (e.getTime() - s.getTime()) / one_day); } function checkEmail(){ } function calculateTotal(){ var basicCharge=Number(document.forms[0].basiccharge.value); } function validateForm(){ var validForm=true; validForm = validatePeople() && calcDays() && checkScuba() && checkGolf() && checkRide() && checkEmail(); if (validForm){ calculateTotal(); } return validForm; } function buildCookie(){ var people=document.estimate.people.value; var startingMonth=document.forms[0].startmonth.options[document.forms[0].startmonth.selectedIndex].value; var startingDay=document.forms[0].startday.options[document.forms[0].startday.selectedIndex].value; var startingYear=document.forms[0].startyear.value; var startingDate=startingMonth+" "+startingDay+", "+startingYear; var endingMonth=document.forms[0].endmonth.options[document.forms[0].endmonth.selectedIndex].value; var endingDay=document.forms[0].endday.options[document.forms[0].endday.selectedIndex].value; var endingYear=document.forms[0].endyear.value; var endingDate=endingMonth+" "+endingDay+", "+endingYear; var totalDays=document.estimate.totaldays.value; var basicCharge=document.estimate.basiccharge.value; var scubaCount=document.estimate.scubacount.value; var golfCount=document.estimate.golfcount.value; var rideCount=document.estimate.ridecount.value; var scubaCost=document.estimate.scubacost.value; var golfCost=document.estimate.golfcost.value; var rideCost=document.estimate.ridecost.value; var totalCost=document.estimate.totalcost.value; var email=document.estimate.email.value; var formData=people + "/" + startingDate + "/" + endingDate + "/" + totalDays + "/" + basicCharge + "/" + scubaCount + "/" + scubaCost + "/" + golfCount + "/" + golfCost + "/" + rideCount + "/" + rideCost + "/" + totalCost + "/" + email; <!-- create the cookie text here //--> <!-- escape the cookie text here //--> <!-- write the cookie here //--> }</script><meta content="MSHTML 5.50.4930.1700" name="GENERATOR"></head><body bgcolor="#ffffff" link="#0000ff" text="#000000" onLoad="initializeForm()"><center><table border="0" cellpadding="5" cellspacing="0" width="100%"> <tbody> <tr> <td><img alt="Island palm" src="estimate_files/palmtree.html" height="112" width="94"></td> <td> <center><img alt="Azure Isle Logo" src="estimate_files/azure14.html" height="86" width="528"> </center></td> <td><img alt="Polly the parrot" src="estimate_files/parroth.html" height="96" width="64"></td></tr></tbody></table><table bgcolor="#337bcc" border="0" cellpadding="3" cellspacing="0" width="100%"> <tbody> <tr> <td> <div align="center"><font face="Arial, Helvetica, sans-serif"><a href="http://matcmadison.edu/schmidt/azure/index.htm"><font color="#ffff00">Home</font></a></font></div></td> <td> <div align="center"><font face="Arial, Helvetica, sans-serif"><a href="http://matcmadison.edu/schmidt/azure/lodging.htm"><font color="#ffff00">Accommodations</font></a></font></div></td> <td> <div align="center"><font face="Arial, Helvetica, sans-serif"><a href="http://matcmadison.edu/schmidt/azure/activity.htm"><font color="#ffff00">Activities</font></a></font></div></td> <td> <div align="center"><font face="Arial, Helvetica, sans-serif"><a href="http://matcmadison.edu/schmidt/azure/addedatt.htm"><font color="#ffff00">Added Attractions</font></a></font></div></td> <td> <div align="center"><font face="Arial, Helvetica, sans-serif"><a href="http://matcmadison.edu/schmidt/azure/info.htm"><font color="#ffff00">Information</font></a></font></div></td></tr></tbody></table></center><div align="center"><p><br><font color="#337bcc" face="Arial, Helvetica, sans-serif" size="+2">Azure Isle Cost Estimator and Vacation Planner</font></p></div><p>Use the form below to view resort cost information and estimate the cost of the total package. Our vacation plans are all inclusive, including lodging, meals, snacks, beverages, and all the standard resort activities. Prices vary depending on the time of year, with summer being the most economical. Prices are per person, with additional costs for various packages, such as a golf outing. Children 6 years and younger are free. You may submit this form and we will verify the prices and availability for the given dates. </p><p><font color="#ff0000">Important</font>: You must click the Calculate button if you make any changes. </p><hr><form name="estimate" onreset="" onsubmit="" action="mailto:estimate@azureisle.com" method="post" enctype="multipart/form-data"><p align="center"><font color="#337bcc" face="Arial, Helvetica, sans-serif" size="+2">Cost Estimator</font> <table border="0" cellpadding="2" cellspacing="0"> <tbody> <tr> <td>Number of people</td> <td> </td> <td><input maxlength="2" size="3" value="0" name="people" onChange="validatePeople()" onFocus="fieldFocus(0)"> </td> <td width="60"> <div align="left"></div></td></tr> <tr> <td>Starting Date (Month, Day, 4 digit Year)</td> <td> </td> <td><select size="1" name="startmonth" onBlur="processStartDate()"> <option value="January" selected="selected">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option></select> <select size="1" name="startday" onBlur="processStartDate()"> <option value="1" selected="selected">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option></select> , <input maxlength="4" size="5" name="startyear" onFocus="processStartDate();fieldFocus(3)"> </td> <td> </td></tr> <tr> <td>Ending Date (Month, Day, 4 digit Year)</td> <td> </td> <td><select size="1" name="endmonth"> <option value="January" selected="selected">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option></select> <select size="1" name="endday"> <option value="1" selected="selected">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option></select> , <input maxlength="4" size="5" name="endyear" onFocus="fieldFocus(6)" onBlur="calcDays()"> </td> <td> </td></tr> <tr> <td>Total Days (enter ending year to calculate)</td> <td> </td> <td><input maxlength="2" size="3" name="totaldays" onFocus="calcDays()" onChange="calcDays()"> </td> <td> </td></tr> <tr> <td colspan="2">Basic charge, including all meals (calculated) </td> <td><input maxlength="10" size="10" name="basiccharge" onFocus="validatePeople();calcDays()" onChange="validatePeople();calcDays();document.forms[0].scubacount.focus();"> </td> <td> </td></tr> <tr> <td colspan="3"> <div align="left"><font color="#337bcc" face="Arial, Helvetica, sans-serif">Additional Activities</font></div></td> <td> </td></tr> <tr> <td>Scuba Adventure - Enter the number of people</td> <td><input onFocus="this.select()" maxlength="2" onBlur="checkScuba()" size="3" value="0" name="scubacount"> </td> <td><input maxlength="10" onchange="resetScubaCost()" size="10" value="0" name="scubacost"> </td> <td> </td></tr> <tr> <td>Golf, 18 holes- Enter the number of people</td> <td><input onFocus="this.select()" maxlength="2" onBlur="checkGolf()" size="3" value="0" name="golfcount"> </td> <td><input maxlength="10" size="10" value="0" name="golfcost"> </td> <td> </td></tr> <tr> <td>Back Country Horseback Riding</td> <td><input onfocus="this.select();" maxlength="2" onchange="checkRide();" size="3" value="0" name="ridecount"> </td> <td><input maxlength="10" size="10" value="0" name="ridecost"> </td> <td> </td></tr> <tr> <td>Total cost (calculated) </td> <td> </td> <td><input maxlength="10" size="10" name="totalcost"> </td> <td> </td></tr> <tr> <td>Email Address</td> <td> </td> <td><input maxlength="40" size="40" name="email"> </td> <td> </td></tr> <tr> <td colspan="3"> <div align="center"><br><input value="Calculate" name="Button" type="button"> <input value="Reset" name="Reset" type="reset"> <input value="Print" name="print" type="button"> <input value="Submit" name="Submit" type="submit"> </div></td> <td> </td></tr></tbody></table></p><p> </p></form></body></html>