
	$currentSlide = 1;
			
	function onBefore() {
		var id = $(this).attr('id');
		id = id.substring(id.length-1);
		
		$('#flash-link-' + $currentSlide).removeClass("selected");
		//$('#flash-link-' + $currentSlide).attr('href', '#');
		
		$('#flash-link-' + id).addClass("selected");
		//$('#flash-link-' + id).attr('href', $(this).attr('rel'));
		$currentSlide = id;							
	}

	$(document).ready(function() {
		$('#flash-holder').cycle({ 
			fx:     'fade', 
			speed:  'slow', 
			timeout: 5000,
			before:	onBefore																
		});

		$('#flash-controls').children().each(function() {

			$(this).hover(function () {
				$('#flash-holder').cycle('pause');
				var id = $(this).attr('id');
				id = id.substring(id.length-1);
				id -= 1;
				$('#flash-holder').cycle(id);						
			})										
		});				
		
		$(function() {
			$('.lightbox-image').lightBox();
		});

	});		
	
	function confirm_delete()
	{
		var confirmation = confirm("Are you sure you want to delete");
		if (confirmation)	{
			return true;
		}
		else {
			return false;
		}

	}

	function toggleSearchResults(ULId)
	{
		//alert(document.getElementById(ULId).style.display);
		if (document.getElementById(ULId).style.display == 'none') {
			$('#' + ULId + '_X').text('-');
			$('#' + ULId).show("slide", { direction: "up" }, 1000);
			//$('#' + ULId).slideDown("slide");			
		}
		else {
			$('#' + ULId).hide("slide", { direction: "up" }, 1000);
			$('#' + ULId + '_X').text('+');

		}
		return false;
	}
	
	function toggleResults(ULId)
	{
		//alert(document.getElementById(ULId).style.display);
		if (document.getElementById(ULId).style.display == '' || document.getElementById(ULId).style.display == 'none') {
			$('#' + ULId + '_X').text('-');
			$('#' + ULId).show("slide", { direction: "up" }, 1000);
			//$('#' + ULId).slideDown("slide");			
		}
		else {
			$('#' + ULId).hide("slide", { direction: "up" }, 1000);
			$('#' + ULId + '_X').text('+');

		}
		return false;
	}

	function bookmark_us(url, title)
	{
		if (window.sidebar) // firefox
			window.sidebar.addPanel(title, url, "");
		else if(window.opera && window.print){ // opera
			var elem = document.createElement('a');
			elem.setAttribute('href',url);
			elem.setAttribute('title',title);
			elem.setAttribute('rel','sidebar');
			elem.click();
		}
		else if(document.all) // ie
			window.external.AddFavorite(url, title);
	}


	// Google map init
	function initialize() {
		var latlng = new google.maps.LatLng(51.903861, -0.214555);
		
		var myOptions = {
		  zoom: 12,
		  center: latlng,
		  mapTypeId: google.maps.MapTypeId.ROADMAP
		};
		var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

		var marker = new google.maps.Marker({
			position: latlng, 
			map: map,
			title:"FIRA International"
	    });  
	  }
