	
		
			// Variables related with the overlay div
			var overlayTransSpeed = 300; // Set the overlay transition time in milliseconds
			var overlayOpacity = 0.40; // Set the overlay opacity (1 = 100%)
			var overlayColor = '#000'; // Set the overlay color

			// Variable to store the last scroll's position
			var lastScrollPosition = -1;
			
			// Variable to know if the lightbox div
			// has been moved to the top menu part
			// (to avoid being hide on FireFox)
			var isLightboxMoved = false;

			/**
			 * Shows the Div that will be over (and disable) the rest of the page's elements.
			 */
			function showDisablerDiv()
			{	
				// Lightbox
				// var wH = $(window).height();
				var oH = $(document).height();
				var cWrapper = '<div class="lbWrapper"></div>';
				var cOverlay = '<div class="lbOverlay" onClick="showLightBox(false);"></div>';

				$('body').append(cWrapper);
				$('.lbWrapper').hide().append(cOverlay);
				$('.lbOverlay').css({'height': oH,'opacity':0, 'background-color':overlayColor});
					
				// Show the overlay
				$('.lbWrapper').show();
				$('.lbOverlay').animate({'opacity':overlayOpacity},overlayTransSpeed);
			}

			$(function() {
			// Tell the stylesheet that javascript is enabled for this page
				$('body').removeClass('noJs');
			});

			/**
			 * Moves the lightbox to its initial visual position respect the browser.
			 **/
			function centerLightbox()
			{
				var winHeight = $(window).height();
				var winWidth = $(window).width();
				var docHeight = $(document).height();
				var divHeight = 382;
				var divWidth = 556; // lightbox image's width

				// Getting the left position to show the div centered
				var left = 0;
				if (winWidth > divWidth)
				{
					left = Math.round((winWidth - divWidth) / 2);
				}
				
				// Getting the top position to show the div centered
				var top = 0;
				if (winHeight > divHeight)
				{
					top = Math.round((winHeight - divHeight)/ 2);
				}

				var divId = "lightbox01";
				var divStyle = document.getElementById(divId).style;

				if (is_ie6)
				{
					var browserScroll = 0;
					if (navigator.appName == "Netscape") {
						browserScroll = window.scrollY;
					}
					else {
						browserScroll = document.body.parentNode.scrollTop;
					}
					
					divStyle.position = "absolute";
					// Because the class used in the lightbox use "left" attribute as "!important" (and was redefined to zero),
					// the the left margin is set to the centered value
					divStyle.marginLeft = left + "px";
					divStyle.top = (top + browserScroll) + "px";
				}
				else
				{
					divStyle.position = "fixed";
					// Because the class used in the lightbox use "left" attribute as "!important" (and was redefined to zero),
					// the the left margin is set to the centered value
					divStyle.marginLeft = left + "px";
					divStyle.top = top + "px";
				}
			}

			/**
			 * Shows or hides the light box.
			 * 
			 * The lightbox is showed in the center of the screen.
			 * For IE6 the onscroll event is added when is showed,
			 * and removed when is hidden
			 **/
			function showLightBox(doShow) {
				// Disable the rest of the page elements
				setDisableScreen(doShow)
				
				// Show the light box
				var divId = "#lightbox01";
				if (doShow == true) {
					// Move the light box to the "top bar area" to guarateed be shown
					if (!isLightboxMoved) {
						var lightboxHtmlCode = $('#temporalcontainer').html();
						$('#lightboxcontainer').remove();
						$('#header').append(lightboxHtmlCode);
						isLightboxMoved = true;
						
						// Setting the styles for Internet Explorer 6
						if (is_ie6)
						{
							$(".bg_lightbox").css("background", "none");
							$(".bg_lightbox").css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/web/images/bg_provinceSelector.png',sizingMethod='crop')");
							$("#lightbox_title").css("top", "37px");
						}
					}
					
					centerLightbox();
					$(divId).show();
					
					// If the browser is IE6 then set the onScroll handler
					if (is_ie6)
					{
						window.onscroll = centerLightbox;
					}
					
					window.onresize = centerLightbox;
				}
				else
				{
					// If the browser is IE6 then remove the onscroll handler
					if (is_ie6)
					{
						window.onscroll  = null;
					}
					
					window.onresize = null;

					$(divId).hide();
				}
			}

			/**
			 * Disable the rest of the screen except for the lightbox.
			 *
			 * @param doDisable Boolean, use 'true' to disable the screen, 'false' otherwise.
			 **/
			function setDisableScreen(doDisable)
			{
				if (doDisable)
				{
					showDisablerDiv();

					// Hide the top menu elements
					$('.bb_topSearch').hide();
					$('.bb_wrapDashboard').hide();
				}
				else
				{
					$('.lbWrapper').remove();

					// Show the top menu elements
					$('.bb_topSearch').show();
					$('.bb_wrapDashboard').show();
				}
			}
		
