<!-- Hide script from old browsers
//********************** Data for all picture gallerys. except homes*********  	
//**************** Start of Hopes and text ****************************
HopePhotos = new Array(	
		"imagesgallerys/hharbour1.jpg",	
		"imagesgallerys/hbeach2.jpg",
		"imagesgallerys/hinner1.jpg",
        "imagesgallerys/hbeachslip.jpg",
		"imagesgallerys/houter1.jpg",
		"imagesgallerys/hbeach1.jpg",
		"imagesgallerys/hbeach3.jpg",
		"imagesgallerys/hbolt1.jpg",
		"imagesgallerys/hharbour2.jpg",
		"imagesgallerys/hinner2.jpg",
		"imagesgallerys/hinner3.jpg",
		"imagesgallerys/hslipway.jpg")		
// Do not put newlines or double quotes within the array texts else it fails: \n = newline
HopeText = new Array(
        "Hope Cove from coast path.",
        "Harbour beach looking towards Inner Hope Cove.",
        "View by Trellis Cottage Inner Hope Cove.",
        "Inner Hope beach and slipway.",
        "Outer Hope Cove.",
        "Slipway to Harbour Beach in Outer Hope Cove.",
        "Harbour Beach looking towards May Villa.",
        "Bolt Tail which shelters Hope Cove.",
        "Hope Cove from coast path.",
        "Thatched Cottages of Inner Hope Cove.",
        "Inner Hope Square.",
        "Boating activities at Inner Hope Cove.")
//**************** End of Hope photos and text ****************************

//**************** Start of Index photos and text ****************************
IndexPhotos = new Array(
     	"imagesgallerys/hharbourhome.jpg",	
		"imagesgallerys/bavon1.jpg",
		"imagesgallerys/agarahome.jpg",
		"imagesgallerys/akingshome.jpg",
		"imagesgallerys/aicc1.jpg",
		"imagesgallerys/amiltonhome.jpg",
		"imagesgallerys/astarthome.jpg",
		"imagesgallerys/bburgh2.jpg",
		"imagesgallerys/aslaptonhome.jpg",
		"imagesgallerys/hsailboats.jpg",
                "imagesgallerys/askim.jpg")
// Do not put newlines or double quotes within the array texts else it fails: \n = newline
IndexText = new Array(
        "View of Hope Cove. Two of our holiday homes are in Hope Cove",		
        "Avon Estuary by Bantham, near to Well Cottage.",
        "Coves near Gara Rock.",
        "Market Town of Kingsbridge.",
        "Sailing on the Kingsbridge/Salcombe Estuary.",
        "South Milton Beach near Thurlestone.",
        "Near Start Point.",
        "Burgh Island.",
        "Torcross and Slapton Sands.",
        "Bolt Tail by Hope Cove.",
        "Skimboarding at Hope Cove.")
//**************** End of Index photos and text ****************************

//**************** Start of Bantham photos and text ****************************
BanthamPhotos = new Array(
    	"imagesgallerys/bburgh4.jpg",	
		"imagesgallerys/bbantham1.jpg",
		"imagesgallerys/bavon3.jpg",
		"imagesgallerys/bbuckland3.jpg",
		"imagesgallerys/bquay.jpg",
		"imagesgallerys/bburgh1.jpg",
		"imagesgallerys/bbantham2.jpg",
		"imagesgallerys/bbeach3.jpg",
		"imagesgallerys/bavon5.jpg",
		"imagesgallerys/bbuckland2.jpg",
		"imagesgallerys/bbuckzoom1.jpg")
// Do not put newlines or double quotes within the array texts else it fails: \n = newline
BanthamText = new Array(
        "Burgh Island and causeway.",		       
        "Bantham Village.",
        "Avon Estuary.",
        "Cottages in West Buckland.",
        "Bantham Quay.",
        "Burgh Island from Thurlestone Golf Course.",
        "Bantham and the Avon.",
        "Bantham Beach.",
        "Burgh Island from the Avon River footpath.",
        "Lane by Well Cottage West Buckland.",
        "View of West Buckland including Well Cottage.")
        
//**************** End of Bantham photos and text ****************************

//**************** Start of Local Area info photos and text ****************************
LocalPhotos = new Array(	
		"images/agaraarea.jpg",
		"images/akingsarea.jpg",
		"images/asouthpool.jpg",
		"images/asheep.jpg",
		"images/astartarea.jpg",
		"images/bavonboats2.jpg",
		"images/aicc3.jpg",
		"images/athurlerock.jpg",
    	"images/abowbridge.jpg",
		"images/agarawalk.jpg",
		"images/bavon4.jpg",
		"images/hharbourarea.jpg")
// Do not put newlines or double quotes within the array texts else it fails: \n = newline
LocalText = new Array(
        "Walking near Gara rock.",		
        "The Quay at Kingsbridge.",
        "Peaceful village scene.",
        "Friendly locals.",
        "Start Point.",		
        "Avon Estuary.",
        "Sailing activities for all ages near Salcombe.",
        "Thurlestone Rock.",
        "Bow Bridge near Kingsbridge.",
        "One of many coastal walks.",
        "Avon Estuary looking towards Burgh Island.",
        "One of the beaches at Hope Cove.")
//**************** End of Local Area info photos and text ****************************

//************************* End of Data for all picture gallerys. **********************

//===============start of main to declare globals ===================
var IndexPhotoCount = 0;
var IndexPics = new Array(16);
var PicNumber = 0;

var PhotoWins = 0;                      //obsolete as a t25 march 2009                    
var PhotoWin;                           //obsolete as a t25 march 2009 
var MapWin;                             //obsolete as a t25 march 2009 
var g_MapWinFlag    = 0;                //obsolete as a t25 march 2009 

var trellis     = new Image;			// images for preloading the photos.
var mayvilla    = new Image;
var well        = new Image;
var trellisy	= new Image;            //image for preloading the yellow pics for map
var mayvillay   = new Image;            //image for preloading the yellow pics for map
var welly   	= new Image;            //image for preloading the yellow pics for map
var sunset      = new Image;

    var firefox = (navigator.userAgent.indexOf("Firefox"));
    if (firefox > 0)         //firefox browser cannot do revealTrans
    {    
        firefox = true; 
    }
    else
    {    
        firefox = false;  
    }
    var netscape = false;
    if (navigator.appName.indexOf("Netscape") == 0)
    {
         netscape = true;
    }

//==================================================
function alertme (message)
{
	alert(message);
}
//**************************************************

function InitialiseMain()
{
    trellis.src   =     "images/t1.jpg";
    mayvilla.src  =     "images/m1.jpg";
    well.src      =     "images/w1.jpg";
    sunset.src    =     "images/tsunset1.jpg";
}
//**************************************************

function InitialiseMap()
{ 
	trellis.src  	=	"images/prtrellis.jpg";
	mayvilla.src	=	"images/viewside.jpg";
	well.src    	=	"images/wellfront1a.jpg";
	trellisy.src	=	"images/prtrellisyell.jpg";
	mayvillay.src	=	"images/viewsideyell.jpg";
	welly.src   	=	"images/wellfront1ayell.jpg";
}

//*****************************************************
function InitialisePage(Page)
{
    PicNumber=0;
    IndexPhotoCount=eval(Page + "Photos").length - 1;			//Preload the album photos
    for(var iCount = 0; iCount <= IndexPhotoCount; iCount++)
    {   
         IndexPics[iCount] = null;
         IndexPics[iCount] = new Image;
         IndexPics[iCount].src = eval(Page + "Photos")[iCount];
    }
}

//*********************************************************
function Nextphoto(Page,direction)
{
    
    if (document.images)
    {
        switch(direction)
        {
        case 88:
	        document.backwards.src="imagegifs/pointedbutton.gif";
        	break;
        case 89:
	        document.backwards.src="imagegifs/pointingbutton.gif";
        	break;
        case 98:
	        document.forwards.src="imagegifs/pointedbutton.gif";
        	break;
        case 99:
	        document.forwards.src="imagegifs/pointingbutton.gif";
	        break;
        default:
	       PicNumber = PicNumber + direction;
    
	       if (PicNumber > IndexPhotoCount)
	       {
	            PicNumber = 0;
	       }
	       if (PicNumber < 0) 
	       {
	            PicNumber = IndexPhotoCount;
	       }
           if (firefox)
           {   
             //cannot do reveal sstuff
           }
           else
           {  
	          document.Photo.filters["revealTrans"].apply();  
	          document.Photo.filters["revealTrans"].play();
           }
	       document.Photo.src= IndexPics[PicNumber].src;
	       document.getElementById("head5").firstChild.nodeValue=eval(Page + "Text")[PicNumber];
       }
    }
}
//*********************************************************
function displayhouse(num,house,house2)			// Rollovers for the map
{
	if (document.images)
	{
		switch(num)
		{
		case 1:
			document.House1.src = eval(house + ".src");
			document.House4.src = eval(house2 + ".src");
			break;
//		case 2:      //was Allys Mill
//			document.House2.src = eval(house + ".src");
//			break;
		case 3:
			document.House3.src = eval(house + ".src");
			break;
//		case 4:      //not used
//			document.House4.src = eval(house + ".src");
//			break;
		}
	}
}
//***************************************************************
function ShowFirstPhotoText(Page) 	//Displays the text for the first Photo 
{  
    if (navigator.appName.indexOf("Netscape") == 0)
    {  
         document.Photo.src=IndexPics[0].src;  
         document.getElementById("head5").firstChild.nodeValue=eval(Page + "Text")[0];
     }
     else
     {   
         document.Photo.src=IndexPics[0].src; 
         document.getElementById("head5").firstChild.nodeValue=eval(Page + "Text")[0];
     }
}
//****************************************************************
function OpenOtherSites(OtherSite)
{  
     window.open(OtherSite,"","");
}
//****************************************************************
//All below now unused as at 25.02.2009
//****************************************************************
/*
function OpenNewWindow(Table)
{
     window.open(Table + ".html");
}
//****************************************************************
function OpenMapWindow()
{   alert("at start of open  " + g_MapWinFlag);
    if(g_MapWinFlag == 0)   
    {
	window.open("map.html",'','menubar=no, scrollbars=yes, resizable=yes, width=780, height=580, top=0, left=0,');
    g_MapWinFlag = 1;
	
    }   
}
/************************************************************
function CloseMapWindow(OpenFlag)
{
    window.history.go(-1);
}
		parent.close();


function printpage()
{  
     window.print();
}
function OpenPhotoWindow(photo)
{  
   if(!PhotoWin)   
   {
      PhotoWin = window.open(photo,'','width=460,height=300,border=200,top=100,left=100,resizable');
      PhotoWins+=1;
   }  
}
function ClosePhotoWindow()
{ 
   if(PhotoWin && !PhotoWin.closed)
   {
      PhotoWin.close();
   }
}

function OpenOtherSites()
{  
     window.open("http://www.devon-holiday.com","",
                      "width = 730, height = 480, toolbar=1,status=1,menubar=1,scrollbars=1,resizable=1");
}
*/
// End hiding script from old browsers -->

