/* Hide all 'select' tags on the page */

function hideSelects() { 
	var x = document.getElementsByTagName("select");
	
	for (i = 0; i < x.length; i++) {
		x[i].style.visibility = "hidden"
	}
}


/* Show all 'select' tags on the page */

function showSelects() { 
	var x = document.getElementsByTagName("select");
	
	for (i = 0; i < x.length; i++) {
		x[i].style.visibility = "visible"
	}
}


/* Homepage banner message - jQuery overlay */

function overlay() { 
	
	if ($.cookie('bannerMsg') == null) {
			
		$(document).ready(function() { 
			
			hideSelects();	// mainly for IE6: Hide <select> tags. Must use onclick="closeOverlay();" on the Close button
			
			$("#facebox").overlay({		// select the overlay element - and "make it an overlay"
			
				top: 150, 					// custom top position
				expose: {					// some expose tweaks suitable for facebox-looking dialogs
					color: '#fff',			// you might also consider a "transparent" color for the mask
					loadSpeed: 1000,		// load mask a little faster
					opacity: 0.9			// transparent
				},
				
				closeOnClick: false,		// disable this for modal dialog-type of overlays
				api: true	// we want to use the programming API
			
				}).load();	// load it immediately after the construction
			
		});
			
	}
	
	$.cookie('bannerMsg', 'once');	// set cookie to say that the bannerMsg overlay has shown already
}

function closeOverlay() { 
	showSelects();
}

