			var curSection;
			var curSelItem;
			var curPic;
			var playShow = false;
			var offId =-1;
			var cPId = 0;
			
			function showVideo()
			{
				playShow = false;
				$('videoDiv').style.display='';
				
			}
			
			
			function thisMovie(movieName) {
				// IE and Netscape refer to the movie object differently.
				// This function returns the appropriate syntax depending on the browser.
				if (navigator.appName.indexOf ("Microsoft") !=-1) {
					return window[movieName]
				} else {
					return document[movieName]
				}
				}
			
			function showImage(id)
			{
			
				var newImage = $('img' + id);
				
				if ($('videoDiv') != null)
					$('videoDiv').style.display='none';
					
				if (newImage != curPic)
				{
				playShow = false;
				Effect.Fade(curPic,{duration:2.0});
				Effect.Appear(newImage,{duration:2.0});
					
				curPic = newImage;
				cPId=id;
				$('restart').className = '';
				//window.setTimeout('resumeShow();',9000);
				}
			}
			
			
			
			function resumeShow()
			{
				$('restart').className = 'hidden';
				playShow = true;
				doShow();
			}
			
			function showItem(newElement, item)
			{
				if (curSection != null)
				{
					curSection.style.display='none';
				}
				
				if (curSelItem != null)
					curSelItem.className = '';
					
				curSelItem = item;
				
				curSelItem.className = 'selected';
				
				if (newElement.id.indexOf('special') >= 0)
				{
					$('pricingsummary').style.display = 'none';
				}
				else
				{
					$('pricingsummary').style.display = '';
				}
				
				curSection = newElement;
				
				Effect.Appear(newElement);
				newElement.style.display='';
				newElement.style.opacity = 0;
			}
			var nPic;
			function doShow()
			{
		
				if (playShow)
				{
				
					cPId++;
					if (cPId > nPic)
						cPId = 1;
						
					newPic=$('img' + cPId);
					Effect.Appear(newPic,{duration:2.0});
					if (curPic != null)
						Effect.Fade(curPic,{duration:2.0});
					curPic = newPic;
					if (nPic > 1)
						 window.setTimeout('doShow();',6000);
				}
			}
			
			function LoadPage()
			{
				playShow = true;
				
				curSection=$('overview');
				curSelItem=$('overviewlink');
				if (curSelItem != null)
					curSelItem.className = 'selected';
				
				var img;
				if ($('largepiccontainer') != null)
					img = ($('largepiccontainer').getElementsByTagName('img'));
				
				YAHOO.util.Event.addListener($('restart'),'click',function(e){resumeShow();});
				
				for(var j=0;j<img.length;j++)
				{
				
					img[j].style.display='none';
				
				}

				
				if ($('fcolink') != null)
				{
				
					YAHOO.util.Event.addListener($('fcolink'),'click',function(e){externalLink();});
				}
				
				if ($('extrahotelinfo') != null)
				{
					var extraItems = $('extrahotelinfo').getElementsByTagName('a');
					for(var i=0;i<extraItems.length;i++)
					{
					
						if (i==0)
						{
							YAHOO.util.Event.addListener($('overviewlink'),'click',function(e){showItem($('overview'),this); preventDefault(e);});
						}
						else
						{

							YAHOO.util.Event.addListener(extraItems[i],'click',new Function("e","showItem($('extra" + i + "'),this); preventDefault(e); return false;"));
						}
					}
				}
				
				
				
				if ($('img1') != null)
				{
				
					doShow();
				}
			}
			
			function setupSpecials()
			{
			
				if ($('specialslist') != null)
				{
				var specials = $('specialslist').getElementsByTagName('li');
				
				for(var i=0;i<specials.length;i++)
				{
					var lnk = specials[i].getElementsByTagName('a')[0];
					YAHOO.util.Event.addListener(lnk,'click',new Function("e","showItem($('special" + i + "'),this); preventDefault(e); return false;"));
				}
				}
			}
			
			function externalLink()
			{
				alert('A new window will now load with the appropriate page of the Foreign and Commonwealth Office Website.\r\nPlease note that Seasons in Style are not responsible for the content of external websites');
			}
			
			function setupOffers()
			{
			if (offId > -1)
				{
					if ($('special'+offId) != null)
						showItem($('special' + offId),$('specialslink' + offId));
				}
			}
			
			YAHOO.util.Event.onDOMReady(function(e){LoadPage(); preventDefault(e);});
			YAHOO.util.Event.addListener(window,'load',function(e){setupSpecials(); preventDefault(e);});
			YAHOO.util.Event.addListener(window,'load',function(e){setupOffers(); preventDefault(e);});
			
			
