Reservation API

The following is an example of how to implement the reservation system on a website. You can modify code and design however you would like.
The example bellow includes for pages. We selected sample pages for cleaning company. You will need to create additional web pages for your website.
The flow of new pages should be the following:

1.) availPostCode.html
2.) getQuote.html (optional if desire to provide a quote online)
3.) availDates.html
4.) availForm.html

For simple implementation copy and paste code in gray into the newly created pages on your website (availPostCode.html, getQuote.html, availDates.html, availForm.html).
Don't forget to insert businessID in every page. businessID can be found in the Reservations tab after logging into the StrictManager.com account.
Verify Service Area (optional, for businesses that perform service at customer location)
availPostCode.html

Description: This code allows to verify that certain area is serviced by the company. Company should specify postal codes that are serviced.
After customer submits postal code, two outcomes will be possible:
1.) if area is not serviced show message that company is not servicing that area
2.) if area is serviced take to another reservation step (getQuote.html or availDates.html).

Variable requirements:
var businessID = ""; // enter businessID provided by StrictManager.com inside quotations



HTML Code:
Place this code inside html body (location on your webpage where you want customer to enter a post code):



<table cellpadding="2" cellspacing="0" border="0" align="center">
<tr>
<td class="text" align="middle" colspan="2" style="color:#F00;"><strong><div id="messageDiv"></div></strong><br></td>
</tr>
<tr>
<td class="text" align="right"><strong>Zip Code Check &nbsp;</strong></td>
<td class="text"><input type="text" id="postCode" name="postCode" size="10" maxlength="5" value="" onkeypress="handleKeyPress(event)"/><br></td>
</tr>
<tr>
<td colspan="2" align="center"><input type='hidden' value='' id='optionalVal' /> <br /> <input type='button' class='monthButton' value='Submit' onclick='checkPostCode()' /></td>
</tr>
<tr>
<td colspan="2" align="center" style="font-size:10px; color:#333"><br /><br />Reservations & Scheduling by <a href="https://www.StrictManager.com" style="font-size:10px; color:#00F">StrictManager.com</a></td>
</tr>
</table>



JavaScript Code:
Insert businessID and place this code at the end of the page, after </html>:



<script type="text/javascript">

var businessID = ""; // enter businessID provided by StrictManager.com

document.getElementById('postCode').focus();

function checkPostCode(optionalVal){
var postCode = document.getElementById('postCode').value;
var optionalVal = document.getElementById('optionalVal').value;
postCode = postCode.trim();
if(postCode.length > 0){
var xmlhttp = new XMLHttpRequest();
var url = "https://strictmanager.com/busav/checkPostCodes.php?id="+businessID+"&postCode="+postCode;
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var myRes = JSON.parse(xmlhttp.responseText);
if(myRes=='Y'){
window.location.href = "getQuote.html?postCode="+postCode+"&optionalVal="+optionalVal;
//window.location.href = "availDates.html?postCode="+postCode+"&optionalVal="+optionalVal;
}else if(myRes=='N'){
document.getElementById('messageDiv').innerHTML = "Unfortunately we don't service this area!";
}else{
document.getElementById('messageDiv').innerHTML = "Couldn't verify information, try later!";
}
}
}
xmlhttp.open("GET", url, true);
xmlhttp.send();
}else{
document.getElementById('messageDiv').innerHTML = "Please enter post code!";
}
}

function handleKeyPress(e){
var key=e.keyCode || e.which;
if (key==13){
checkPostCode();
}
}

</script>


<style>
.monthButton {
background-color:#0066CC;
-moz-border-radius:7px;
-webkit-border-radius:7px;
border-radius:7px;
border:1px solid #B2D1F0;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:16px;
padding:4px 4px;
text-decoration:none;
text-shadow:0px 0px 0px #2f6627;
min-width:100px;
font-weight:bold;
}
.monthButton:hover {
background-color:#99C2EB;
color:#000000;
}
.monthButton:active {
position:relative;
top:1px;
}
</style>
Provide with a Quote (optional)
getQuote.html (optional)

Description: This code allows to input different values and provide the quote. You can pass quote and input values to availDates.html page with $_GET.
Example bellow is for residential cleaning company, you can modify values and code for other types of businesses.

Variable requirements:
var businessID = ""; // enter businessID provided by StrictManager.com inside quotations



HTML Code:
Place this code inside html body (location on your webpage where you want customer to input different values):

<table align="center" border="0" cellpadding="5" cellspacing="12">
<tbody>
<tr><td align="center" class="formtext" colspan="2" style="color:#F00"><strong><div id="error_msg"></div></strong></td></tr>
<tr>
<td align="right" class="formtext">* Select Cleaning Type &nbsp;</td>
<td class="formtext">
<select name="cleantype" onChange="value_changed()">
<option value="0">Select Cleaning Type</option>
<option value="recurring">Recurring Cleanings</option>
<option value="move_in_out">Move In/ Move Out</option>
<option value="one_time">One Time Cleaning</option>
</select>
</td>
</tr>

<tr>
<td align="right" class="formtext">* Select Residence &nbsp;</td>
<td class="formtext">
<select name="residence" onChange="value_changed()">
<option value="0">Select Residence</option>
<option value="apartment">One Level Apartment</option>
<option value="house">House/ Townhouse/ Other</option>
</select>
</td>
</tr>

<tr>
<td align="right" class="formtext">* Select Aproximate Square Footage &nbsp;</td>
<td class="formtext">
<select name="sq_footage" onChange="value_changed()">
<option value="0">Select Sq. Footage</option>
<option value="700">Under 800 (Small & Medium Apartment)</option>
<option value="1000">800 - 1200 (Med/Lg Apt OR Small House)</option>
<option value="1400">1200 - 1600 (Large Apt OR Sm/Med House)</option>
<option value="1900">1600 - 2200 (Medium House)</option>
<option value="2500">2200 - 3000 (Medium & Large House)</option>
<option value="3500">3000 - 4500 (Large House)</option>
<option value="5000">4500 &amp; above (Very Large House)</option>
</select>
</td>
</tr>

<tr>
<td align="right" class="formtext">* Select Number of Bathrooms &nbsp;</td>
<td class="formtext">
<select name="bathrooms" onChange="value_changed()">
<option value="0">Select Number of Bathrooms</option>
<option value="1">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>
</select>
</td>
</tr>

<tr>
<td align="right" class="formtext">* Select Number of Bedrooms &nbsp;</td>
<td class="formtext">
<select name="bedrooms" onChange="value_changed()">
<option value="0">Select Number of Bedrooms</option>
<option value="1">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>
</select>
</td>
</tr>

<tr>
<td align="right" class="formtext">* Do you have pets &nbsp;</td>
<td class="formtext">
<select name="pets" onChange="value_changed()">
<option value="0">Select Pets</option>
<option value="N">No Pets</option>
<option value="1">Cat(s)</option>
<option value="1">Dog(s)</option>
<option value="2">Cat(s) &amp; Dog(s)</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center"> <input type='button' class='monthButton' value='Get Quote' id='quote_butt' onclick='get_quote()' /></div>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<tr>
<td colspan="2" align="center">
<div id="quote_results"></div>
<div id="recurring_quote_results"></div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center"> <input type='button' class='monthButton' value='Start Reservation' id='res_butt' onclick='start_reservation()' /></div>
</td>
</tr>
<tr>
<td colspan="2" align="center" style="font-size:10px; color:#333"><br /><br />Reservations & Scheduling by <a href="https://www.StrictManager.com" style="font-size:10px; color:#00F">StrictManager.com</a></td>
</tr>
</tbody>
</table>


JavaScript Code:
Insert businessID and place this code at the end of the page, after </html>:

<script type="text/javascript">
// businessID and general calendar settings
var businessID = ""; // eneter busnessID provided by StrictManager.com

var show_1_emp,
show_2_emp,
show_3_emp,
show_4_emp,
web_after_one,
web_after_rec,
web_after_move,
cust_input,
cleantype,
q_text;
var price = 0;
var time = 0;

var xmlhttp = new XMLHttpRequest();
//var url = "https://strictmanager.com/busav/avail.php?id="+businessID+"&date="+date;
var url = "https://strictmanager.com/busav/getCleaningVal.php?id="+businessID;

xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var myArr = JSON.parse(xmlhttp.responseText);
show_1_emp = myArr.show_1_emp;
show_2_emp = myArr.show_2_emp;
show_3_emp = myArr.show_3_emp;
show_4_emp = myArr.show_4_emp;
web_after_one = myArr.web_after_one;
web_after_rec = myArr.web_after_rec;
web_after_move = myArr.web_after_move;
document.getElementById('calendar').className -= ' overlay';
}

}
xmlhttp.open("GET", url, true);
xmlhttp.send();





document.getElementById('res_butt').style.visibility = "hidden"
var postCode = getUrlVars()['postCode'],
optionalVal = getUrlVars()['optionalVal'];
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}






var cleantype =document.getElementsByName('cleantype')[0].value,
residence=document.getElementsByName('residence')[0].value,
sq_footage=document.getElementsByName('sq_footage')[0].value,
bathrooms=document.getElementsByName('bathrooms')[0].value,
bedrooms=document.getElementsByName('bedrooms')[0].value,
pets=document.getElementsByName('pets')[0].value;
var calculated = 0;

function value_changed(){
if(calculated==1){get_quote()}
}

function get_quote(){
document.getElementById('quote_results').innerHTML = "";
document.getElementById('recurring_quote_results').innerHTML = "";
document.getElementById("error_msg").innerHTML = "";
document.getElementById('res_butt').style.visibility = "hidden";
document.getElementsByName('cleantype')[0].className -= ' backRed';
document.getElementsByName('residence')[0].className -= ' backRed';
document.getElementsByName('sq_footage')[0].className -= ' backRed';
document.getElementsByName('bathrooms')[0].className -= ' backRed';
document.getElementsByName('bedrooms')[0].className -= ' backRed';
document.getElementsByName('pets')[0].className -= ' backRed';


cleantype =document.getElementsByName('cleantype')[0].value;
var residence=document.getElementsByName('residence')[0].value,
sq_footages=document.getElementsByName('sq_footage')[0].value,
sq_footage = Number(sq_footages);
bathroomss=document.getElementsByName('bathrooms')[0].value,
bathrooms=Number(bathroomss),
bedroomss=document.getElementsByName('bedrooms')[0].value,
bedrooms=Number(bedroomss),
pets=document.getElementsByName('pets')[0].value;
cust_input = "Clean type: "+cleantype+"; Residence: "+residence+"; Sq. Footage: " + sq_footages + "; Bathrooms: " + bathroomss + "; Bedrooms: " + bedroomss + "; Pets: " + pets;
var bVal = 0;
if(cleantype=="0"){
document.getElementsByName('cleantype')[0].className += ' backRed';
bVal = 1;
}
if(residence=="0"){
document.getElementsByName('residence')[0].className += ' backRed';
bVal = 1;
}
if(sq_footage==0){
document.getElementsByName('sq_footage')[0].className += ' backRed';
bVal = 1;
}
if(bathrooms==0){
document.getElementsByName('bathrooms')[0].className += ' backRed';
bVal = 1;
}
if(bedrooms==0){
document.getElementsByName('bedrooms')[0].className += ' backRed';
bVal = 1;
}
if(pets=='0'){
document.getElementsByName('pets')[0].className += ' backRed';
bVal = 1;
}


if(bVal==0){
calculated = 1;

document.getElementById('res_butt').style.visibility = "visible";
if(cleantype=="one_time"||cleantype=="recurring"){
var base_o = 40,
min_charge_o = 80,
hour_charge_o = 20,
avg_apt_price_o = 150,
avg_house_price_o = 180,
avg_apt_time_o = 5,
avg_house_time_o = 7,
average_importance_apt_o = 0.5,
average_importance_house_o = 0.6,
//average_time_importance_apt_o = 0.4,
//average_time_importance_house_o = 0.6,
sq_feet_time_o = .1,
kitchen_time_o = 1.5,
bath_time_o = 1,
bed_time_o = .5,
pet_time_o = .05;
var bathroom_aprox_size = 50;
var bedroom_aprox_size = 150;

time = (sq_footage/100) * sq_feet_time_o;
time = time + kitchen_time_o;
time = time + (bathrooms*bath_time_o);
time = time + (bedrooms*bed_time_o);
area_wo_bb = sq_footage - (bathrooms*bathroom_aprox_size) - (bedrooms*bedroom_aprox_size);
time = time + ((area_wo_bb/100)*sq_feet_time_o);

if(pets!='N'){
time = time + ((area_wo_bb/100)*pet_time_o);
}


price = base_o + time*hour_charge_o;


if(residence=='apartment'){
price = (price*(1-average_importance_apt_o) + avg_apt_price_o*average_importance_apt_o);
time = (time*(1-average_importance_apt_o) + avg_apt_time_o*average_importance_apt_o);
}else{
price = (price*(1-average_importance_house_o) + avg_house_price_o*average_importance_house_o);
time = (time*(1-average_importance_house_o) + avg_house_time_o*average_importance_house_o);
}
if(price < min_charge_o){price = min_charge_o;}
price = 5 * Math.round(price/5);
time = .5*Math.round(time/.5);
//cust_input = cust_input + " Total hours: " + time.toString();

//<div id="quote_results"></div>
if(price < min_charge_o){price = min_charge_o;}
var text_o,
o_e = 0;
if(cleantype=="recurring"){
text_o = "<strong>First Time Cleaning Price: $"+price+"</strong><br>";
}else{
text_o = "<strong>Price: $"+price+"</strong><br>";
}
if(show_1_emp=="Y"){
text_o = text_o + "for up to "+time+" hours for 1 person crew<br>"
o_e = 1;
}
if(show_2_emp=="Y"){
var time2 = time/2;
time2 = .25*Math.round(time2/.25);
var time2text;
if((time2/.5)% 1 == 0){
time2text = time2.toString() + " hours";
}else{
time2h = Math.floor(time2);
time2m = time2 - time2h;
// here we round up 15 minutes to 30 minutes and 45 minutes to an hour.
if(time2m == .25){var minute_text = " 30 minutes"; time2text = time2h.toString()+ " hours" + minute_text;}
if(time2m == .75){time2h = time2h + 1; time2text = time2h.toString()+ " hours";}
}
text_o = text_o + "for up to "+time2text+" for 2 person crew<br>"
o_e = 1;
}
if(show_3_emp=="Y"){
var time3 = time/3;
time3 = .25*Math.round(time3/.25);
var time3text;
if((time3/.5)% 1 == 0){
time3text = time3.toString() + " hours";
}else{
time3h = Math.floor(time3);
time3m = time3 - time3h;
var minute_text;
// here we round up 15 minutes to 30 minutes and 45 minutes to an hour.
if(time3m == .25){ minute_text = " 15 minutes";}
if(time3m == .75){ minute_text = " 45 minutes";}
time3text = time3h.toString()+ " hours" + minute_text;
}
text_o = text_o + "for up to "+time3text+" for 3 person crew<br>"
o_e = 1;
}
if(show_4_emp=="Y"){
var time4 = time/4;
time4 = .25*Math.ceil(time4/.25);
var time4text;
if((time4/.5)% 1 == 0){
time4text = time4.toString() + " hours";
}else{
time4h = Math.floor(time4);
time4m = time4 - time4h;
var minute_text;
// here we round up 15 minutes to 30 minutes and 45 minutes to an hour.
if(time4m == .25){ minute_text = " 15 minutes";}
if(time4m == .75){ minute_text = " 45 minutes";}
time4text = time4h.toString()+ " hours" + minute_text;
}
text_o = text_o + "for up to "+time4text+" for 4 person crew<br>"
o_e = 1;
}
if(o_e==0){
text_o = text_o + "for up to "+time+" hours for 1 person crew<br>"
}
q_text = text_o;

text_o = text_o + web_after_one;
document.getElementById('quote_results').innerHTML = text_o;
if(cleantype=="recurring"){
//<div id="recurring_quote_results"></div>

//////////////////////////////////////////////////////////////
/////////////////recurring calculations///////////////////////
//////////////////////////////////////////////////////////////





var base_r = 40,
hour_charge_r = 20,
avg_apt_price_r = 80,
avg_house_price_r = 130,
avg_apt_time_r = 3,
avg_house_time_r = 5,
average_importance_apt_r = 0.3,
average_importance_house_r = 0.6,
//average_time_importance_apt_o = 0.4,
//average_time_importance_house_o = 0.6,
sq_feet_time_r = .05,
kitchen_time_r = .5,
bath_time_r = 0.5,
bed_time_r = .3,
pet_time_r = .05;
bi_weekly_addon = 1.2;
monthly_addon = 1.5;
var bathroom_aprox_size = 50;
var bedroom_aprox_size = 150;

var time_w = (sq_footage/100) * sq_feet_time_r;
time_w = time_w + kitchen_time_r;
time_w = time_w + (bathrooms*bath_time_r);
time_w = time_w + (bedrooms*bed_time_r);
area_wo_bb = sq_footage - (bathrooms*bathroom_aprox_size) - (bedrooms*bedroom_aprox_size);
time_w = time_w + ((area_wo_bb/100)*sq_feet_time_r);

if(pets!='N'){
time_w = time_w + ((area_wo_bb/100)*pet_time_r);
}
var price_w = base_r + time_w*hour_charge_r;
//var time_bi = time_w*bi_weekly_addon;
//var time_mo = time_w*monthly_addon;
var price_bi = price_w*bi_weekly_addon;
var price_mo = price_w*monthly_addon;



if(residence=='apartment'){
price_w = (price_w*(1-average_importance_apt_r) + avg_apt_price_r*average_importance_apt_r);
//time_w = (time_w*(1-average_importance_apt_r) + avg_apt_time_r*average_importance_apt_r);

price_bi = (price_bi*(1-average_importance_apt_r) + avg_apt_price_r*average_importance_apt_r);
//time_bi = (time_bi*(1-average_importance_apt_r) + avg_apt_time_r*average_importance_apt_r);

price_mo = (price_mo*(1-average_importance_apt_r) + avg_apt_price_r*average_importance_apt_r);
//time_mo = (time_mo*(1-average_importance_apt_r) + avg_apt_time_r*average_importance_apt_r);

}else{
price_w = (price_w*(1-average_importance_house_r) + avg_house_price_r*average_importance_house_r);
//time_w = (time_w*(1-average_importance_house_r) + avg_house_time_r*average_importance_house_r);

price_bi = (price_bi*(1-average_importance_house_r) + avg_house_price_r*average_importance_house_r);
//time_bi = (time_bi*(1-average_importance_house_r) + avg_house_time_r*average_importance_house_r);

price_mo = (price_mo*(1-average_importance_house_r) + avg_house_price_r*average_importance_house_r);
//time_mo = (time_mo*(1-average_importance_house_r) + avg_house_time_r*average_importance_house_r);
}


price_w = 5 * Math.round(price_w/5);
//time_w = .5*Math.round(time_w/.5);
price_bi = 5 * Math.round(price_bi/5);
//time_bi = .5*Math.round(time_bi/.5);
price_mo = 5 * Math.round(price_mo/5);
//time_mo = .5*Math.round(time_mo/.5);
var text_r;
text_r = "<br>Weekly Price: $" + price_w+"<br>Bi-weekly Price: $" + price_bi+ "<br>Monthly Price: $" + price_mo+"<br>";
text_r = text_r + web_after_rec;

//<div id="quote_results"></div>
document.getElementById('recurring_quote_results').innerHTML = text_r;




//////////////////////////////////////////////////////////////
/////////////////end recurring calculations///////////////////
//////////////////////////////////////////////////////////////


}// end recurring
}else if(cleantype=="move_in_out"){


var base_m = 80,
min_charge_m = 80,
hour_charge_m = 20,
avg_apt_price_m = 150,
avg_house_price_m = 180,
avg_apt_time_m = 5,
avg_house_time_m = 7,
average_importance_apt_m = 0.5,
average_importance_house_m = 0.6,
//average_time_importance_apt_o = 0.4,
//average_time_importance_house_o = 0.6,
sq_feet_time_m = .1,
kitchen_time_m = 1.5,
bath_time_m = 1.5,
bed_time_m = .5;
var bathroom_aprox_size = 50;
var bedroom_aprox_size = 150;

time = (sq_footage/100) * sq_feet_time_m;
time = time + kitchen_time_m;
time = time + (bathrooms*bath_time_m);
time = time + (bedrooms*bed_time_m);
area_wo_bb = sq_footage - (bathrooms*bathroom_aprox_size) - (bedrooms*bedroom_aprox_size);
time = time + ((area_wo_bb/100)*sq_feet_time_m);




price = base_m + time*hour_charge_m;


if(residence=='apartment'){
price = (price*(1-average_importance_apt_m) + avg_apt_price_m*average_importance_apt_m);
time = (time*(1-average_importance_apt_m) + avg_apt_time_m*average_importance_apt_m);
}else{
price = (price*(1-average_importance_house_m) + avg_house_price_m*average_importance_house_m);
time = (time*(1-average_importance_house_m) + avg_house_time_m*average_importance_house_m);
}

price = 5 * Math.round(price/5);
time = .5*Math.round(time/.5);
cust_input = cust_input + "; Total hours: " + time.toString();

if(price < min_charge_m){price = min_charge_m;}
//<div id="quote_results"></div>

var text_m,
o_e = 0;
text_m = "<strong>Price: $"+price+"</strong><br>";
if(show_1_emp=="Y"){
text_m = text_m + "for up to "+time+" hours for 1 person crew<br>"
o_e = 1;
}
if(show_2_emp=="Y"){
var time2 = time/2;
time2 = .25*Math.round(time2/.25);
var time2text;
if((time2/.5)% 1 == 0){
time2text = time2.toString() + " hours";
}else{
time2h = Math.floor(time2);
time2m = time2 - time2h;
// here we round up 15 minutes to 30 minutes and 45 minutes to an hour.
if(time2m == .25){var minute_text = " 30 minutes"; time2text = time2h.toString()+ " hours" + minute_text;}
if(time2m == .75){time2h = time2h + 1; time2text = time2h.toString()+ " hours";}
}
text_m = text_m + "for up to "+time2text+" for 2 person crew<br>"
o_e = 1;
}
if(show_3_emp=="Y"){
var time3 = time/3;
time3 = .25*Math.round(time3/.25);
var time3text;
if((time3/.5)% 1 == 0){
time3text = time3.toString() + " hours";
}else{
time3h = Math.floor(time3);
time3m = time3 - time3h;
var minute_text;
// here we round up 15 minutes to 30 minutes and 45 minutes to an hour.
if(time3m == .25){ minute_text = " 15 minutes";}
if(time3m == .75){ minute_text = " 45 minutes";}
time3text = time3h.toString()+ " hours" + minute_text;
}
text_m = text_m + "for up to "+time3text+" for 3 person crew<br>"
o_e = 1;
}
if(show_4_emp=="Y"){
var time4 = time/4;
time4 = .25*Math.ceil(time4/.25);
var time4text;
if((time4/.5)% 1 == 0){
time4text = time4.toString() + " hours";
}else{
time4h = Math.floor(time4);
time4m = time4 - time4h;
var minute_text;
// here we round up 15 minutes to 30 minutes and 45 minutes to an hour.
if(time4m == .25){ minute_text = " 15 minutes";}
if(time4m == .75){ minute_text = " 45 minutes";}
time4text = time4h.toString()+ " hours" + minute_text;
}
text_m = text_m + "for up to "+time4text+" for 4 person crew<br>"
o_e = 1;
}
if(o_e==0){
text_m = text_m + "for up to "+time+" hours for 1 person crew<br>"
}
q_text = text_m;

text_m = text_m + web_after_move;
document.getElementById('quote_results').innerHTML = text_m;

}



}else{
document.getElementById("error_msg").innerHTML = "Fields marked in red are incorrect!";
}


}

function start_reservation(){
cust_input = cust_input + "; Price: " + price;
window.location.href = "availDates.html?postCode="+postCode+"&charge="+price+"&time_hr="+time+"&optionalVal="+encodeURIComponent(cust_input)+"&optionalVal1="+encodeURIComponent(cleantype)+"&optionalVal2="+encodeURIComponent(q_text);
}







</script>

<style>
.monthButton {
background-color:#0066CC;
-moz-border-radius:7px;
-webkit-border-radius:7px;
border-radius:7px;
border:1px solid #B2D1F0;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:16px;
padding:4px 4px;
text-decoration:none;
text-shadow:0px 0px 0px #2f6627;
min-width:100px;
font-weight:bold;
}
.monthButton:hover {
background-color:#99C2EB;
color:#000000;
}
.monthButton:active {
position:relative;
top:1px;
}
.backRed{
background-color:#FF8282
}
</style>
Calendar (required)
availDates.html

Description: This code shows calendar with available reservation dates and times.

Variable requirements:
var businessID = ""; // enter businessID provided by StrictManager.com inside quotations
var block_today = 'Y'; // 'Y' for disallowing reservation for current day.
var number_of_months_in_future = 'A'; // value shoud be 'A' for all months or positive number (1+) for specific number of months that will show on the calendar.



HTML Code:
Place this code inside html body (location on your webpage where you want customer to enter a post code):

<div id="calendar"></div>
<br />
<div align="center" style="font-size:10px; color:#333"><br />Reservations & Scheduling by <a href="https://www.StrictManager.com" style="font-size:10px; color:#00F">StrictManager.com</a></div>


JavaScrip Code:
Insert businessID (provided by StrictManager.com) in quatation marks and place this code at the bottom of source file (after </html>):

<script type="text/javascript">

// businessID and general calendar settings
var businessID = ""; // enter businessID provided by StrictManager.com
var block_today = 'Y'; // 'Y' for disallowing reservation for current day.
var number_of_months_in_future = 'A'; // value shoud be 'A' for all months or positive number (1+).

var postCode = getUrlVars()['postCode'];
var charge = getUrlVars()['charge'];
var time_hr = getUrlVars()['time_hr'];
var optionalVal = decodeURIComponent(getUrlVars()['optionalVal']);
var optionalVal1 = decodeURIComponent(getUrlVars()['optionalVal1']);
var optionalVal2 = decodeURIComponent(getUrlVars()['optionalVal2']);
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}
if(!postCode){
postCode="__";
}
//////////////////////////////////////////////
////////////BUILD CALENDAR////////////////////
//////////////////////////////////////////////

var mdays = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var todayd = new Date();
var dd = todayd.getDate();
var mm = todayd.getMonth()+1; //January is 0!
var yyyy = todayd.getFullYear();
if(dd<10) {
dd='0'+dd
}
if(mm<10) {
mm='0'+mm
}
today = yyyy+'-'+mm+'-'+dd;
build_cal(today, block_today);
getData(today);

function build_cal(date, currentMonth){
var cal = "";
var year = date.substring(0,4),
month = Number(date.substring(5,7)),
day = Number(date.substring(8,10)),
date = new Date(year,month-1,day),
days_in_month = new Date(year,month,0).getDate(),
title = mdays[month-1],
//wdays = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
//day_of_week = wdays[date.getDay()];
blank = new Date(year,month-1,1).getDay();
var ddf = day;
var mmf = month;
if(ddf<10) {
ddf='0'+ddf
}
if(mmf<10) {
mmf='0'+mmf
}
var form_day = year+'-'+mmf+'-'+ddf;
if(month==12){
var next_mo_title = mdays[0];
}else{
var next_mo_title = mdays[month];
}
cal = cal+"<table border=0 width='100%' align='middle' bgcolor='#EBEBEB'>";
cal = cal+"<tr><th colspan=2 style='text-align:left;'><div id='prev_mo'></div></th><th colspan=3 style='font-family:Arial;'><font size='5'>"+title+" "+year+"</font></th><th colspan=2 style='text-align:right;'><div id='next_mo'><input type='button' class='monthButton' value='"+next_mo_title+" >>' id='next_mo_b' onclick=next_mo('"+form_day+"') /></div></th></tr>";

cal = cal+"<tr><td width='14%' align='center' class='week_day'>Sunday</td><td width='14%' align='center' class='week_day'>Monday</td><td width='14%' align='center' class='week_day'>Tuesday</td><td width='14%' align='center' class='week_day'>Wednesday</td><td width='14%' align='center' class='week_day'>Thursday</td><td width='14%' align='center' class='week_day'>Friday</td><td width='14%' align='center' class='week_day'>Saturday</td></tr><tr>";
var day_count = 1;
while (blank > 0){
cal = cal+"<td></td>";
blank = blank-1;
day_count++;
}
for(day_num=1;day_num<=days_in_month;day_num++){
if (day>day_num){
cal = cal + "<td width='14%' align='center' align='center' valign='top' bgcolor='#D0D0D0' min-height='100'>";
cal = cal + "<div style='min-height:100px'>";
cal = cal + "<font class='week_day'>";
cal = cal + title;
cal = cal + " ";
cal = cal + day_num;
cal = cal + "</font></div>";
// THIS PART UNCOMMENT IF PREFER TO BLOCK CURRENT DAY
}else if (day==day_num&&currentMonth=='Y'){
cal = cal + "<td width='14%' align='center' align='center' valign='top' bgcolor='#D0D0D0' min-height='100'>";
cal = cal + "<div style='min-height:100px'>";
cal = cal + "<font class='week_day'>";
cal = cal + title;
cal = cal + " ";
cal = cal + day_num;
cal = cal + "</font></div>";
// END UNCOMMENT PART IF PREFER TO BLOCK CURRENT DAY
}else{
cal = cal + "<td width='14%' align='center' valign='top' min-height='100'>";
cal = cal + "<div id='" + month + "_" + day_num + "' style='background-color:#FF9999;display:inline-block;height:100%;width:100%;min-height:100px;'>";
cal = cal + "<font class='week_day'>";
cal = cal + title;
cal = cal + " ";
cal = cal + day_num;
cal = cal + "</font>";
cal = cal + "<div id='" + month + "_" + day_num + "AM' style='padding:2px 2px;min-height:30px;'></div>"
cal = cal + "<div id='" + month + "_" + day_num + "PM' style='padding:2px 2px;min-height:30px;'></div>"
cal = cal + "</div>";
}
cal = cal + "</td>";
day_count++;
//Make sure we start a new row every week
if(day_count > 7){
cal = cal + "</tr><tr>";
day_count = 1;
}
}
document.getElementById('calendar').innerHTML = cal;
}


function next_mo(date){
var year = date.substring(0,4),
month = Number(date.substring(5,7)),
day = Number(date.substring(8,10)),
date = new Date(year,month,01);

if(number_of_months_in_future=='A'){
future_month(date, month);
}else{
var cch_date = new Date();
number_of_months = Number(number_of_months_in_future),
cch_date.setMonth(cch_date.getMonth() + number_of_months);
if(cch_date){
if(cch_date<date){
//var prev_mo_title = mdays[month-1],
if(month==0){
var prev_mo_title = mdays[11];
}else{
var prev_mo_title = mdays[month-1];
}
if(month==12){
var title = mdays[0];
}else{
var title = mdays[month];
}
dd = date.getDate(),
mm = date.getMonth()+1, //January is 0!
yyyy = date.getFullYear();
if(dd<10){dd='0'+dd}
if(mm<10){mm='0'+mm}
new_date = yyyy+'-'+mm+'-'+dd;
var cal = "<table border=0 width='100%' align='middle' bgcolor='#EBEBEB'>";
cal = cal+"<tr><th colspan=2 style='text-align:left;'><div id='prev_mo'><input type='button' class='monthButton' value='<< "+prev_mo_title+"' id='next_mo_b' onclick=prev_mo('"+new_date+"') /></div></th><th colspan=3 style='font-family:Arial;'><font size='5'>"+title+" "+year+"</font></th><th colspan=2 style='text-align:right;min-width:100;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></th></tr><tr height=600><td colspan=7 style='text-align:center;font-family:Arial;font-size:16px;font-weight:bold;'>Availability not posted for the month of "+title+".</td></tr></table>";
document.getElementById('calendar').innerHTML = cal;
}else{
future_month(date, month);
}
}else{
future_month(date, month);
}
}
}


function future_month(date, month){
dd = date.getDate(),
mm = date.getMonth()+1, //January is 0!
yyyy = date.getFullYear();
if(dd<10){dd='0'+dd}
if(mm<10){mm='0'+mm}
new_date = yyyy+'-'+mm+'-'+dd;
build_cal(new_date);
getData(new_date);
var prev_mo_title = mdays[month-1];
var val = "<input type='button' class='monthButton' value='<< "+prev_mo_title+"' id='next_mo_b' onclick=prev_mo('"+new_date+"') />";
document.getElementById('prev_mo').innerHTML = val;
}


function prev_mo(date){
var year = date.substring(0,4),
month = Number(date.substring(5,7)),
day = Number(date.substring(8,10)),
date = new Date(year,month-2,01);
var curr_date = new Date();
if(curr_date>date){
date = curr_date;
dd = date.getDate(),
mm = date.getMonth()+1, //January is 0!
yyyy = date.getFullYear();
if(mm==1){
var prev_mo_title = mdays[11];
}else{
var prev_mo_title = mdays[mm-2];
}
if(dd<10){dd='0'+dd}
if(mm<10){mm='0'+mm}
new_date = yyyy+'-'+mm+'-'+dd;
build_cal(today, block_today);
getData(new_date);
document.getElementById('prev_mo').innerHTML = "";
}else{
dd = date.getDate(),
mm = date.getMonth()+1, //January is 0!
yyyy = date.getFullYear();
if(mm==1){
var prev_mo_title = mdays[11];
}else{
var prev_mo_title = mdays[mm-2];
}
if(dd<10){dd='0'+dd}
if(mm<10){mm='0'+mm}
new_date = yyyy+'-'+mm+'-'+dd;
build_cal(new_date);
getData(new_date);
var val = "<input type='button' class='monthButton' value='<< "+prev_mo_title+"' id='next_mo_b' onclick=prev_mo('"+new_date+"') />";
document.getElementById('prev_mo').innerHTML = val;
}
}


//////////////////////////////////////////////
////////////END BUILD CALENDAR////////////////
//////////////////////////////////////////////

function getData(date){
document.getElementById('calendar').className += ' overlay';
var xmlhttp = new XMLHttpRequest();
//var url = "https://strictmanager.com/busav/avail.php?id="+businessID+"&date="+date;
var url = "https://strictmanager.com/busav/getAvail.php?id="+businessID+"&date="+date+"&postCode="+postCode;
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var myArr = JSON.parse(xmlhttp.responseText);
myFunction(myArr);
document.getElementById('calendar').className -= ' overlay';
}
}
xmlhttp.open("GET", url, true);
xmlhttp.send();

function myFunction(arr) {
var out = "";
var i;
for(i = 0; i < arr.length; i++) {
var av_st = arr[i].av_st,
z_date = arr[i].z_date,
hours = arr[i].hours,
month = Number(z_date.substring(5,7)),
day = Number(z_date.substring(8,10)),
houre = arr[i].houre,
availResvId = arr[i].availResvId,
AMPM = hours.slice(-2),
divID = month + "_" + day + AMPM;
var insert = document.getElementById(divID);
if(insert){
if(hours.charAt(0)=="0"){
hours = hours.slice(1);
}
if(houre.charAt(0)=="0"){
houre = houre.slice(1);
}
var butt = "<input type='button' act='Y' class='dayButton' value='"+hours+"-"+houre+"' month='"+month+"' day='"+day+"' id='"+availResvId+"' onclick=click_res('"+availResvId+"') />";
insert.innerHTML = insert.innerHTML + butt;
var blockID = month + "_" + day;
document.getElementById(blockID).style.backgroundColor = "#CCFFCC";
}
//style='-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;'
//out = out + '<a href="' + arr[i].z_date + '">' + arr[i].display + '</a>';
//document.getElementById("id01").innerHTML = out;
}
}
}


function click_res(availResvId){
var dayTime = document.getElementById(availResvId).value;
var month = document.getElementById(availResvId).getAttribute("month");
var day = document.getElementById(availResvId).getAttribute("day");
window.location.href = "availForm.html?rsvp="+availResvId+"&dayTime="+dayTime+"&month="+month+"&day="+day+"&charge="+charge+"&time_hr="+time_hr+"&optionalVal="+optionalVal+"&optionalVal1="+optionalVal1+"&optionalVal2="+optionalVal2;
}


</script>


<style>
.dayButton {
background-color:#007A00;
-moz-border-radius:7px;
-webkit-border-radius:7px;
border-radius:7px;
border:1px solid #18ab29;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:12px;
padding:4px 2px;
text-decoration:none;
text-shadow:0px 0px 0px #2f6627;
}
.dayButton:hover {
background-color:#99FF66;
color:#000000;
}
.dayButton:active {
position:relative;
top:1px;
}

.monthButton {
background-color:#0066CC;
-moz-border-radius:7px;
-webkit-border-radius:7px;
border-radius:7px;
border:1px solid #B2D1F0;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:16px;
padding:4px 2px;
text-decoration:none;
text-shadow:0px 0px 0px #2f6627;
min-width:100px;
font-weight:bold;
}
.monthButton:hover {
background-color:#99C2EB;
color:#000000;
}
.monthButton:active {
position:relative;
top:1px;
}
.overlay{
-webkit-filter:brightness(50%);
-moz-filter:brightness(50%);
filter: url(#brightness); /* required for FF */
filter:brightness(50%);
}
.overlay:before{
content: "Loading...";
}
.overlay:after{
content: "Loading...";
}
</style>
Customer Name & Address (required)
availForm.html

Description: This code allows to collect info about customer and automatically save into database together with reservation time.

Variable requirements:
var businessID = ""; // enter businessID provided by StrictManager.com inside quotations



HTML Code:
Place this code inside html body (location on your webpage where you want customer to enter a post code):

<p align="center">
Reservation For <span class="red_text" id="dayText">
</p>


<div id="main_body_div" align="center">

<table align="center" border="0" cellpadding="2" cellspacing="10">
<tbody>
<tr><td align="center" class="formtext" colspan="2" style="color:#F00"><strong><div id="error_msg"></div></strong></td></tr>
<tr>
<td class="formtext" align="right">* First Name &nbsp;</td>
<td class="formtext"><input name="firstname" size="25" type="text" maxlength="32" /></td>
</tr>
<tr>
<td class="formtext" align="right">* Last Name &nbsp;</td>
<td class="formtext"><input name="lastname" size="25" type="text" maxlength="32"/></td>
</tr>
<tr>
<td class="formtext" align="right">* Address &nbsp;</td>
<td class="formtext"><input name="address1" size="25" type="text" maxlength="100"/></td>
</tr>
<tr>
<td class="formtext" align="right"> Address (line 2)&nbsp;</td>
<td class="formtext"><input name="address2" size="25" type="text" maxlength="100"/></td>
</tr>
<tr>
<td class="formtext" align="right">* City &nbsp;</td>
<td class="formtext"><input name="city" size="25" type="text" maxlength="100"/></td>
</tr>
<tr>
<td class="formtext" align="right">* State &nbsp;</td>
<td class="formtext"><input name="state" size="9" type="text" maxlength="32"/></td>
</tr>
<tr>
<td class="formtext" align="right">* Zip Code&nbsp;</td>
<td class="formtext"><input name="postCode" size="9" type="text" maxlength="31"/></td>
</tr>
<tr>
<td class="formtext" align="right">* Phone&nbsp;</td>
<td class="formtext" align="left">(
<input name="phone_area" size="4" maxlength="3" type="text" /> )
<input name="phone_prefix" size="4" maxlength="3" type="text" /> -
<input name="phone_suffix" size="5" maxlength="4" type="text" /></td>
</tr>
<tr>
<td class="formtext" align="right">* Email&nbsp;</td>
<td class="formtext"><input name="email" size="25" type="text" maxlength="32"/></td>
</tr>
<tr>
<td class="formtext" align="right">* How did you hear about us?&nbsp;</td>
<td class="formtext">
<select name="how_did_you_hear">
<option value="empty"></option>
<option value="google">Google</option>
<option value="yahoo">Yahoo</option>
<option value="bing">Bing</option>
<option value="yelp">Yelp</option>
<option value="concierge">Concierge</option>
<option value="brochure">Brochure</option>
<option value="friend">Friend Reference</option>
<option value="other">Other</option>
</select>
</td>
</tr>
<tr>
<td class="formtext" align="left" colspan="2"> <br> Get additional 5% discount if you have a promotion code.&nbsp;</td>
</tr>
<tr>
<td class="formtext" align="right"> Promotion Code or Approved Reference Name&nbsp;<br>(required to get a discount):&nbsp;</td>
<td class="formtext"><input name="promo" size="25" type="text" /></td>
</tr>
<tr>
<td class="formtext" align="right">Additional Comments</td>
<td class="formtext"><textarea name="message" rows="5" cols="30"> </textarea></td>
</tr>
<tr>
<td colspan="2">
<div align="center"> <input type='button' class='monthButton' value='Reserve' id='res_butt' onclick='reserve()' /></div>
</td>
</tr>
<tr>
<td colspan="2" align="center" style="font-size:10px; color:#333"><br /><br />Reservations & Scheduling by <a href="https://www.StrictManager.com" style="font-size:10px; color:#00F">StrictManager.com</a></td>
</tr>
</tbody>
</table>

</div> <!-- close "main_body_div" -->


JavaScrip Code:
Insert businessID (provided by StrictManager.com) in quatation marks and place this code at the bottom of source file (after </html>):



<script type="text/javascript">
// businessID and general calendar settings
var businessID = ""; // eneter busnessID provided by StrictManager.com

var rsvp = getUrlVars()['rsvp'],
dayTime = getUrlVars()['dayTime'],
monthNo = Number(getUrlVars()['month'])-1,
mdays = ['January','February','March','April','May','June','July','August','September','October','November','December'],
month = mdays[monthNo],
day = getUrlVars()['day'],
charge = getUrlVars()['charge'],
time_hr = getUrlVars()['time_hr'],
optionalVal = decodeURIComponent(getUrlVars()['optionalVal']);
optionalVal1 = decodeURIComponent(getUrlVars()['optionalVal1']);
optionalVal2 = decodeURIComponent(getUrlVars()['optionalVal2']);
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}

var dayText = month+" "+day+", arrival "+dayTime;
//document.getElementById("dayTextTop").innerHTML = dayText;
document.getElementById("dayText").innerHTML = dayText;




var firstname=document.getElementsByName('firstname')[0].value,
lastname=document.getElementsByName('lastname')[0].value,
address1=document.getElementsByName('address1')[0].value,
address2=document.getElementsByName('address2')[0].value,
city=document.getElementsByName('city')[0].value,
state=document.getElementsByName('state')[0].value,
phone_area=document.getElementsByName('phone_area')[0].value,
phone_prefix=document.getElementsByName('phone_prefix')[0].value,
phone_suffix=document.getElementsByName('phone_suffix')[0].value,
email=document.getElementsByName('email')[0].value,
how_did_you_hear=document.getElementsByName('how_did_you_hear')[0].value,
promo=document.getElementsByName('promo')[0].value,
message=document.getElementsByName('message')[0].value;


function reserve(){
document.getElementById("error_msg").innerHTML = "";
document.getElementsByName('firstname')[0].className -= ' backRed';
document.getElementsByName('lastname')[0].className -= ' backRed';
document.getElementsByName('address1')[0].className -= ' backRed';
document.getElementsByName('city')[0].className -= ' backRed';
document.getElementsByName('state')[0].className -= ' backRed';
document.getElementsByName('postCode')[0].className -= ' backRed';
document.getElementsByName('phone_area')[0].className -= ' backRed';
document.getElementsByName('phone_prefix')[0].className -= ' backRed';
document.getElementsByName('phone_suffix')[0].className -= ' backRed';
document.getElementsByName('email')[0].className -= ' backRed';


var firstname=document.getElementsByName('firstname')[0].value,
firstname=firstname.trim(),
lastname=document.getElementsByName('lastname')[0].value,
lastname=lastname.trim(),
address1=document.getElementsByName('address1')[0].value,
address1=address1.trim(),
address2=document.getElementsByName('address2')[0].value,
address2=address2.trim(),
city=document.getElementsByName('city')[0].value,
city=city.trim(),
state=document.getElementsByName('state')[0].value,
state=state.trim(),
postCode=document.getElementsByName('postCode')[0].value,
postCode=postCode.trim(),
phone_area=document.getElementsByName('phone_area')[0].value,
phone_area=phone_area.trim(),
phone_prefix=document.getElementsByName('phone_prefix')[0].value,
phone_prefix=phone_prefix.trim(),
phone_suffix=document.getElementsByName('phone_suffix')[0].value,
phone_suffix=phone_suffix.trim(),
phone = phone_area + phone_prefix + phone_suffix,
email=document.getElementsByName('email')[0].value,
email=email.trim(),
how_did_you_hear=document.getElementsByName('how_did_you_hear')[0].value,
promo=document.getElementsByName('promo')[0].value,
message=document.getElementsByName('message')[0].value;

var bVal = 0;
if(firstname.length<1){
document.getElementsByName('firstname')[0].className += ' backRed';
bVal = 1;
}
if(lastname.length<1){
document.getElementsByName('lastname')[0].className += ' backRed';
bVal = 1;
}
if(address1.length<3){
document.getElementsByName('address1')[0].className += ' backRed';
bVal = 1;
}
if(city.length<3){
document.getElementsByName('city')[0].className += ' backRed';
bVal = 1;
}
if(state.length<2){
document.getElementsByName('state')[0].className += ' backRed';
bVal = 1;
}
if(postCode.length<1){
document.getElementsByName('postCode')[0].className += ' backRed';
bVal = 1;
}
if(phone_area.length<1){
document.getElementsByName('phone_area')[0].className += ' backRed';
bVal = 1;
}
if(phone_prefix.length<1){
document.getElementsByName('phone_prefix')[0].className += ' backRed';
bVal = 1;
}
if(phone_suffix.length<1){
document.getElementsByName('phone_suffix')[0].className += ' backRed';
bVal = 1;
}
if(email.length<5){
document.getElementsByName('email')[0].className += ' backRed';
bVal = 1;
}
var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
if(!(re.test(email))){document.getElementsByName('email')[0].className += ' backRed';bVal = 1;}




if(bVal==0){

var xmlhttp = new XMLHttpRequest();
//var url = "https://strictmanager.com/busav/avail.php?id="+businessID+"&date="+date;
var url = "https://strictmanager.com/busav/postRsvp.php";
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
// alert(xmlhttp.responseText);
var myArr = JSON.parse(xmlhttp.responseText);

//alert(myArr);

if(myArr=='expired'){
var resv_comp = "<br><strong>Unfortunatly this opening is not available anymore!</strong><br><a href='availPostCode.html'>Start from the beginning</a> and select a new reservation time."
document.getElementById("main_body_div").innerHTML = resv_comp;

}else if(Number(myArr) > 0){
var resv_comp = "<br><strong>Thank you for requesting a service.<br>The service has not been scheduled yet.<br> Our representative will contact you within 24 hours by email or phone to confirm the reservation.</strong>"
document.getElementById("main_body_div").innerHTML = resv_comp;
}else{
var resv_comp = "<br><strong>Unfortunatly there was a problem requesting reservation.</strong><br>Call/Email the company or try to make the reservation again."
document.getElementById("main_body_div").innerHTML = resv_comp;
}
}

}
xmlhttp.open("POST", url, true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");

var cust_ref = "How did your hear: "+ how_did_you_hear;

message = "CUSTOMER SELECTIONS: "+ optionalVal + "\r\nPromo: "+ promo+" \r\nComments: "+message;


xmlhttp.send("id="+encodeURIComponent(businessID)+"&rsvp="+encodeURIComponent(rsvp)+"&firstname="+encodeURIComponent(firstname)+"&lastname="+encodeURIComponent(lastname)+"&address1="+encodeURIComponent(address1)+"&address2="+encodeURIComponent(address2)+"&city="+encodeURIComponent(city)+"&state="+encodeURIComponent(state)+"&postCode="+encodeURIComponent(postCode)+"&phone="+encodeURIComponent(phone)+"&email="+encodeURIComponent(email)+"&cust_ref="+encodeURIComponent(cust_ref)+"&message="+encodeURIComponent(message)+"&charge="+encodeURIComponent(charge)+"&time_hr="+encodeURIComponent(time_hr)+"&optionalVal1="+encodeURIComponent(optionalVal1)+"&optionalVal2="+encodeURIComponent(optionalVal2)+"&optionalVal3="+encodeURIComponent(dayTime)+"&dayText="+encodeURIComponent(dayText));


}else{
document.getElementById("error_msg").innerHTML = "Fields marked in red are incorrect!";
}


}

</script>

<style>
.monthButton {
background-color:#0066CC;
-moz-border-radius:7px;
-webkit-border-radius:7px;
border-radius:7px;
border:1px solid #B2D1F0;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:16px;
padding:4px 4px;
text-decoration:none;
text-shadow:0px 0px 0px #2f6627;
min-width:100px;
font-weight:bold;
}
.monthButton:hover {
background-color:#99C2EB;
color:#000000;
}
.monthButton:active {
position:relative;
top:1px;
}
.backRed{
background-color:#FF8282
}
.red_text{color:#F00;}
</style>