var sGwaliaDescription = "Featuring an open log fire with welsh slate surround. Also Electric Fires.";

function myArray()
{
sJPGArray      = new Array(15); //String sJPGArray [] = {""};
sTEXTArray     = new Array(15); //String sTEXTArray[] = {""};
sUserTextArray = new Array(15); //String sUserTextArray[] = {""};

sJPGArray [0] = "HillsOutFront.JPG"; sTEXTArray [0] = "There are scenic mountain and sea views from the cottages."; sUserTextArray [0] = "Hills at Front";
sJPGArray [1] = "FrontWindowView.JPG"; sTEXTArray [1] = "There are mountains and hills to walk or the nearest beach is just 3 and a half miles away at Nefyn."; sUserTextArray [1] = "Bathroom Window View";
sJPGArray [2] = "KitchenSmallWindow.JPG"; sTEXTArray [2] = "1 mile up the hill is one of britains best preserved stone age fortresses called     (Tre-Ceiri)."; sUserTextArray [2] = "Kitchen Small Window";
sJPGArray [3] = "BackView.JPG"; sTEXTArray [3] = "The famous 60s TV series -The Prisoner- was filmed at Port-Meirion which is 20 miles away."; sUserTextArray [3] = "Back Window View";
sJPGArray [4] = "BackWindowKitchen.JPG"; sTEXTArray [4] = "The nearest town is Pwllheli with a cinema, leisure centre, and small fairground."; sUserTextArray [4] = "Back Window Kitchen";
sJPGArray [5] = "OutRight.JPG"; sTEXTArray [5] = "1 mile up the hill is one of the best preserved stone age fortresses (Tre-Ceiri). Which is great!"; sUserTextArray [5] = "Front of Cottages Right";
sJPGArray [6] = "OutLeft.JPG"; sTEXTArray [6] = "The Village has a FOOTBALL and RUGBY pitch and a small swing park. Also a pub and shop/post office."; sUserTextArray [6] = "Front of Cottages Left";
sJPGArray [7] = "FirePlace.JPG"; sTEXTArray [7] = "Useable Log/coal fire or electric fire."; sUserTextArray [7] = "FirePlace";
sJPGArray [8] = "FrontBedroom.JPG"; sTEXTArray [8] = "Sleeps 5, bunk beds and double bed, cot if required."; sUserTextArray [8] = "Front Bedroom";
sJPGArray [9] = "BackBedroom.JPG"; sTEXTArray [9] = "Sleeps 3, bunk beds and single bed."; sUserTextArray [9] = "Back Bedroom";
sJPGArray [10] = "Bathroom.JPG"; sTEXTArray [10] = "Large Bathroom with full suite and electric shower also outside toilet."; sUserTextArray [10] = "Bathroom";
sJPGArray [11] = "RhianfaFront.JPG"; sTEXTArray [11] = "Featuring an en-suite bathroom."; sUserTextArray [11] = "Rhianfa";
sJPGArray [12] = "LivingRoom.JPG"; sTEXTArray [12] = "Featuring a TV, stereo system and Childrens Games."; sUserTextArray [12] = "Living Room";
sJPGArray [13] = "Kitchen.JPG"; sTEXTArray [13] = "Washer/Dryer/Microwave/Electric cooker/Fridge with small freezer."; sUserTextArray [13] = "Kitchen";
sJPGArray [14] = "TheCaliforniaOutside.JPG"; sTEXTArray [14] = "Sleeps 8 per 2 bedroom flat. On first and second floors. Close to the train and bus stations in Colwyn Bay."; sUserTextArray [14] = "The California";

for (i=0; i<=14; i++)
{
  document.write('<P><A HREF="JavaScript:changeimage(&quot;' +sJPGArray[i]+ '&quot;);JavaScript:changetext(&quot;'  +sTEXTArray[i]+ '&quot;)"> ' +sUserTextArray[i]+  '</A>');
}

}

function changeimage(theNewImage)
{
	// works across browsers
	parent.Centre.window.scroll (0,100);
	parent.Centre.document.form1.img1.src=theNewImage;
}

function changetext(theNewText)
{
	parent.Centre.document.form1.info1.value=theNewText;
}



// header specific init called from header
function init()
{
	parent.Centre.window.scroll (0,100);
	sStringy = "";
	sStringy = unescape(document.cookie.substr(15,100) );
	if (sStringy != "")
	{
		alert("Welcome back " + sStringy);
	}
}

function alterPic(sImageControlName)
{
// NOTE THAT THE sImageControlName is both the image prefix and the control name eg. Gwalia

	window.status = sImageControlName + " information";

	sCurrentImageJPGPath = document.images[sImageControlName].src;

	if ( sCurrentImageJPGPath.indexOf ('_Off.jpg') > 1) 
	{
		sNewImage = sImageControlName + '_On.jpg';
	}
	else
	{
		sNewImage = sImageControlName + '_Off.jpg';
	}
	
	document.images[sImageControlName].src=sNewImage;
}

function gwaliainfo()
{
	document.write('<P><TT><A HREF="JavaScript:changeimage(&quot;GwaliaFront.JPG&quot;);JavaScript:changetext(sGwaliaDescription)" <FONT SIZE=3 FACE="TimesRoman"><SPAN STYLE="font-size:15;">Gwalia</SPAN></FONT></A></TT>');
}