<!--
window.defaultStatus='';
if (parent.frames.length > 0) {
    // parent.location.href = self.document.location;
}

function setbasehref(basehref) { 
	var thebase = document.getElementsByTagName('base'); 
	thebase[0].href = basehref; 
}

function imgSwap(oImg)
{
   var strOver  = "001"    // image to be used with mouse over
   var strOff = "000"     // normal image
   var strImg = oImg.src
   if (strImg.indexOf(strOver) != -1) 
      oImg.src = strImg.replace(strOver,strOff)
   else
      oImg.src = strImg.replace(strOff,strOver)
}

function galleryimage(filename,width,height) {
	var generator = null;
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2;
	var windef = 'height=' + height + ',width=' + width + ', top=' + top + ', left=' + left;
	
	generator = window.open('','',windef);
	generator.document.write('<html><head><title>Homefarm Guesthouse</title></head>');
	generator.document.write('<body bgcolor=#FFFFFF leftmargin=0 topmargin=0>');
	generator.document.write('<img src='+filename+'>');
	generator.document.write('</body></html>');
}

function displayInfo(filename,params) {
	var generator=window.open(filename,'infoWindow',params);
}

function onbutton(button) {
	if (navigator.appVersion >= "3") {
		document[button].src = "gfx/" + button + "001.png"
		}
	}

function offbutton(button) {
	if (navigator.appVersion >= "3") {
		document[button].src = "gfx/" + button + "000.png"
		}
	}

function photo(photoID, captionID, filename, caption, wsize, hsize) {
	if (navigator.appVersion >= "3") {
		document.getElementById(photoID).src = "gallery/" + filename;
		document.getElementById(photoID).width = wsize;
		document.getElementById(photoID).height = hsize;
		document.getElementById(captionID).innerHTML = caption;
		}
	}	
	
function preload(filename) {
	var image = new Image;
	image.src = filename;
	}
	
function playvideo(id, clipname, image, auto, wsize, hsize, dsize, repeat) {
	var FLV = {
		movie:"flash/flvplayer.swf",
		width: wsize,
		height: hsize,
		majorversion: "7",
		build: "0",
		bgcolor: "#FFFFFF",
		allowfullscreen: "false",
		flashvars: "file=" + clipname + "&image="+ image + "&autostart=" + auto + "&repeat=" + repeat + 		
			"&displayheight=" + dsize
	};
	UFO.create(FLV, id);
	}

function playmp3(clipname, wsize, hsize) {
	document.write('<object type=\"application/x-shockwave-flash\" data=\"flash/mp3player.swf\" id=\"audioplayer1\" height=' + hsize + ' width=' + wsize + '>');
	document.write('<param name=\"movie\" value=\"flash/mp3player.swf\">');
	document.write('<param name=\"FlashVars\" value=\"playerID=1&amp;soundFile=' + clipname + '\">');
	document.write('<param name=\"quality\" value=\"high\">');
	document.write('<param name=\"menu\" value=\"false\">');
	document.write('<param name=\"wmode\" value=\"transparent\">');
	document.write('</object>');
	}

-->


