
<!--initialize those globals-->

var PageFlag="initialize";


<!--preload cottage page images-->

if (document.images)

{
var pic1= new Image(320,211);
pic1.src="./images/bigpics/cottage1-big.jpg";

var pic2= new Image(320,211);
pic2.src="./images/bigpics/cottage2-big.jpg";

var pic3= new Image(320,211);
pic3.src="./images/bigpics/cottage3-big.jpg";

var pic4= new Image(320,211);
pic4.src="./images/bigpics/cottage4-big.jpg";

var pic5= new Image(320,211);
pic5.src="./images/bigpics/cottage5-big.jpg";

var pic6= new Image(320,211);
pic6.src="./images/bigpics/cottage6-big.jpg";

}

<!--this underlines the menu choice as passed by the php script, as an indication of page. It also sets a global-->

function configMenuTitle(myPage)

{

PageFlag=myPage;
document.getElementById(myPage).style.borderColor="#663300";
return;
}




<!--this builds the arrays for the cottage page-->

var titleArray= new Array(6)
titleArray[0]="The Terrace and Garden";
titleArray[1]="The Kitchen & Dining Area";
titleArray[2]="The Sitting Room";
titleArray[3]="Bedroom One";
titleArray[4]="Bedrooms Two & Three";
titleArray[5]="Bathrooms";


var textArray= new Array(6)
textArray[0]="The terrace overlooks a private garden that runs down to broadleaf woodland; beyond lies the estuary foreshore.";
textArray[1]="The kitchen is light and airy with ample worktops in slate and oak.  There is plenty of storage space, a dishwasher, fridge and separate freezer. A washing machine is located in a cupboard in the hall where there is additional space for coats, boots and drying.";
textArray[2]="The sitting room looks out over the garden and estuary.  It has excellent lighting, plenty of comfortable seating and a wood burning stove. An arched window opens from the dining area onto the terrace and garden with views to the estuary beyond. There is a hardwood table and six chairs on the terrace.";
textArray[3]="This is a twin bedroom with views across the estuary, plenty of storage space and two comfortable chairs. It is on the ground floor and has its own bathroom."; 
textArray[4]="The double bedroom has views across the estuary and a king size bed.  The third bedroom has twin beds and has access to the original outdoor stone staircase.  All of the bedrooms have wardrobes and chests of drawers and good-quality, cotton bed-linen.";
textArray[5]="The bathrooms have baths and power showers with fittings of a high standard.  Both have heated towel rails and ceramic floor tiles.  Bath and hand towels are provided.";



<!--menu mouse over script-->

<!--some left over code put in a safe place '&& (PageFlag!==id)'-->


function swop_picture(imageflag,obj,id) 

{

var myRollOver=document.getElementById(id);

if (imageflag)

 { 
myRollOver.style.borderColor="#663300";
}

else if (!imageflag && (PageFlag!==id))
{
myRollOver.style.borderColor="#FFFFFF";
}

}



<!--view cottage thumbs-->


function viewthumbs(myNumber)

{
document.getElementById("Cottagebig").src= "images/bigpics/cottage"+myNumber+"-big.jpg";
displayText(myNumber);
}


function displayText(myNumber) 

{

var myTitleNode= document.getElementById("titleVar");
var new_title = document.createTextNode(titleArray[(myNumber-1)]);
  myTitleNode.replaceChild(new_title, myTitleNode.childNodes[0]);


 var myTextNode = document.getElementById("textVar");

var new_txt = document.createTextNode(textArray[(myNumber-1)]);
    myTextNode.replaceChild(new_txt, myTextNode.childNodes[0]);
}

function show_name(imageflag2)
{
var oldName=document.createTextNode("Design");
var newName=document.createTextNode("Evans Studio");
var myId=document.getElementById("credit");
if (imageflag2=="1") 
{
myId.replaceChild(newName,myId.childNodes[0]);
}
else
{
myId.replaceChild(oldName,myId.childNodes[0]);
}
}
