var imagesLoaded
var gallery=0;
var galleryOne=1;
var galleryTwo=0;
var secondGallery=0;
var galleryThree=0;
var galleryFour=0;
if(document.images) {
picoutsideA=new Image;
picoutsideA.src="images/gallery/cavalier.jpg";
picoutsideB=new Image;
picoutsideB.src="images/gallery/presscut.jpg";
picoutsideC=new Image;
picoutsideC.src="images/gallery/originalhall.jpg";
picoutsideD=new Image;
picoutsideD.src="images/gallery/bells.jpg";
picoutsideE=new Image;
picoutsideE.src="images/gallery/church.jpg";
picoutsideF=new Image;
picoutsideF.src="images/gallery/saledoc.jpg";
imagesLoaded=true;
}

function preload() {
if (!document.images) return;
var ar=new Array();
var arguments=preload.arguments;
for (var i=0; i<arguments.length; i++) {
ar[i]= new Image();
ar[i].src=arguments[i];
}
}
var wordsvilla1 = "Lake View Villa's gardens have been lanscaped with palms and exotic plants. To the rear is its enclosed pool with spa bath. We chose its location to make the most of the views whilst chilling out by the pool - the fountains are lit up beautifully at night.";
var wordskitchen2 = "We have an open plan kitchen and breakfast bar with all modern conveniences including dishwasher, microwave, fridgefreezer with ice maker, cooking range and an ample supply of crockery, glasses and cutlery. The washing machine and tumble dryer are tucked away in a separate closet";
var wordsvilla2 = "The dining area opens into the living room and offers an opportunity to gather round the table for a meal every so often. It's tastefully and comfortably furnished to ensure you enjoy the occasion, but without being too formal";
var wordsvilla3 = "The family room is furnished in relaxed style and is an ideal place to chill out. The TV has a DVD player and there's plenty of room for kids (of any age!) to unwind and relax. There's a great view over the pool and over the lake beyond";
var wordsliving2 = "The Den/Family room offers cool, comfortable space to relax and unwind. A chance to get a little time of your own, maybe watch a little TV, read or enjoy the company of others with a drink and some memories of a fun-packed day";
var wordsvilla4 = "The master bedroom is spacious, light and airy and has a queen-size bed. There's a luxurious en-suite bathroom and walk-in wardrobes offer masses of storage space. Patio doors lead out onto the pool deck; so a swim might be just the ticket to wake up to!";
var wordsbeds1 = "The two twin rooms are comfortably furnished and have doors leading to their shared bathroom. For extra sleeping, there's a large den with twin sofa beds.";
var wordsbeds2 = "The  bathrooms have plenty of towels - and of course linen is provided. There are two baths for a good soak and showers for a refreshing wake-up";

function switchPic(Target) {
if(imagesLoaded) {
if (gallery==0) {
if (Target==1) document.mainpic.src="images/gallery/cavalier.jpg";
if (Target==2) document.mainpic.src="images/gallery/presscut.jpg";
if (Target==3) document.mainpic.src="images/gallery/originalhall.jpg";
if (Target==4) document.mainpic.src="images/gallery/bells.jpg";
if (Target==5) document.mainpic.src="images/gallery/church.jpg";
if (Target==6) document.mainpic.src="images/gallery/saledoc.jpg";
}
if (gallery==1) {
if (Target==1) document.mainpic.src="images/gallery/grounds2.jpg";
if (Target==2) document.mainpic.src="images/gallery/aerialgrounds.jpg";
if (Target==3) document.mainpic.src="images/gallery/aerialview2.jpg";
if (Target==4) document.mainpic.src="images/gallery/copse.jpg";
if (Target==5) document.mainpic.src="images/gallery/groundsrear.jpg";
if (Target==6) document.mainpic.src="images/gallery/river.jpg";
}
if (gallery==2) {
if (Target==1) document.mainpic.src="images/gallery/decostatue.jpg";
if (Target==2) document.mainpic.src="images/gallery/window.jpg";
if (Target==3) document.mainpic.src="images/gallery/clocktower.jpg";
if (Target==4) document.mainpic.src="images/gallery/doorhandles.jpg";
if (Target==5) document.mainpic.src="images/gallery/gatetop.jpg";
if (Target==6) document.mainpic.src="images/gallery/doortop.jpg";
}
if (gallery==3) {
if (Target==1) document.mainpic.src="images/gallery/interiordoors.jpg";
if (Target==2) document.mainpic.src="images/gallery/kitchencab.jpg";
if (Target==3) document.mainpic.src="images/gallery/kitchenhob.jpg";
if (Target==4) document.mainpic.src="images/gallery/cooker.jpg";
if (Target==5) document.mainpic.src="images/gallery/doordetail.jpg";
if (Target==6) document.mainpic.src="images/gallery/showerhead.jpg";
}
}
}

function pictureWindow(pictureNum){
if (pictureNum==0) {
gallery=0;
document.thumb1.src="images/gallery/cavalierthumb.jpg";
document.thumb2.src="images/gallery/presscutthumb.jpg";
document.thumb3.src="images/gallery/originalhallthumb.jpg";
document.thumb4.src="images/gallery/bellsthumb.jpg";
document.thumb5.src="images/gallery/churchthumb.jpg";
document.thumb6.src="images/gallery/saledocthumb.jpg";
document.mainpic.src="images/gallery/cavalier.jpg";
}
if (pictureNum==1) {
gallery=1;
if (galleryTwo==0) {
if(document.images) {
pickitchenA=new Image;
pickitchenA.src="image/gallery/grounds2thumb.jpg";
pickitchenB=new Image;
pickitchenB.src="image/gallery/aerialgroundsthumb.jpg";
pickitchenC=new Image;
pickitchenC.src="image/gallery/aerialview2thumb.jpg";
pickitchenD=new Image;
pickitchenD.src="image/gallery/copsethumb.jpg";
pickitchenE=new Image;
pickitchenE.src="image/gallery/groundsrearthumb.jpg";
pickitchenF=new Image;
pickitchenF.src="image/gallery/riverthumb.jpg";
pickitchenG=new Image;
pickitchenG.src="image/gallery/grounds2.jpg";
pickitchenH=new Image;
pickitchenH.src="image/gallery/aerialgrounds.jpg";
pickitchenI=new Image;
pickitchenI.src="image/gallery/aerialview2.jpg";
pickitchenJ=new Image;
pickitchenJ.src="image/gallery/copse.jpg";
pickitchenK=new Image;
pickitchenK.src="image/gallery/groundsrear.jpg";
pickitchenL=new Image;
pickitchenL.src="image/gallery/river.jpg";

document.thumb1.src="images/gallery/grounds2thumb.jpg";
document.thumb2.src="images/gallery/aerialgroundsthumb.jpg";
document.thumb3.src="images/gallery/aerialview2thumb.jpg";
document.thumb4.src="images/gallery/copsethumb.jpg";
document.thumb5.src="images/gallery/groundsrearthumb.jpg";
document.thumb6.src="images/gallery/riverthumb.jpg";
document.mainpic.src="images/gallery/grounds2.jpg";
galleryTwo=1;
}
}
else if (galleryTwo==1) {
document.thumb1.src="images/gallery/grounds2thumb.jpg";
document.thumb2.src="images/gallery/aerialgroundsthumb.jpg";
document.thumb3.src="images/gallery/aerialview2thumb.jpg";
document.thumb4.src="images/gallery/copsethumb.jpg";
document.thumb5.src="images/gallery/groundsrearthumb.jpg";
document.thumb6.src="images/gallery/riverthumb.jpg";
document.mainpic.src="images/gallery/grounds.jpg";
}
}
if (pictureNum==2) {
gallery=2; 
if (galleryThree==0) {
if(document.images) {
pickitchenA=new Image;
pickitchenA.src="image/gallery/decostatuethumb.jpg";
pickitchenB=new Image;
pickitchenB.src="image/gallery/windowthumb.jpg";
pickitchenC=new Image;
pickitchenC.src="image/gallery/clocktowerthumb.jpg";
pickitchenD=new Image;
pickitchenD.src="image/gallery/doorhandlesthumb.jpg";
pickitchenE=new Image;
pickitchenE.src="image/gallery/gatetopthumb.jpg";
pickitchenF=new Image;
pickitchenF.src="image/gallery/doortopthumb.jpg";
pickitchenG=new Image;
pickitchenG.src="image/gallery/decostatue.jpg";
pickitchenH=new Image;
pickitchenH.src="image/gallery/window.jpg";
pickitchenI=new Image;
pickitchenI.src="image/gallery/clocktower.jpg";
pickitchenJ=new Image;
pickitchenJ.src="image/gallery/doorhandles.jpg";
pickitchenK=new Image;
pickitchenK.src="image/gallery/gatetop.jpg";
pickitchenL=new Image;
pickitchenL.src="image/gallery/doortop.jpg";

document.thumb1.src="images/gallery/decostatuethumb.jpg";
document.thumb2.src="images/gallery/windowthumb.jpg";
document.thumb3.src="images/gallery/clocktowerthumb.jpg";
document.thumb4.src="images/gallery/doorhandlesthumb.jpg";
document.thumb5.src="images/gallery/gatetopthumb.jpg";
document.thumb6.src="images/gallery/doortopthumb.jpg";
document.mainpic.src="images/gallery/decostatue.jpg";
galleryThree=1;
}
}
else if (galleryThree==1) {
document.thumb1.src="images/gallery/decostatuethumb.jpg";
document.thumb2.src="images/gallery/windowthumb.jpg";
document.thumb3.src="images/gallery/clocktowerthumb.jpg";
document.thumb4.src="images/gallery/doorhandlesthumb.jpg";
document.thumb5.src="images/gallery/gatetopthumb.jpg";
document.thumb6.src="images/gallery/doortopthumb.jpg";
document.mainpic.src="images/gallery/decostatue.jpg";
}
}
if (pictureNum==3) {
gallery=3;
if (galleryFour==0) { 
if(document.images) {
pickitchenA=new Image;
pickitchenA.src="image/gallery/interiordoorsthumb.jpg";
pickitchenB=new Image;
pickitchenB.src="image/gallery/kitchencabthumb.jpg";
pickitchenC=new Image;
pickitchenC.src="image/gallery/kitchenhobthumb.jpg";
pickitchenD=new Image;
pickitchenD.src="image/gallery/cookerthumb.jpg";
pickitchenE=new Image;
pickitchenE.src="image/gallery/doordetailthumb.jpg";
pickitchenF=new Image;
pickitchenF.src="image/gallery/showerheadthumb.jpg";
pickitchenG=new Image;
pickitchenG.src="image/gallery/interiordoors.jpg";
pickitchenH=new Image;
pickitchenH.src="image/gallery/kitchencab.jpg";
pickitchenI=new Image;
pickitchenI.src="image/gallery/kitchenhob.jpg";
pickitchenJ=new Image;
pickitchenJ.src="image/gallery/cooker.jpg";
pickitchenK=new Image;
pickitchenK.src="image/gallery/doordetail.jpg";
pickitchenL=new Image;
pickitchenL.src="image/gallery/showerhead.jpg";

document.thumb1.src="images/gallery/interiordoorsthumb.jpg";
document.thumb2.src="images/gallery/kitchencabthumb.jpg";
document.thumb3.src="images/gallery/kitchenhobthumb.jpg";
document.thumb4.src="images/gallery/cookerthumb.jpg";
document.thumb5.src="images/gallery/cookerthumb.jpg";
document.thumb6.src="images/gallery/doordetailthumb.jpg";
document.mainpic.src="images/gallery/interiordoors.jpg";
galleryFour=1;
}
}
else if (galleryFour==1) {
document.thumb1.src="images/gallery/interiordoorsthumb.jpg";
document.thumb2.src="images/gallery/kitchencabthumb.jpg";
document.thumb3.src="images/gallery/kitchenhobthumb.jpg";
document.thumb4.src="images/gallery/cookerthumb.jpg";
document.thumb5.src="images/gallery/cookerthumb.jpg";
document.thumb6.src="images/gallery/doordetailthumb.jpg";
document.mainpic.src="images/gallery/interiordoors.jpg";
}
}
}

function switchText(Target) {
if (document.all) {
document.all["gallerycopy"].style.fontFamily="Verdana, Arial, Helvetica, sans-serif";
document.all["gallerycopy"].style.fontSize="10px";
document.all["gallerycopy"].style.color="#003300";
document.all["gallerycopy"].style.fontWeight="bold";
}
if (document.getElementById) {
document.getElementById("gallerycopy").style.fontFamily="Verdana, Arial, Helvetica, sans-serif";
document.getElementById("gallerycopy").style.fontSize="10px";
document.getElementById("gallerycopy").style.color="#003300";
document.getElementById("gallerycopy").style.fontWeight="bold";
}
var words4 = "interiors gallery";
var words3 = "features gallery";
var words2 = "grounds gallery";
var words1 = "history gallery";


if (Target==0) document.all["gallerycopy"].innerText=words1;
if (Target==1) document.all["gallerycopy"].innerText=words2;
if (Target==2) document.all["gallerycopy"].innerText=words3;
if (Target==3) document.all["gallerycopy"].innerText=words4;
}

