function show_bk(t)
{
	t.style.display='none';
	document.getElementById('bookCleaner').style.display='';
}
function print_bk(p, hid)
{
	var dt='';
	for(var i=0;i<=10;i++)
	{
		var d = bk_getd(new Date(),i);
		dt = dt + "<option value=\""+d+"\">"+d+"</option>";
	}
	if(hid)
	{
		var css=' style="display:none;"';
		var lnk=' <a href="javascript:void(0)" onclick="show_bk(this)"><b>Show the booking form &raquo;</b></a>';
	}
	else
	{
		var css='';
		var lnk='';
	}

	document.write("<div class=\"bk\"> <div class=\"title\">Book a cleaner in "+p+"</div> <div class=\"formtext\"><b>You don\'t have time to watch dozens of sites of cleaning companies in "+p+" or to call them?</b><br>Just fill in your application for cleaning, we will send it immediately to the cleaning agencies and they will get in touch with you by telephone or e-mail. Note: The cleaning agencies, which your application will be sent to, are operating on the territory of the <b>whole London</b>, not only in "+p+". "+lnk+"</div> <form name=\"bookCleaner\" id=\"bookCleaner\""+css+" method=\"post\" action=\"/se-book.php\" onsubmit=\"return bk_check_form()\"> <table> <tr> <th><b>Your name &amp; surname:</b></th> <td><input type=\"text\" name=\"name\" style=\"width: 250px;\"> &nbsp;<span class=\"req\"> (required)</span></td> </tr> <tr> <th><b>Your e-mail:</b></th> <td><input type=\"text\" name=\"email\" style=\"width: 250px;\"> &nbsp;<span class=\"req\"> (required)</span></td> </tr> <tr> <th><b>Postcode &amp; address:</b></th> <td><input type=\"text\" name=\"address\" style=\"width: 250px;\"> &nbsp;<span class=\"req\"> (required)</span></td> </tr> <tr> <th><b>Phone number:</b></th> <td><input type=\"text\" name=\"phone\" style=\"width: 250px;\"> &nbsp;<span class=\"req\"> (required)</span></td> </tr> <tr> <th>Request callback:</th> <td><label for=\"callback\"><input type=\"checkbox\" id=\"callback\" name=\"callback\" value=\"1\"> I would like a callback on this number</label></td> </tr> <tr> <th>Prefered time: </th> <td> <select name=\"time_hour\"> <option value=\"09\">09</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> </select> : <select name=\"time_min\"> <option value=\"00\">00</option> <option value=\"30\">30</option> </select> (office hours only) </td> </tr> <tr> <th>On: </th> <td> <select name=\"time_date\" style=\"width: 250px;\"> "+dt+"</select> </td> </tr> <tr> <th>Service:</th> <td> <select name=\"service\" style=\"width: 250px;\"> <option value=\"Domestic cleaning services\">Domestic cleaning services</option> <option value=\"Carpet and upholstery cleaning\">Carpet and upholstery cleaning</option> <option value=\"Office cleaning\">Office cleaning</option> <option value=\"Window cleaning\">Window cleaning</option> <option value=\"Dry cleaning\">Dry cleaning</option> <option value=\"Industrial cleaning\">Industrial cleaning</option> <option value=\"Building cleaning\">Building cleaning</option> <option value=\"Move in/out cleaning\">Move in/out cleaning</option> <option value=\"After builders cleaning\">After builders cleaning</option> <option value=\"Ironing, Shopping, Mother\'s help\">Ironing, Shopping, Mother\'s help</option> <option value=\"One-off spring cleaning\">One-off spring cleaning</option> <option value=\"Before and after party help\">Before and after party help</option> <option value=\"\">Other (pleace, specify)</option> </select> </td> </tr> <tr> <th style=\"vertical-align:top;\">Additional comments:</th> <td> <textarea name=\"comments\" style=\"width: 350px; height: 80px;\"></textarea> </td> </tr> <tr> <th></th> <td> <input type=\"submit\" name=\"btn\" class=\"btn\" value=\"Submit your request\"><input type=\"hidden\" name=\"action\" value=\"1\"></td> </tr> </table> </form> </div><br style=\"clear:both\" />");
}

function bk_getd(d1,days) {
    var d2 = new Date(d1.getTime() + days*24*60*60*1000);
	var ds=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
	var ms=["January","February","March","April","May","June","July","August","September","October","November","December"];
	return ds[d2.getDay()]+', '+d2.getDate()+' '+ms[d2.getMonth()];
}

function bk_check_form()
{
	if(!document.bookCleaner.name.value || !document.bookCleaner.email.value || !document.bookCleaner.address.value || !document.bookCleaner.phone.value)
	{
		alert('Please, fill all required fields and resubmit the form again.');
		return false;
	}
	return true;
}