// Navigation
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("navigation");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;

// Bedroom Gallery
if (document.images) {
bedroomgalleryimage0 = new Image;
bedroomgalleryimage1 = new Image;
bedroomgalleryimage2 = new Image;
bedroomgalleryimage3 = new Image;
bedroomgalleryimage4 = new Image;
bedroomgalleryimage0.src = 'filebank/imagebank/house/virtualtour/bedroom/image001.jpg';
bedroomgalleryimage1.src = 'filebank/imagebank/house/virtualtour/bedroom/image002.jpg';
bedroomgalleryimage2.src = 'filebank/imagebank/house/virtualtour/bedroom/image003.jpg';
bedroomgalleryimage3.src = 'filebank/imagebank/house/virtualtour/bedroom/image004.jpg';
bedroomgalleryimage4.src = 'filebank/imagebank/house/virtualtour/bedroom/image005.jpg';
} else {
bedroomgalleryimage0 = '';
bedroomgalleryimage1 = '';
bedroomgalleryimage2 = '';
bedroomgalleryimage3 = '';
bedroomgalleryimage4 = '';
document.bedroomgallery = '';
} 

// Dining Gallery
if (document.images) {
dininggalleryimage0 = new Image;
dininggalleryimage1 = new Image;
dininggalleryimage2 = new Image;
dininggalleryimage3 = new Image;
dininggalleryimage4 = new Image;
dininggalleryimage0.src = 'filebank/imagebank/house/virtualtour/dining/image001.jpg';
dininggalleryimage1.src = 'filebank/imagebank/house/virtualtour/dining/image002.jpg';
dininggalleryimage2.src = 'filebank/imagebank/house/virtualtour/dining/image003.jpg';
dininggalleryimage3.src = 'filebank/imagebank/house/virtualtour/dining/image004.jpg';
dininggalleryimage4.src = 'filebank/imagebank/house/virtualtour/dining/image005.jpg';
} else {
dininggalleryimage0 = '';
dininggalleryimage1 = '';
dininggalleryimage2 = '';
dininggalleryimage3 = '';
dininggalleryimage4 = '';
document.dininggallery = '';
} 

// Roof Terrace Gallery
if (document.images) {
roofterracegalleryimage0 = new Image;
roofterracegalleryimage1 = new Image;
roofterracegalleryimage2 = new Image;
roofterracegalleryimage3 = new Image;
roofterracegalleryimage4 = new Image;
roofterracegalleryimage0.src = 'filebank/imagebank/house/virtualtour/roofterrace/image001.jpg';
roofterracegalleryimage1.src = 'filebank/imagebank/house/virtualtour/roofterrace/image002.jpg';
roofterracegalleryimage2.src = 'filebank/imagebank/house/virtualtour/roofterrace/image003.jpg';
roofterracegalleryimage3.src = 'filebank/imagebank/house/virtualtour/roofterrace/image004.jpg';
roofterracegalleryimage4.src = 'filebank/imagebank/house/virtualtour/roofterrace/image005.jpg';
} else {
roofterracegalleryimage0 = '';
roofterracegalleryimage1 = '';
roofterracegalleryimage2 = '';
roofterracegalleryimage3 = '';
roofterracegalleryimage4 = '';
document.roofterracegallery = '';
} 

// Kitchen Gallery
if (document.images) {
kitchengalleryimage0 = new Image;
kitchengalleryimage1 = new Image;
kitchengalleryimage2 = new Image;
kitchengalleryimage3 = new Image;
kitchengalleryimage0.src = 'filebank/imagebank/house/virtualtour/kitchen/image001.jpg';
kitchengalleryimage1.src = 'filebank/imagebank/house/virtualtour/kitchen/image002.jpg';
kitchengalleryimage2.src = 'filebank/imagebank/house/virtualtour/kitchen/image003.jpg';
kitchengalleryimage3.src = 'filebank/imagebank/house/virtualtour/kitchen/image004.jpg';
} else {
kitchengalleryimage0 = '';
kitchengalleryimage1 = '';
kitchengalleryimage2 = '';
kitchengalleryimage3 = '';
document.kitchengallery = '';
} 

// Living Room Gallery
if (document.images) {
livingroomgalleryimage0 = new Image;
livingroomgalleryimage1 = new Image;
livingroomgalleryimage2 = new Image;
livingroomgalleryimage3 = new Image;
livingroomgalleryimage4 = new Image;
livingroomgalleryimage0.src = 'filebank/imagebank/house/virtualtour/livingroom/image001.jpg';
livingroomgalleryimage1.src = 'filebank/imagebank/house/virtualtour/livingroom/image002.jpg';
livingroomgalleryimage2.src = 'filebank/imagebank/house/virtualtour/livingroom/image003.jpg';
livingroomgalleryimage3.src = 'filebank/imagebank/house/virtualtour/livingroom/image004.jpg';
livingroomgalleryimage4.src = 'filebank/imagebank/house/virtualtour/livingroom/image005.jpg';
} else {
livingroomgalleryimage0 = '';
livingroomgalleryimage1 = '';
livingroomgalleryimage2 = '';
livingroomgalleryimage3 = '';
livingroomgalleryimage4 = '';
document.livingroomgallery = '';
} 

// Location Gallery
if (document.images) {
locationgalleryimage0 = new Image;
locationgalleryimage1 = new Image;
locationgalleryimage2 = new Image;
locationgalleryimage3 = new Image;
locationgalleryimage4 = new Image;
locationgalleryimage0.src = 'filebank/imagebank/location/default/image001.jpg';
locationgalleryimage1.src = 'filebank/imagebank/location/default/image002.jpg';
locationgalleryimage2.src = 'filebank/imagebank/location/default/image003.jpg';
locationgalleryimage3.src = 'filebank/imagebank/location/default/image004.jpg';
locationgalleryimage4.src = 'filebank/imagebank/location/default/image005.jpg';
} else {
locationgalleryimage0 = '';
locationgalleryimage1 = '';
locationgalleryimage2 = '';
locationgalleryimage3 = '';
locationgalleryimage4 = '';
document.locationgallery = '';
}

// Contact
function validateForm(contact)
{

if(""==document.forms.contact.name.value)
{
alert("Please enter your full name.");
document.forms.contact.name.focus();
return false;
}

if(""==document.forms.contact.emailaddress.value)
{
alert("Please enter your email address.");
document.forms.contact.emailaddress.focus();
return false;
}

if(""==document.forms.contact.message.value)
{
alert("Please enter your message.");
document.forms.contact.message.focus();
return false;
}

if(""==document.forms.contact.captcha.value)
{
alert("Please enter the 3 black symbols in the image.");
document.forms.contact.captcha.focus();
return false;
}

}
