<!--
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		header_nav_lodging_over = newImage("/images/header_nav_lodging-over.jpg");
		header_nav_info_over = newImage("/images/header_nav_info-over.jpg");
		header_nav_wedding_over = newImage("/images/header_nav_wedding-over.jpg");
		preloadFlag = true;
	}
}

//check in date drop menus
var date = new Date();

var day = date.getDate();
var year = date.getFullYear();
var month = date.getMonth();

//BROWSER SNIFF
var isIE4 = (document.all && !document.getElementById) ? true : false;
var isIE5 = (document.all && document.getElementById) ? true : false;
var isNS6 = (!document.all && document.getElementById) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var isDHTML = (isIE4 || isIE5 || isNS6);
var isPc = navigator.userAgent.indexOf("Windows") != -1;
var isMac = !isPc;

//FLASH SNIFF
var useFlash = false;
if (navigator.plugins != null && navigator.plugins.length > 0) {
	if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
		var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
		var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
		var descArray = flashDescription.split(" ");
		var tempArrayMajor = descArray[2].split(".");			
		var versionMajor = tempArrayMajor[0];
		var versionMinor = tempArrayMajor[1];
		var versionRevision = descArray[3];
		if (versionRevision == "") {
			versionRevision = descArray[4];
		}
		if (versionRevision[0] == "d") {
			versionRevision = versionRevision.substring(1);
		} else if (versionRevision[0] == "r") {
			versionRevision = versionRevision.substring(1);
			if (versionRevision.indexOf("d") > 0) {
				versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
			}
		}
		var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		useFlash=true;
	}
}

//FUNCTIONS
function swap(name,state) {
    if(document.images) {
        document[name].src = eval(name + state + ".src");
    }
}

function jumpSelect(selectlist) {
    var ind = selectlist.selectedIndex;
    var theURL = selectlist.options[selectlist.selectedIndex].value;
	if (theURL == "") return;
	document.location = theURL;
}

function UpdateGuests(selectlist, theURL) {
    var ind = selectlist.selectedIndex;
    var guest_count = selectlist.options[selectlist.selectedIndex].value;
	theURL= theURL + "&guest_count=" + guest_count;
	if (theURL == "") return;
	document.location = theURL;
}


function popup(location) {
	var dx=440;
	var dy=400;

	var w = window.open(location, 'popup_folk', 'width=' + dx + ',height=' + dy + ',status=no,resizable=yes,menubar=yes,location=no,scrollbars=yes,toolbar=no');
	w.focus();
}

function room(location) {
	var dx=420;
	var dy=490;

	var w = window.open(location, 'popup_room', 'width=' + dx + ',height=' + dy + ',status=no,resizable=yes,menubar=yes,location=no,scrollbars=yes,toolbar=no');
	w.focus();
}

function LaunchNew(location,wx,hx) {
	var w = window.open(location, 'slideshow', 'width=' + wx + ',height=' + hx + ',status=no,resizable=no,menubar=no,location=no,scrollbars=no,toolbar=no');
	w.focus();
}


//validation

function isPositiveNumber(num) {
	if(num == "" || num == 0) return false;
	if(Math.abs(num*1.0) != num) return false;
	return true;
}

function isNumber(num) {
	if(num == "") return false;
	if(num*1.0 != num) return false;
	return true;
}

function strip(s,what) {
	var i;
	while ((i = s.indexOf(what)) != -1) {
		s = s.substring(0,i) + s.substring(i+what.length,s.length);
	}
	return s;
}

//-->
