var UniqueKey='PPPP-82M8W5';
var d;
var Navitator;
var baseURL;
function cb_dialog(s) {
if (Navigator.isGecko()) cb_popunder(s); else cb_popover(s)
}
function closeDialog() {
d=window.top.document;
var dialog=d.getElementById ("cb_dialogContainer");
if (dialog) d.body.removeChild (dialog);
}
function positionDialog() { 
var winW = 630, winH = 460;
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=='Netscape') {
  winW = window.top.innerWidth;
  winH = window.top.innerHeight;
 }
}
 if (navigator.appName.indexOf('Microsoft')!=-1) {
  winW = d.body.offsetWidth;
  winH = d.body.offsetHeight;
 }
var oT=d.getElementById ('cb_outerTable');
oT.style.left=((winW/2)-(260)-window.top.pageXOffset) + 'px';
oT.style.top=((window.top.pageYOffset)) + 'px';
setZIndexes(getBaseZIndex());
}
function getBaseZIndex() {
var els=d.getElementsByTagName('*');
z=100000;
for (var i=0; i<els.length;i++) {
if (els[i].style.zIndex!="") {
var thisZ=parseInt(els[i].style.zIndex);
if (thisZ>=z) z=thisZ+1
}
}
return (z);
}
function setZIndexes(z) {
d.getElementById ('cb_dialogFooter').style.zIndex=z+2;
d.getElementById ('cb_dialogFooter').style.display="";
d.getElementById ('cb_outerTable').style.zIndex=z;
d.getElementById ('cb_dialogHeader').style.zIndex=z+1;
d.getElementById ('cb_dialogTitle').style.zIndex=z+1;
d.getElementById ('cb_dialogBorder').style.zIndex=z;
d.getElementById ('cb_frame').style.zIndex=z+1;
}
function cb_popunder(s) {
closeDialog();
var tableHtml="";
tableHtml+="<link rel=stylesheet href='https://www.ClickBook.net/dev/site.nsf/cb_mode1.css' type='text/css'>";
tableHtml+="<table id='cb_outerTable' cellpadding=0 cellspacing=0 height=100%>";
tableHtml+="<tr><td align=center>";
tableHtml+="<table id='cb_innerTable' cellpadding=0 cellspacing=0 align=center>";
tableHtml+="<tr valign=top><td>";
tableHtml+="<div id='cb_mode1body'><div id='cb_dialogBorder'></div><div id='cb_dialogHeader'>" + getDialogHeader() + "</div><iframe frameborder=0 src='"+s+"' id='cb_frame'></iframe></div>";
tableHtml+="</td>";
tableHtml+="</tr>";
tableHtml+="<tr valign=bottom><td><div id='cb_dialogFooter'>&#169; Copyright 2009 Click Booking Systems Ltd.  Visit <a class='cb_linkBlue' href='http://www.ClickBook.net' target=_new>ClickBook.net</a> to learn more.</div></td></tr>";
tableHtml+="</table>";
newdiv = d.createElement('div');
//dialogContainer contains the centreing table.
newdiv.setAttribute ("id", "cb_dialogContainer");
newdiv.innerHTML=tableHtml;
d.body.appendChild(newdiv);
positionDialog();
}
function cb_popover(s) {
features='addressbar=false, replace=false, dialog=yes, personalbar=no, status=no, resizable=no, width=550, height=600, scrollbars=yes, menubar=no';
window.open(s, '', features)
}
function getDialogHeader () {
var out="";
out+="<table width=100% cellpadding=0 cellspacing=0><tr><td>";
out+="<div id='cb_dialogTitle'>Schedule an appointment</div></td>";
out+="<td align=right><a class='cb_linkWhite' onclick=\"window.top.document.body.removeChild(window.top.document.getElementById ('cb_dialogContainer'));\">Close</a></td></tr>";
out+="</table>";
return out
}
function isIE(){
return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
}
function isSafari() {
return (document.createCDATASection && document.createElementNS) ? Navigator._getVersion('AppleWebKit/', '(') : false;
}
function getSCRIPTParent(src) {
var parent = null;
var scripts;
var i = 0;
var end = 0;
scripts = document.getElementsByTagName('script');
for (i, end = scripts.length; i < end; i++)  if (scripts[i].src.indexOf(src) > -1) parent = scripts[i].parentNode;
return parent;
} 
function cb_init() {
d=window.top.document;
k="BAFC7FCEBE77D975CA2575D400405109";
baseURL="http://www.ClickBook.net/dev/bc.nsf/sub/";
if (String(baseURL).indexOf("/k/") >=0) {
	if ("" == k) writeLink(k)
} else {
	writeLink(k)
}
}
function writeLink(k) {
var out="";
out+="<link rel=stylesheet href='https://www.ClickBook.net/dev/site.nsf/cb_mode1.css' type='text/css'>";
out+="<a title='Click here to schedule an appointment' onclick='cb_dialog (\"" + baseURL + k + "!open&mode=1\")'><img style='cursor:pointer'  title='Click here to schedule an appointment' src='http://www.ClickBook.net/cb_btn1.gif'></a>";
var newdiv = d.createElement('div');
//newdiv.innerHTML=out;
newdiv.setAttribute ("id", "cb_linkContainer-" + UniqueKey);
var scriptParent = getSCRIPTParent ("clickbook.js");
if (scriptParent!=null) {
	scriptParent.appendChild (newdiv);
} else {
	alert("ClickBook.net booking link could not be installed.")
}
Navigator = {
		 _getVersion: function (a, b) {
		 		 var t = navigator.userAgent.split(a)[1];
		 		 return (t) ? t.split(b)[0] : false;
		 },
		 isOpera: function () {
		 		 return (
		 		 		 (window.opera) ?
		 		 		 		 (document.createElementNS) ?
		 		 		 		 		 (document.createCDATASection) ?
		 		 		 		 		 		 (document.styleSheets) ? 9 : 8
		 		 		 		 		 : 7
		 		 		 		 : 6
		 		 		 : false
		 		 );
		 },
		 isSafari: function () {
		 		 return (document.createCDATASection && document.createElementNS) ? Navigator._getVersion('AppleWebKit/', '(') : false;
		 },
		 isKDE: function () {
		 		 return (document.createCDATASection && document.createElementNS) ? Navigator._getVersion('Konqueror/', ';') : false;
		 },
		 isGecko: function () {
		 		 return (document.createCDATASection && document.createElementNS) ? Navigator._getVersion('Gecko/', ' ') : false;
		 },
		 isNN4: function () {
		 		 return (document.layers && typeof document.layers == 'object') ? true : false;
		 },
		 isWinIE: function () {
		 		 return (
		 		 		 /*@cc_on @if (@_win64 || @_win32 || @_win16)
		 		 		 (document.getElementsByTagName) ?
		 		 		 		 (@_jscript_version > 5.6) ? 7 :
		 		 		 		 (@_jscript_version == 5.6) ? 6 :
		 		 		 		 (@_jscript_version == 5.5) ? 5.5 :
		 		 		 		 5
		 		 		 : 4
		 		 		 @else@*/false/*@end @*/
		 		 );
		 },
		 isMacIE: function () {
		 		 return (
		 		 		 /*@cc_on @if (@_mac && (@_PowerPC || @_mc680x0))
		 		 		 		 (document.getElementsByTagName) ? 5 : 4
		 		 		 @else@*/false/*@end @*/
		 		 );
		 }
};
}
cb_init()


