isW3C = (document.getElementById) ? true : false;var newWindow;var ccimages = new Array();var today = new Date();var thisYear = today.getUTCFullYear();
function addToFavorites(urlAddress,pageName) {
	if (document.all){
		try{
			window.external.AddFavorite(urlAddress,pageName) 
		} catch(err) {
			alert("Sorry, your browser doesn't support this function.\nOn most browsers you can press 'Ctrl' + 'D' to add a page to your favourites."); 
		}	} else if (window.sidebar) { //firefox		window.sidebar.addPanel(pageName, urlAddress, "");	}}//Make the rounded corners, well..., rounded.
function makeRounded() {
   
    var all = document.getElementsByTagName("div");
    for(var i=all.length-1; ele=all[i],i>0; i--) {
        if(ele.className && ele.className.match(/(\s|^)roundMod(\s|$)/i)) {
            ele.className=ele.className + ' loaded';
            var inner = ele.innerHTML;
            ele.innerHTML = '<div class="rbtop"><div></div></div>'
                    + inner 
                    + '<div class="rbbot"><div></div></div>';
        }
    }
}function preloadImages() {	for (i=0; i < preloadImages.arguments.length; i++) {		ccimages[i] = new Image();		ccimages[i].src = preloadImages.arguments[i];	}}function sf()	{	document.forms[0].submit();	}	function $(elementId){	if(document.getElementById('CtlquickSearch1_ddlDays')){		elementId='CtlquickSearch1_' + elementId;	}	return document.getElementById(elementId);	}
// Returns true if s contains Html tags.
function stringContainsTags(s)
{
	if (!s){s=''};
	var regExp=new RegExp("<|>|;||/?|[|/^|]|/+|$", "g" )
	var newS = s.replace(regExp, "");
	if(newS != s){
		return true;
	}else{
		return false;
	}
}function callRent(barsyear) 	{		newWindow = window.open("/popups/RBpopup.aspx?year=" + barsyear,"descWindow","height=600,width=620,scrollbars,resizable,left=0,top=0");		window.name = "main";		newWindow.focus()	}// Navigate to a cottage page from a list.function cottageNavigate(thislist){
	var strCdrn =  thislist.options[thislist.selectedIndex].value;
	var strYear = strCdrn.substring(0,4);
	var strCode = parseInt(strCdrn.substring(4,9),10);
	window.location = "/cottage.aspx?year=" + strYear + "&code=" + strCode + "&page=desc&srcpge=find";
	return true;
}// creates an XMLHttpRequest instance
function xmlHttpRequestObject(){
	var xmlHttp;
	try
	{
		xmlHttp = new XMLHttpRequest();
	}
	catch(e)
	{
		// assume IE6 or older
		try
		{
		xmlHttp = new ActiveXObject("Microsoft.XMLHttp");
		}
		catch(e) { }
	}
	// return the created object or display an error message
	if (!xmlHttp)
		alert("Error creating the XMLHttpRequest object.");
	else 
		return xmlHttp;
}function showStatus(text) {		//fixes a bug in IE6	window.setTimeout('window.status="' + text + '"',1);}function isInteger(strInt)
	{
	var validChars = "0123456789";
	var isInt = true;
	var chari;
	for (i=0; i < strInt.length && isInt == true; i++)
		{ 
		chari = strInt.charAt(i);
		if (validChars.indexOf(chari) == -1)
			{
			isInt = false;
			}
		}
	return isInt;
	}
function popWin(url,height,width)
{
	sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + width + ',height=' + height);
	self.name = "mainWin";	
	sealWin.focus();
}
var picWindow;
function picWin(strYear,strCode,strPicName,strCXCode)
{
	picWindow = window.open("/poppicture.aspx?year=" + strYear + "&code=" + strCode + "&pic=" + strPicName + "&cxcode=" + strCXCode,"newWin",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1,width=600,height=670');
	picWindow.focus();
}

function popInfo(url) {
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=820,height=530');
self.name = "mainWin";
sealWin.focus();
}
function popInfo2(url,width,height) {
sealWin2=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=' + width + ',height=' + height);
self.name = "mainWin";
sealWin2.focus();
sealWin2.resizeTo(width,height);
}
function popInfo3(url,width,height) {
sealWin2=window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=' + width + ',height=' + height);
self.name = "mainWin";
sealWin2.focus();
sealWin2.resizeTo(width,height);
}

function popContact(url) {
conWin=window.open(url,"conwin",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1,width=440,height=450');
self.name = "mainWin";
conWin.focus();
}
function popUp(url) {
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
self.name = "mainWin";
}