		function popBoxCMS(divContent,divTitle,xPage)
		{	
			
			document.getElementById('popBox').innerHTML = '';

			$('#'+divContent).html('Loading, Please wait...');
			$('#'+divContent).load(xPage, function(){
				popBox(divContent,divTitle);
			});
		}
		
		function popBox(divContent,divTitle)
		{	
		
			/* if (document.getElementById('salesmessage')) {
				hideFlash();
			} hide flash movie */
		
			 // Get the DOCUMENT height now the page has loaded
 
			 var docHeight = (document.height !== undefined) ? document.height : document.body.offsetHeight;
			
			 // Get the users browser window dimensions and set them as variables
			 var myWidth = 0, myHeight = 0;
			 var sizeWidth = 0, sizeHeight = 0;
			
			 if( typeof( window.innerWidth ) == 'number' ) 
			 {
			  //Non-IE
			  myWidth = window.innerWidth;
			  myHeight = window.innerHeight; 
			 } 
			 else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
			 {
			  //IE 6+ in 'standards compliant mode'
			  myWidth = document.documentElement.clientWidth;
			  myHeight = document.documentElement.clientHeight;
			 } 
			 else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
			 {   
			  //IE 4 compatible
			  var myWidth = document.body.clientWidth;
			  var myHeight = document.body.clientHeight;
			 }  
			 
			 try
			 {
			 sizeWidth = document.getElementById("TB_Sizer").style.width; 
			 sizeHeight = document.getElementById("TB_Sizer").style.height; 
			  }
			catch(err)
			  {
			 	sizeWidth ="650px";
				sizeHeight ="350px";			  
			  }

			sizeWidth = parseFloat(sizeWidth.substring(0,3));
			sizeHeight = parseFloat(sizeHeight.substring(0,3));
			
			 var leftPos  =  (myWidth/2)-(sizeWidth/2)
			 var topPos  =  (myHeight/2)-(sizeHeight/2)
			 

			 var content  =  document.getElementById(divContent).innerHTML;

			 // Now set all the layers and show popBox
			 			 
			 var showpopBox   = document.getElementById('popBox').style;

			document.getElementById('popBox').innerHTML = "<iframe style=\"width:645px; height:345px; left:"+leftPos+"px; top: "+ topPos +"px;  position:absolute; z-index:2000\" src=\"javascript:;\"></iframe><div  style=\"width:"+(sizeWidth)+"px; height:"+sizeHeight+"px; left:"+leftPos+"px; top: "+ topPos +"px;  position:absolute; z-index:3000;\"><div id='TB_title'><div id='TB_ajaxWindowTitle'>"+ divTitle +"</div><div id='TB_closeAjaxWindow'><table cellpadding=\"0\" cellspacing=\"0\" height=\"1\"><tr><td style=\"width:25px\"><img name=\"fontsize1\" id=\"fontsize1\" src=\"https://images.essentialtravel.co.uk/fontsize/a1.jpg\" title=\"Small Text\" style=\"padding:0 2px 0 2px; cursor:hand; cursor: pointer\" onClick=\"javascript:smallFont();\"></td><td style=\"width:25px\"><img name=\"fontsize2\" id=\"fontsize2\" src=\"https://images.essentialtravel.co.uk/fontsize/a2.jpg\" title=\"Medium Text\" style=\"padding:0 2px 0 2px; cursor:hand; cursor: pointer\" onClick=\"javascript:mediumFont();\"></td><td style=\"width:25px\"><img name=\"fontsize3\" id=\"fontsize3\" src=\"https://images.essentialtravel.co.uk/fontsize/a3.jpg\" title=\"Large Text\" style=\"padding:0 10px 0 2px; cursor:hand; cursor: pointer\" onClick=\"javascript:largeFont();\"></td><td><a href=\"javascript:closepopBox();\" id='TB_closeWindowButton'  title=\"Close Box\">&nbsp;</a></td></tr></table></div></div><div id='ajaxContentBack'><div id='ajaxContentGr'><div id='TB_ajaxContent' style=\"height:"+sizeHeight+"px; overflow-x: hidden;\">" + content + "</div></div></div><div id='TB_ajaxFooter'></div></div>";

			 showpopBox.display  =  showpopBox.display? "":"block";

			 // Also show the div that deals with the overlay of the webpage

			 var showOverlay =   document.getElementById('overlay').style;
			 document.getElementById('overlay').style.height = docHeight + "px";
			 //document.getElementById('overlay').style.width = docWidth + "px";
			 showOverlay.display = showOverlay.display? "":"block";
			 
		
		}
		
		
		function closepopBox()
		{	
			/* if (document.getElementById('salesmessage')) {
				showFlash();
			} show flash movie */
			
			var hidepopBox	= 	document.getElementById("popBox").style;
			hidepopBox.display = hidepopBox.display? "":"none";
			var hideOverlay =  document.getElementById('overlay').style;
			hideOverlay.display = hideOverlay.display? "":"none";
			
			// Reset Iframe behind the pop box
			if ( $("#DivShim").length > 0 ) {
				$("#DivShim").css({ display:"none" });
			}
			
		}
				
		
		function getRefToDivNest( divID, oDoc ) 
		{
			if( !oDoc ) 
			{ 
				oDoc = document; 
			}
			
			if( document.layers ) 
			{
		
				if( oDoc.layers[divID] ) 
				{ 
					return oDoc.layers[divID]; 
				} 
				else 
				{
					for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) 
					{
						y = getRefToDivNest(divID,oDoc.layers[x].document); 
					}
					return y; 
				} 
				
			}
			
			if( document.getElementById ) 
			{ 
				return document.getElementById(divID); 
			}
			
			if( document.all ) 
			{ 
				return document.all[divID]; 
			}
			
			return document[divID];
		}
		
		function loadpopBox(l,b,w,h,p,xOf,yOf,s) 
		{
			window.logoCount = ( typeof( window.logoCount ) == 'number' ) ? window.logoCount + 1 : 0;
			//create the logo
			if( document.layers ) 
			{
				document.write( '<layer id="logoNum' + window.logoCount + '" height="'+h+'" width="'+w+'" left="0" top="0"'+(b?' bgcolor="'+b+'"':'')+'>'+l+'</layer>' );
			} 
			else 
			{
				document.write( '<div id="logoNum' + window.logoCount + '" style="z-index:4000; position:absolute;left:0px;top:0px;'+(b?'background-color:'+b+';':'')+'height:'+h+'px;width:'+w+'px;">'+l+'</div><br>' );
			}
			window.setInterval('aniLogo(' + p + ',' + s + ',' + w + ',' + h + ',' + xOf + ',' + yOf + ',' + window.logoCount + ')',50);
		}
		
		function aniLogo(p,s,w,h,xOf,yOf,n) 
		{
			var myLogo = getRefToDivNest('logoNum'+n);
			if( !myLogo ) 
			{ 
				return; 
			} //not loaded yet or not supported
			if( myLogo.style ) 
			{ 
				myLogo = myLogo.style; 
			}
			//get the screen size so that we can put it in a corner and scroll . . .
			var scrW = 0, scrH = 0, scrOfX = 0, scrOfY = 0;
			if( typeof( window.innerWidth ) == 'number' ) 
			{ 
				scrW = window.innerWidth; scrH = window.innerHeight; 
			} 
			else 
			{
				if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
				{
					scrW = document.documentElement.clientWidth; scrH = document.documentElement.clientHeight; 
				} 
				else 
				{
					if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
					{
						scrW = document.body.clientWidth; scrH = document.body.clientHeight; 
					} 
				} 
			}
			if( typeof( window.pageYOffset ) == 'number' )
			{ 
				scrOfY = pageYOffset; scrOfX = pageXOffset; 
			} 
			else 
			{
				if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) 
				{ 
					scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; 
				} 
				else 
				{
					if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) 
					{ 
						scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; 
					} 
				}
			}

			
			var oPix = document.childNodes ? 'px' : 0;
			myLogo.left = ( xOf + ( ( p % 2 ) ? 0 : scrW - w ) + ( s ? scrOfX : 0 ) ) + oPix;
			myLogo.top = ( yOf + ( ( p < 3 ) ? 0 : scrH - h ) + ( s ? scrOfY : 0 ) ) + oPix;
		}
		
		// Font Sizes
			function smallFont() {
				document.getElementById("TB_ajaxContent").style.fontSize = "12px";
			}
			function mediumFont() {
				document.getElementById("TB_ajaxContent").style.fontSize = "16px";
			}
			function largeFont() {
				document.getElementById("TB_ajaxContent").style.fontSize = "20px";
			}
		
		// Hover Buttons
		
		function selectbuttonPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -40px";}
		
		function selectbuttonPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function nextbuttonPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -119px";}
		
		function nextbuttonPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function savebuttonPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -119px";}
		
		function savebuttonPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function deletebuttonPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -119px";}
		
		function deletebuttonPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -80px";}
		
		function payandconfirmbuttonPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -120px";}
		
		function payandconfirmbuttonPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function loginbuttonPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -119px";}
		
		function loginbuttonPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function gobuttonPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function gobuttonPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -80px";}
		
		function hotelChooseBtnPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function hotelChooseBtnPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -80px";}
		
		function checkAndChooseBtnPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function checkAndChooseBtnPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -80px";}
		
		function bookNowBtnPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function bookNowBtnPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -80px";}

