
<!--

/* MISC Javascript Controls */
/*                          */
/* General Javascript that might be needed in more than one place   */
/* can be included here and it should become available to all pages */




/* Controls the display of stuff during printing */
/*                                               */
/* To make something disappear, give it the ID noprintX     */
/* where X is a number from 1 to 14 (must be unique on page */
/*                                                          */
/* To make something appear only during printing, use the   */
/* ID doprintX although you'll also need to add a style tag */
/* style="display:none" to the item to stop it appearing    */
/* before printing begins                                   */
/*                                                          */
/* Unfortunately this only works in IE, can't find a MZ fix */
/* as .onbeforeprint and .onafterprint don't exist in that  */



function pre_printer_process() {

	for (a = 0; a < 15; a++) {

		if (document.getElementById("noprint" + (a+1))) {
			document.getElementById("noprint" + (a+1)).style.display = 'none';
		}

		if (document.getElementById("doprint" + (a+1))) {
			document.getElementById("doprint" + (a+1)).style.display = '';
		}

	}

}




function post_printer_process() {

	for (a = 0; a < 15; a++) {

		if (document.getElementById("noprint" + (a+1))) {
			document.getElementById("noprint" + (a+1)).style.display = '';
		}

		if (document.getElementById("doprint" + (a+1))) {
			document.getElementById("doprint" + (a+1)).style.display = 'none';
		}

	}

}

window.onbeforeprint = pre_printer_process;
window.onafterprint  = post_printer_process;







/* Opens the phone booking link */


function phone_booking_popup(url, townname) {

	if (typeof url=="undefined") { return false; }

	url = url + 'town/' + townname;

	window.open(url,'phonepopup',"height=160,width=500,left=200,top=190");

	return true;

}






/* Opens any URL in a basic popup */


function make_a_popup(url, width, height, scrollbars) {

	if (typeof url=="undefined") { return false; }


	var screenheight = screen.height - 30;

	width  = (width < 1)  ? 400 : width;
	height = (height < 1) ? screenheight : height;
	scrollbars = (scrollbars < 1) ? 0 : 1;


	window.open(url,'myownpopup','"height=' + height + ',width=' + width + ',left=200,top=190, scrollbars=' + scrollbars + '"');


	return true;

}





// -->









