var oBookAppointment = null;
var oLiveChat = null;
var chatStatus = new Array();
oBookAppointment = new ChatObject();
oBookAppointment.init("book", "fr", "");
oBookAppointment.writeImage();


	// called onload of the check live chat images
	function updateStatus(sImageId) {
		var oImage = document.getElementById(sImageId);
		var blnReturn = false;
		if (oImage.height == 0 && oImage.width == 0) {
			blnReturn = false;
		} else if  (oImage.height == 1 && oImage.width == 1) {
			blnReturn = false;
		} else if  (oImage.height > 1 && oImage.width > 1) {
			blnReturn = true;
		}
		chatStatus[sImageId] = blnReturn;
		checkLiveLinks(sImageId);
	}

	
	// check to see if Book an Appointment and Live Chat are online, disable if they aren't.
	function checkLiveLinks(sImageId) {
		if (sImageId.substr(0,4) == "book" && chatStatus[sImageId]) {
			var oLi = document.getElementById("right27");
			if (oLi) oLi.style.display = "block";
				
			oLi = document.getElementById("footer27");
			if (oLi) oLi.style.display = "block";
		}
		
		if (sImageId.substr(0,4) == "chat" && chatStatus[sImageId]) {
			var oLi = document.getElementById("right28");
			if (oLi) oLi.style.display = "block";
				
			oLi = document.getElementById("footer28");
			if (oLi) oLi.style.display = "block";
		}
	}	
	
	