function onRollOverCarousel(obj_img){
	
	obj_img.src = obj_img.src.split("off-").join("on-");
}

function onRollOutCarousel(obj_img){
	var str_image_page_id = obj_img.id.split("img-").join("");
	if (str_image_page_id == page_name){
		return;	
	}
	obj_img.src = obj_img.src.split("on-").join("off-");
}

var str_carouselloaded = "";
function initCarouselImg(obj_img){
	
	//alert(obj_img);
	
	
	if (str_carouselloaded.split("|"+obj_img.id+"|").length > 1){
		return;	
	}
	
	
	
	str_carouselloaded+="|"+obj_img.id+"|"
	
	var str_image_page_id = obj_img.id.split("img-").join("");
	if (str_image_page_id == page_name){
		obj_img.src = obj_img.src.split("off-").join("on-");
	}

} 

function e(id) {
	return document.getElementById(id)?document.getElementById(id):false;
}

function changeStateOn (id) {
	e(id + "-off").className = "hidden";
	e(id + "-on").className = "visible";
}

function changeStateOff (id) {
	e(id + "-off").className = "visible";
	e(id + "-on").className = "hidden";
}


function launchPopupWin(anchor_obj,width,height) {
	var new_win = window.open(anchor_obj.href,'popup','resizable=yes,scrollbars=yes,width='+width+',height='+height+',left='+String((screen.width-width)/2)+',top='+ String((screen.height-height)/2) );
	 if (new_win ) {
		 new_win .focus();
		 return false;
	 } else {
		return true;
	 }	 
}

/*---------------- QUEENSLAND MAP ------------------*/

var str_last_map_item;

function turnMapTextOn(id) {
	
	var str = id.split("map-").join("");
	var mapitem = "mapitem-" + str;

	if (document.getElementById(mapitem)) {
		
		//Hide the old map item
		if (document.getElementById(str_last_map_item)) {
			document.getElementById(str_last_map_item).className="map-item-off";
		}
		
		//Show the new item
		document.getElementById(mapitem).className = "map-item-on";
		str_last_map_item = mapitem;
	}
}

function turnMapTextOff(id) {
	var str = id.split("map-").join("");
	var mapitem = "mapitem-" + str;
	
	//Hide the old map item
	if (document.getElementById(mapitem).className == "map-item-on" ) {
		document.getElementById(mapitem).className="map-item-off";
	}
}
