<!--
/***********************************************
* Explore City functions - Ajmal Saifudeen
***********************************************/
var maps = new Array(4);
maps[0] = baseFolder + "/images/gif/sydneyMap_rocks.gif";
maps[1] = baseFolder + "/images/gif/sydneyMap_botanical.gif";
maps[2] = baseFolder + "/images/gif/sydneyMap_eastern.gif";
maps[3] = baseFolder + "/images/gif/sydneyMap_city.gif";
var objImage = new Image();
for (i=0; i<=3; i++)
objImage.src = maps[i];
function showLinks_(areaID){
var areaLinks = new Array();
var areaText = new Array();
document.getElementById("sydneymap").src = maps[areaID];
document.getElementById("area").style.display = '';
eval("areaLinks = areaLinks" + areaID);
areaLinks.sort();
eval("areaText = areaText" + areaID);
areaText.sort();
document.getElementById("areaTitle").innerHTML = areaTitles[areaID];
document.forms["areaForm"].areaLinks.options.length = 0;
for (i=0; i<areaLinks.length; i++){
document.forms["areaForm"].areaLinks.options[i] = new Option(areaText[i], areaLinks[i]);
}
}
function showLinks(areaID){
document.getElementById("sydneymap").src = maps[areaID];
hideMapLayers();
document.getElementById("areaLinks" + areaID).style.display = '';
document.getElementById("areaTitle").innerHTML = areaTitles[areaID];
}
function showSearchType(type){
document.getElementById("graphicSearchSection").style.display = 'none';
document.getElementById("quickListSection").style.display = 'none';
document.getElementById("keywordSearchSection").style.display = 'none';
document.forms["areaButtonsForm"].btn_graphicSearch.disabled = false;
document.forms["areaButtonsForm"].btn_quickList.disabled = false;
document.forms["areaButtonsForm"].btn_keywordSearch.disabled = false;
document.getElementById(type + "Section").style.display = '';
eval("document.forms['areaButtonsForm'].btn_" + type + ".disabled = true;");
}
function initMaps(){
hideMapLayers();
rotateMaps();
setRotator();
}
function hideMapLayers(){
document.getElementById("areaLinks0").style.display = 'none';
document.getElementById("areaLinks1").style.display = 'none';
document.getElementById("areaLinks2").style.display = 'none';
document.getElementById("areaLinks3").style.display = 'none';
}
function rotateMaps(){
t1 = setTimeout("showLinks(0);",1000);
t2 = setTimeout("showLinks(1);",3000);
t3 = setTimeout("showLinks(2);",5000);
t4 = setTimeout("showLinks(3);",7000);
}
function setRotator(){
t5 = setInterval('rotateMaps()', 8000);
}
function clearTimeouts(){
clearTimeout(t1);
clearTimeout(t2);
clearTimeout(t3);
clearTimeout(t4);
clearTimeout(t5);
}
function populateQuickLinks(searchTerm){
document.forms["areaForm"].areaLinksSelect.options.length = 0;
document.forms["areaForm"].areaLinksSelect.options[0] = new Option("Showing Attractions for: " + searchTerm, "-1");
document.forms["areaForm"].areaLinksSelect.options[1] = new Option("", "-1");
var selectedCount = 2;
for (i=0; i<areaLinks.length; i++){
var attractionTitle = areaText[i];
var attractionURL = areaLinks[i];
if (searchTerm == "All"){
document.forms["areaForm"].areaLinksSelect.options[selectedCount] = new Option(attractionTitle, attractionURL);
selectedCount++;
}
else{
if (attractionTitle.substring(0,1).toUpperCase() == searchTerm){
document.forms["areaForm"].areaLinksSelect.options[selectedCount] = new Option(attractionTitle, attractionURL);
selectedCount++;
}
}
if (selectedCount == 2)
document.forms["areaForm"].areaLinksSelect.options[selectedCount] = new Option("No Matches Found", "-1");
}
}
function populateQuickLinksSubPages(){
document.forms["areaForm"].areaLinksSelect.options[0] = new Option("-- More Sydney Attractions (click here) --", "-1");
document.forms["areaForm"].areaLinksSelect.options[1] = new Option("", "-1");
for (i=0; i<areaLinks.length; i++)
document.forms["areaForm"].areaLinksSelect.options[i+2] = new Option(areaText[i], areaLinks[i]);
}
function loadLargeMap( mapName ){
var el = document.getElementById("contentMapArea");
var mapData = "";
mapData = "<img src='" + baseFolder + "/images/maps/" + mapName + "' />\n";
el.innerHTML = mapData;
}
function showMe( dropdownName ){
eval("var selectedAttractionIndex = document.forms['areaForm']." + dropdownName + ".selectedIndex;");
eval("var selectedURL = document.forms['areaForm']." + dropdownName + "[selectedAttractionIndex].value;");
if (selectedURL != "-1")
goTo(selectedURL, 'internal');
else
alert("Please select a valid option.");
}
-->
