			function popBoxCMS(divContent,divTitle,xPage)
		{	
			ajax_loadContentPopBox(divContent, xPage, divTitle);
		}
		
		function popBox(divContent,divTitle)
		{	
			 // 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 ="330px";
				sizeHeight ="330px";			  
			  }
			
			sizeWidth = parseFloat(sizeWidth.substring(0,3));
			sizeHeight = parseFloat(sizeHeight.substring(0,3));
			
			 var leftPos  =  (myWidth/2)-(sizeWidth/2)
			 var topPos  =  (myHeight/2)-(sizeHeight/2)
			 
			 // Grab the content you want to display in popBox
			 
			 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:"+(sizeWidth-5)+"px; height:"+(sizeHeight+75)+"px; left:"+leftPos+"px; top: "+ topPos +"px;  position:absolute; z-index:2\" src=\"#\"></iframe><div  style=\"width:"+(sizeWidth)+"px; height:"+sizeHeight+"px; left:"+leftPos+"px; top: "+ topPos +"px;  position:absolute; z-index:3;\"><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 id=\"fontsize1\" src=\"https://insurance.essentialtravel.co.uk/images/apd/a1.png\" title=\"Small Text\" style=\"padding:0 2px 0 2px; cursor:hand; cursor: pointer\" onClick=\"javascript:smallFont();\"></td><td style=\"width:25px\"><img id=\"fontsize2\" src=\"https://insurance.essentialtravel.co.uk/images/apd/a2.png\" title=\"Medium Text\" style=\"padding:0 2px 0 2px; cursor:hand; cursor: pointer\" onClick=\"javascript:mediumFont();\"></td><td style=\"width:25px\"><img id=\"fontsize3\" src=\"https://insurance.essentialtravel.co.uk/images/apd/a3.png\" 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></tr></table></div></div><div id='ajaxContentBack'><div id='ajaxContentGr'><div id='TB_ajaxContent' style=\"height:"+sizeHeight+"px\">" + 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";

		
		}
		
		// Hide popBox and the overlay div
		
		function closepopBox()
		{	
			var hidepopBox	= 	document.getElementById("popBox").style;
			hidepopBox.display = hidepopBox.display? "":"none";
			var hideOverlay =  document.getElementById('overlay').style;
			hideOverlay.display = hideOverlay.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:103; 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; 
					} 
				}
			}
		
			//now we have the screen settings in all known DHTML browsers - cool huh?
			//apply those settings along with positioning and scrolling preference to find offset positions
			
			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 = "85%";
			}
			function mediumFont() {
				document.getElementById("TB_ajaxContent").style.fontSize = "100%";
			}
			function largeFont() {
				document.getElementById("TB_ajaxContent").style.fontSize = "140%";
			}


		// Hover Buttons
		
		function selectbuttonPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function selectbuttonPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -80px";}
		
		
		
		function nextbuttonPosA(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px 0px";}
		
		function nextbuttonPosB(xButtonID)
		{document.getElementById(xButtonID).style.backgroundPosition = "0px -80px";}
		
		
		
		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";}
		
		
		
		

		
		
		
