function newPic() 
{
  this.ID = '';
  this.URL = '';
  this.caption = '';
  this.summary = '';
  this.credit = '';
  this.creditLink = '';
}

//hotel
var pic1A = new newPic();
pic1A.ID = '1A';
pic1A.URL = 'siteImgs/gallery/hotel/fs/bar.jpg';
pic1A.caption = 'The Caley Bar';
pic1A.summary = 'The hotels bar, known locally as \'The Caley\', is the centre of a great night out in Portree and is always popular with locals and visitors alike.<br /><br />The bar offers regular live music, pool, darts, great food and a warm welcome.<br /><br /><a href="bar.html">Find out more about the Caley Bar</a>';

var pic1B = new newPic();
pic1B.ID = '1B';
pic1B.URL = 'siteImgs/gallery/hotel/fs/bar-alt.jpg';
pic1B.caption = 'The Caley Bar';
pic1B.summary = 'The hotels bar, known locally as \'The Caley\', is the centre of a great night out in Portree and is always popular with locals and visitors alike.<br /><br />The bar offers regular live music, pool, darts, great food and a warm welcome.<br /><br /><a href="bar.html">Find out more about the Caley Bar</a>';

var pic1C = new newPic();
pic1C.ID = '1C';
pic1C.URL = 'siteImgs/gallery/hotel/fs/dining-room.jpg';
pic1C.caption = 'Dining Room';
pic1C.summary = 'Breakfast in our light and airy Dining room. A hearty Scottish breakfast will set you up for the rest of the day!';

var pic1D = new newPic();
pic1D.ID = '1D';
pic1D.URL = 'siteImgs/gallery/hotel/fs/dining-room-alt.jpg';
pic1D.caption = 'Reception';
pic1D.summary = 'A warm welcome awaits you at the Caledonian Hotel. Our friendly, local staff are always on hand to help.';

var pic1F = new newPic();
pic1F.ID = '1F';
pic1F.URL = 'siteImgs/gallery/hotel/fs/double-room-alt.jpg';
pic1F.caption = 'Double Room';
pic1F.summary = 'Our rooms are modern and tastefully furnished with en suite shower rooms. All have satellite TV, tea/coffe making facilities, telephone and hair dryers.';

var pic1G = new newPic();
pic1G.ID = '1G';
pic1G.URL = 'siteImgs/gallery/hotel/fs/double-room-alt2.jpg';
pic1G.caption = 'Double Room';
pic1G.summary = 'Our rooms are modern and tastefully furnished with en suite shower rooms. All have satellite TV, tea/coffe making facilities, telephone and hair dryers.';

var pic1J = new newPic();
pic1J.ID = '1J';
pic1J.URL = 'siteImgs/gallery/hotel/fs/family-room.jpg';
pic1J.caption = 'Family Room';
pic1J.summary = 'Our Family rooms have a double bed and a set off full sized bunk beds and can accommodate 4. A cot can also be arranged on request.';

var pic1L = new newPic();
pic1L.ID = '1L';
pic1L.URL = 'siteImgs/gallery/hotel/fs/family-room-alt2.jpg';
pic1L.caption = 'Family Room';
pic1L.summary = 'Our Family rooms have a double bed and a set off full sized bunk beds and can accommodate 4. A cot can also be arranged on request.';

var pic1O = new newPic();
pic1O.ID = '1O';
pic1O.URL = 'siteImgs/gallery/hotel/fs/twin-room-alt.jpg';
pic1O.caption = 'Twin Room';
pic1O.summary = 'Our rooms are modern and tastefully furnished with en suite shower rooms. All have satellite TV, tea/coffe making facilities, telephone and hair dryers.';

var pic1P = new newPic();
pic1P.ID = '1P';
pic1P.URL = 'siteImgs/gallery/hotel/fs/twin-room-alt2.jpg';
pic1P.caption = 'Twin Room';
pic1P.summary = 'Our rooms are modern and tastefully furnished with en suite shower rooms. All have satellite TV, tea/coffe making facilities, telephone and hair dryers.';

var pic1S = new newPic();
pic1S.ID = '1S';
pic1S.URL = 'siteImgs/gallery/hotel/fs/room-view.jpg';
pic1S.caption = 'View from one of our Rooms';
pic1S.summary = 'Some of our rooms have stunning views over the local scenery.<br /><br />If you would prefer one of these rooms, please request this at the time when booking.';

var pic1T = new newPic();
pic1T.ID = '1T';
pic1T.URL = 'siteImgs/gallery/hotel/fs/room-view-alt.jpg';
pic1T.caption = 'View from one of our Rooms';
pic1T.summary = 'Some of our rooms have stunning views over the local scenery.<br /><br />If you would prefer one of these rooms, please request this at the time when booking.';

var pic1U = new newPic();
pic1U.ID = '1U';
pic1U.URL = 'siteImgs/gallery/hotel/fs/hotel.jpg';
pic1U.caption = 'The Urquhart Caledonian Hotel';
pic1U.summary = 'The Urquhart Caledonian Hotel from Wentworth Street in the centre of Portree.';

//island
var pic2B = new newPic();
pic2B.ID = '2B';
pic2B.URL = 'siteImgs/gallery/island/fs/old-man-of-storr.jpg';
pic2B.caption = 'The Old Man of Storr';
pic2B.summary = 'Skye has  a wealth of dramatic landscapes.  The Old Man of Storr, at the north end of the island is a landmark that can be seen from miles away.  Watch out for it as you are approaching Portree from the south.';

var pic2N = new newPic();
pic2N.ID = '2N';
pic2N.URL = 'siteImgs/gallery/island/fs/storr-winter.jpg';
pic2N.caption = 'The Old Man of Storr';
pic2N.summary = 'Skye is not just for the summer visitor. Beautiful all the year round, it\'s a great place to visit in any season.';

var pic2C = new newPic();
pic2C.ID = '2C';
pic2C.URL = 'siteImgs/gallery/island/fs/black-cuillins.jpg';
pic2C.caption = 'The Black Cuillins';
pic2C.summary = 'Skye has been described as a climber’s paradise and with 12 Munros it’s a well deserved title.  There are also many walks through the Cuillins of varying difficulty.';

var pic2E = new newPic();
pic2E.ID = '2E';
pic2E.URL = 'siteImgs/gallery/island/fs/cuillin-sunset.jpg';
pic2E.caption = 'Sunset over The Cuillin Hills';
pic2E.summary = 'Skye is the place to come for rest and relaxation in beautiful surroundings.  10 minutes walk from the Hotel and you could be enjoying this view over Portree Bay to the Cuillins in the distance.';

var pic2G = new newPic();
pic2G.ID = '2G';
pic2G.URL = 'siteImgs/gallery/island/fs/cuillin-sunset-elgol.jpg';
pic2G.caption = 'Sunset over The Cuillin Hills from Elgol';
pic2G.summary = 'Skye is the ideal place to come for peace and quiet. A fantastic location for a romantic getaway.';

var pic2i = new newPic();
pic2i.ID = '2i';
pic2i.URL = 'siteImgs/gallery/island/fs/cuillin-view.jpg';
pic2i.caption = 'The Cuillin Hills';
pic2i.summary = 'Skye can boast some of the most spectacular scenery in the country, from rugged mountains to rolling moorland and clean sandy beaches.';

var pic2j = new newPic();
pic2j.ID = '2j';
pic2j.URL = 'siteImgs/gallery/island/fs/overcast-scenery.jpg';
pic2j.caption = 'The Cuillins and Camasunary from Elgol';
pic2j.summary = 'Skye can boast some of the most spectacular scenery in the country, from rugged mountains to rolling moorland and clean sandy beaches.';

var pic2k = new newPic();
pic2k.ID = '2k';
pic2k.URL = 'siteImgs/gallery/island/fs/quiraing.jpg';
pic2k.caption = 'The Quiraing';
pic2k.summary = 'Skye has a diversity of landscapes, from green hills and rolling moorland to rugged mountains.';

var pic2l = new newPic();
pic2l.ID = '2l';
pic2l.URL = 'siteImgs/gallery/island/fs/skye-mountains.jpg';
pic2l.caption = 'Looking South from the Old Man of Storr';
pic2l.summary = 'Skye is famous for climbing but it\'s great for walking too.  You don\'t get views like this from your car!';

var pic2O = new newPic();
pic2O.ID = '2O';
pic2O.URL = 'siteImgs/gallery/island/fs/portree-rainbow.jpg';
pic2O.caption = 'Portree';
pic2O.summary = 'It\'s central location makes Portree the ideal base for exploring the rest of the Island.  The village has a wide range of amenities with plenty of shops and restaurants.';

var pic2P = new newPic();
pic2P.ID = '2P';
pic2P.URL = 'siteImgs/gallery/island/fs/skye-sunset.jpg';
pic2P.caption = 'Sunset from Stein';
pic2P.summary = 'Skye is the ideal place to come for peace and quiet. A fantastic location for a romantic getaway.';

var pic2A = new newPic();
pic2A.ID = '2A';
pic2A.URL = 'siteImgs/gallery/island/fs/white-tailed-sea-eagle.jpg';
pic2A.caption = 'White-tailed Sea Eagle';
pic2A.summary = 'The White Tailed Sea Eagle - A spectacular sight! The Cliffs round Portree Bay are home to a breeding pair. Take aboat trip and see them in action.';
pic2A.credit = 'Laurie Campbell';

var pic2D = new newPic();
pic2D.ID = '2D';
pic2D.URL = 'siteImgs/gallery/island/fs/bottle-nosed-dolphin.jpg';
pic2D.caption = 'Bottle-nose Dolphin';
pic2D.summary = 'The Bottle Nosed Dolphin is a common sight in our waters. Not at all shy, these playful creatures will often come up close to boats out in the bay.';
pic2D.credit = 'Laurie Campbell';

var pic2F = new newPic();
pic2F.ID = '2F';
pic2F.URL = 'siteImgs/gallery/island/fs/minke-whale.jpg';
pic2F.caption = 'Minke Whale';
pic2F.summary = 'Skye is home to a wide variety of marine life. The Minke Whale is a regular visitor to our waters.';
pic2F.credit = 'Laurie Campbell';

var pic2H = new newPic();
pic2H.ID = '2H';
pic2H.URL = 'siteImgs/gallery/island/fs/gannet.jpg';
pic2H.caption = 'Gannet';
pic2H.summary = 'Skye is home to a wide variety of seabirds.  The Gannet is a commonly seen resident.';
pic2H.credit = 'Laurie Campbell';

var pic2M = new newPic();
pic2M.ID = '2M';
pic2M.URL = 'siteImgs/gallery/island/fs/otter-alt.jpg';
pic2M.caption = 'Sea Otter';
pic2M.summary = 'Once a rarity, the Sea Otter has made something of a comeback in recent years and it is now possible to see them in their natural habitat.';
pic2M.credit = 'Laurie Campbell';

var pic2Q = new newPic();
pic2Q.ID = '2Q';
pic2Q.URL = 'siteImgs/gallery/island/fs/highland-cattle.jpg';
pic2Q.caption = 'Highland Cattle';
pic2Q.summary = 'The Highlands are famous for their hospitality and you will get a warm friendly welcome on Skye.  The locals are always happy to stop for a chat.';

var pic2R = new newPic();
pic2R.ID = '2R';
pic2R.URL = 'siteImgs/gallery/island/fs/sheep.jpg';
pic2R.caption = 'Sheep';
pic2R.summary = 'More friendly locals. Watch out for these ones on the roads, they don’t know their Highway Code!';

//visitor
/* none yet */


var fadeSwitch = 0;

function showCat(catID)
{
	var hideId = 1;
	while(document.getElementById('galleryThumbs'+hideId)){document.getElementById('galleryThumbs'+hideId).style.display='none';++hideId;}
	document.getElementById('galleryThumbs'+catID).style.display = 'block';
	setPos();
}

var imgID = '';
function showImage(imgIDLocal)
{	
	fadeSwitch = 1;
	imgID = imgIDLocal;
	document.getElementById('picCaption').innerHTML = '&nbsp;';
	document.getElementById('infoInner').innerHTML = '<p>Picture Loading...</p>';
	fadePic();
}

var opacityVal = 100;
var firstLoad = 0;
function fadePic()
{
	firstLoad =1;
	opacityVal2 = 0;
	if(opacityVal > 0)
	{
		--opacityVal;
		--opacityVal;
		document.getElementById('galleryImg').style.opacity = (opacityVal2 / 100); // opera /safari
		document.getElementById('galleryImg').style.filter = "alpha(opacity=" + opacityVal + ")"; //IE
		document.getElementById('galleryImg').style.MozOpacity = opacityVal / 100; //FF
		t = setTimeout('fadePic()', 1);
	}
		else
	{
		document.getElementById('galleryImg').src=window['pic'+imgID].URL;
	}
}

var opacityVal2 = 0;
function fadeIn()
{
	if(fadeSwitch == 1)
	{
		if(opacityVal2 < 100)
		{
			++opacityVal2;
			++opacityVal2;
			document.getElementById('galleryImg').style.opacity = (opacityVal2 / 100);// opera /safari
			document.getElementById('galleryImg').style.filter = "alpha(opacity=" + opacityVal2 + ")";  //IE
			document.getElementById('galleryImg').style.MozOpacity = opacityVal2 / 100; // FF
			t = setTimeout('fadeIn()', 1);
		}
			else
		{
			if(firstLoad == 1)
			{
			document.getElementById('galleryImg').alt=window['pic'+imgID].caption;
			document.getElementById('picCaption').innerHTML=window['pic'+imgID].caption;
			var outputString = '';
			if(window['pic'+imgID].summary != ''){outputString = outputString + '<p>'+window['pic'+imgID].summary+'</p>'}
			if(window['pic'+imgID].credit != '' && window['pic'+imgID].creditLink != ''){outputString = outputString + '<p>Picture by: <a href="'+window['pic'+imgID].creditLink+'" target="_blank">'+window['pic'+imgID].credit+'</a></p>'}
				else
			if(window['pic'+imgID].credit != ''){outputString = outputString + '<p>Picture by: '+window['pic'+imgID].credit+'</p>'}
			document.getElementById('infoInner').innerHTML = outputString;
			opacityVal = 100;
			setPos();
			}
		}
	}
}

function showCaption(imgID, titleID)
{
	document.getElementById('galleryTitle' + titleID).innerHTML = ' - '+window['pic'+imgID].caption;}

function hideCaption(titleID)
{
	document.getElementById('galleryTitle' + titleID).innerHTML = '&nbsp;';
}
