
	
	var carousel_items = new Array();			// check for all the items in the carousel menu
	var current_hash = '';						// current position of slider

	function start_location_hash() {
		for (var a = 0; a < 10; a++) {
			if (document.getElementById('c_menu_'+a)) {
				var this_hash = document.getElementById('c_menu_'+a).href.split('#');
				var this_hash = this_hash[1];
				carousel_items[a] = this_hash;					// gather all hash tags
			}
		}
		
		if (carousel_items.length > 1) {
			window.setTimeout('check_location_hash()', 50);		// if carousel menu exists, we'll start checking for hash recursively
		}
	}
	
	start_location_hash();
	
	
	function check_location_hash() {
		var hash = location.hash.split("#");
		hash = hash[1];
		
		if (current_hash !== hash) {							// only update slider if the current hash changes
			current_hash = hash;
		
			for (var a = 0; a < carousel_items.length; a++) {
				if (carousel_items[a] === hash) {
					slide_to(a);
				}
			}
		}
		
		window.setTimeout('check_location_hash()', 50);
	}
