function tooltipDisplay() {
	if (document.getElementById("contents").style.display == "block") {
		document.getElementById("contents").style.display = "none";
		thisSrc = document.getElementById("tt_expcol").src;
		thisSrc = thisSrc.replace("collapse","expand");
		setTimeout("document.getElementById('tt_expcol').src = thisSrc", 1);
	} else {
		document.getElementById("contents").style.display = "block";
		thisSrc = document.getElementById("tt_expcol").src;
		thisSrc = thisSrc.replace("expand","collapse");
		thisBgImage = new Image();
		thisBgImage.src = "tooltip/images/tooltip_bottom.png";
		setTimeout("document.getElementById('tt_expcol').src = thisSrc", 1);
		setTimeout("document.getElementById('contents').style.backgroundimage = thisBgImage", 1);
	}
}

function showSubsection(whichSection) {
	for (x=1; x<=4; x++) {
		document.getElementById("subsection" + x).className = "off";
		document.getElementById("subsection" + x + "Contents").className = "hidden";
	}
	document.getElementById("subsection" + whichSection).className = "on";
	document.getElementById("subsection" + whichSection + "Contents").className = "display";
}


function checkqs() {
	var arrQueryString = new Array();
	var strQuery = window.location.search.substring(1);
	var parms = strQuery.split('&');
	for (var i=0; i<parms.length; i++) {
		var pos = parms[i].indexOf('=');
		if (pos > 0) {
			var key = parms[i].substring(0,pos);
			var val = parms[i].substring(pos+1);
			arrQueryString[key] = val;
		}
	}
	if (arrQueryString["sa"] != null) {
		showSubsection("4");
	}
}

var arrPhotoGallery = new Array("Lameque, New Brunswick", "Hartland Covered Bridge, Hartland, New Brunswick", "Fundy National Park of Canada, Alma, New Brunswick", "Le Pays de la Sagouine, Boutouche, New Brunswick", "Mount Carleton, New Brunswick", "Grand Falls Gorge, Grand Falls, New Brunswick");

var arrDoakGallery = new Array("The exterior of Doak Cottage", "Our spacious interiors", "Doak Cottage has been upgraded with the latest interior finishings");

var arrBlissfieldGallery = new Array("The exterior of Blissfield Cottage", "Our spacious interiors", "Blissfield Cottage has been upgraded with the latest interior finishings");

var arrFiddleheadGallery = new Array("The exterior of Fiddlehead Cottage", "Our spacious interiors", "Fiddlehead Cottage has been upgraded with the latest interior finishings");

function pgShowImage(whichImage, imgPrefix, whichGalleryNotes) {
	if (whichImage != null) {
		strNewImageSrc = "../images/" + imgPrefix + "_" + whichImage + "_lg.jpg";
		document.getElementById("pgImageLarge").src = strNewImageSrc;
		document.getElementById("pgImageLarge").alt = eval(whichGalleryNotes)[whichImage - 1];
		document.getElementById("pgImageNotes").innerHTML = eval(whichGalleryNotes)[whichImage - 1];
	}
}

strWhichItem = "";

function showDatePicker(whichItem) {
	strWhichItem = whichItem.id;
	if (whichItem.id == "tb_checkin") {
		document.getElementById("datePicker").style.top = "420px";
	} else {
		document.getElementById("datePicker").style.top = "470px";
	}
	document.getElementById("datePicker").style.display = "block";
	whichItem.value = "";
}

function hideDatePicker() {
	document.getElementById("datePicker").style.display = "none";
	if (strWhichItem == "tb_checkin") {
		strValue = "05/28/2007";
	} else {
		strValue = "06/13/2007";
	}
	document.getElementById(strWhichItem).value = strValue;
}