// JavaScript Document

<!-- PLEASE READ THIS FIRST BEFORE EDITING -->
<!--***************************************-->

<!-- This is where you can change the description of each area of the website. -->
<!-- Edit the text that says 'This is what is in the first description.' for each rollover. -->
<!-- They are in order of the menu buttons.  -->
<!--	Ie. "farm stay" is msg['text1'] -->
<!--		"horse riding" is msg['text2'] and so on-->
<!-- Edit the text that says 'This is what is in the first description.' for each rollover. -->

var msg = Object();

msg['text1'] = 'Underbank is widely recognised as one of Victoria’s premier properties for Farm Stay accommodation. Kids will have a ball, whilst parents soak up the country atmosphere.';
msg['text2'] = 'Whether you are a seasoned rider or have never been on a horse before, Underbank has something for everyone. We teach all ages and all levels in a safe, relaxed, environment.';
msg['text3'] = 'Give your kids the holiday of a lifetime! With heaps of horse riding and much much more - your children will have an absolute ball.';
msg['text4'] = 'Underbank’s Rural Retreat is the ideal location for your corporate retreat, team building weekend, family getaway, hobby weekend or any other occasion.';
msg['text5'] = 'Whatever the occasion Underbank can cater for your special event! From corporates to weddings, our sensational catering, and picturesque location will ensure success.';
msg['text6'] = 'This is what is in the sixth description.';
msg['text7'] = 'Welcome to Underbank Stud. <br>To find out more about what’s on at Underbank please click on any of the buttons on the left.';

function getCell(id) {
return document.getElementById ? document.getElementById(id) :
document.all ? document.all(id) : 
document.layers ? document['NS' + id].document.layers[0] : null;
}

function rollTwo(which, state, cell_id) {
//document['pic' + which].src = window['pic' + which + state].src; //image rollover
var el = getCell(cell_id);
if (el) {
if (typeof el.innerHTML != 'undefined') {
if (state == 'on') el.innerHTML = msg['text' + which];
else el.innerHTML = msg['defaultpic'];
}
else if (document.layers) {
rollTwo.el = el; //save persistent reference for timer
el.visibility = 'hide'; //prevents flicker, yech
el.document.write((state == 'on') ? msg['text' + which] : msg['defaultpic']);
el.document.close();
el.parentLayer.clip.width = el.document.width; //size container layer
el.parentLayer.clip.height = el.document.height;
setTimeout('rollTwo.el.visibility = "show"',50); //reshow
}
}
}

function init() {
if (document.layers) document['NStextcell'].visibility = 'show'; //set initial visibility
// other onload handler routines here
}

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) {
		rolloverpic1_over = newImage("images/front/rolloverpic1.jpg");
		rolloverpic2_over = newImage("images/front/rolloverpic2.jpg");
		rolloverpic3_over = newImage("images/front/rolloverpic3.jpg");
		rolloverpic4_over = newImage("images/front/rolloverpic4.jpg");
		rolloverpic5_over = newImage("images/front/rolloverpic5.jpg");
		preloadFlag = true;
	}
}
