

// home page camps wh block slider

	var cur_el = 1;

	function slide_select(el) {
		move_slide(el);
		reset_timer();
	}
	
	function move_slide(el) {
		for (var a=0; a<=6; a++) {
			if (document.getElementById("mapdot"+a)) {
				document.getElementById("mapdot"+a).className = '';
			}
		}
		document.getElementById("mapdot"+el).className = 'selected';
		document.getElementById("mapdot"+el).blur();
		
		var pic_x = (el-1) * 565;
		var txt_x = (el-1) * 505;
		new Effect.Move('wh_pic_holder_inner', { x: -pic_x, y: 1, mode:'absolute' });
		new Effect.Move('intro_slider_inner', { x: -txt_x, y: 0, mode:'absolute' });
		
		cur_el = el;
	}
	
	function next_slide() {
		var e = cur_el + 1;
		if (!document.getElementById("mapdot"+e)) { e = 1; }
		move_slide(e);
		reset_timer();
	}
	
	function prev_slide() {
		var e = cur_el - 1;
		if (!document.getElementById("mapdot"+e)) {
			for (var a = 0; a < 20; a++) {
				if (document.getElementById("mapdot"+a)) { e = a; }
			}
		}
		move_slide(e);
		reset_timer();
	}
	
	
	function auto_next_slide() {
		var e = cur_el + 1;
		if (!document.getElementById("mapdot"+e)) { e = 1; }
		move_slide(e);
	}
	
	var interval_id = 0;
	function start_slideshow() {
		interval_id = window.setInterval("auto_next_slide()", 8000);
	}
	
	function reset_timer() {
		window.clearInterval(interval_id);
		start_slideshow();
	}
	
	window.onload = function() { start_slideshow(); }

// map popups
	function show_info(el) {
		fadeTo('map_popup_'+el, 100, 200);
	}
	
	function hide_info(el) {
		fadeTo('map_popup_'+el, 0, 300);
	}
	
	
