var searchIDList=new Array();
var searchNameList=new Array();
var searchPageURLList=new Array();
var queryIndexList=new Array();
var searchLayerList=new Array();
var searchServiceList=new Array();
var searchToolTip=new Array();
var optionClass=new Array();
var customSearchMode=1002;
var defaultSearchPage='searchFeatureRight.jsp';
var queryIndexBuffer=new Number(0);
var currentSearchID='';
var currentSearchVal='';
var previousActiveLayer='';
var previousSearchIndex=-1;
var counter=0;
searchNameList[counter]='Cultural';
optionClass[counter]='header';
counter++;
searchNameList[counter]='Education Facility';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=1;
searchLayerList[counter]=BuildingComplexPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Includes TAFEs, primary schools, high schools and universities';
counter++;
searchNameList[counter]='Community Facility';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=2;
searchLayerList[counter]=BuildingComplexPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Includes art galleries, fire stations, gaols libraries and museums';
counter++;
searchNameList[counter]='Hospital Facility';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=3;
searchLayerList[counter]=BuildingComplexPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Includes medical centers, psychiatric hospitals and emergency centers';
counter++;
searchNameList[counter]='Industry Facility';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=4;
searchLayerList[counter]=BuildingComplexPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Includes depots, research stations, factories, ship yards and shopping centers';
counter++;
searchNameList[counter]='Utility Facility';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=5;
searchLayerList[counter]=BuildingComplexPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Includes gas, electricity and water works';
counter++;
searchNameList[counter]='Recreation Facility';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=6;
searchLayerList[counter]=BuildingComplexPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Includes caravan parks, swimming pools, sport centeres and zoos';
counter++;
searchNameList[counter]='Cultural Feature';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=GeneralCulturalPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Includes aqua farms, race tracks, cemetries and ponds';
counter++;
searchNameList[counter]='Transportation';
optionClass[counter]='header';
counter++;
searchNameList[counter]='Cableway';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=Cableway_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Any cabled conveyor system including sporting facilities such as chair lifts';
counter++;
searchNameList[counter]='Ferry Route';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=FerryRoute_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Paths taken by ferries';
counter++;
searchNameList[counter]='Roads - All';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=RoadSegment_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='All road categories';
counter++;
searchNameList[counter]='Roads - Motorways';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=1;
searchLayerList[counter]=RoadSegment_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='High traffic volume, high speed roads';
counter++;
searchNameList[counter]='Roads - Primary';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=2;
searchLayerList[counter]=RoadSegment_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Nationally important and/or are a major intrastate through route';
counter++;
searchNameList[counter]='Roads - Arterial & Sub Arterial';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=3;
searchLayerList[counter]=RoadSegment_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Connectors between roads and towns as well as distributing to local roads';
counter++;
searchNameList[counter]='Roads - Local & Urban';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=4;
searchLayerList[counter]=RoadSegment_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='Local and urban providing propert access and property service access';
counter++;
searchNameList[counter]='Airport';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=1;
searchLayerList[counter]=TransportFacilityPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='A facility where aircraft can take off or land';
counter++;
searchNameList[counter]='Helipad';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=3;
searchLayerList[counter]=TransportFacilityPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='An area set aside or designated for the landing of helicopters';
counter++;
searchNameList[counter]='Marina';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=4;
searchLayerList[counter]=TransportFacilityPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='A harbour facility for recreational craft where various services are available';
counter++;
searchNameList[counter]='Parking Area';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=5;
searchLayerList[counter]=TransportFacilityPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='An area set aside for the parking of motor vehicles or aircraft';
counter++;
searchNameList[counter]='Railway Station';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=6;
searchLayerList[counter]=TransportFacilityPoint_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='A structure beside a railway line with facilities for passengers and freight';
counter++;
searchNameList[counter]='Hydrography';
optionClass[counter]='header';
counter++;
searchNameList[counter]='Water Area Name';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=HydroArea_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='A polygon defining hydrography features';
counter++;
searchNameList[counter]='Water Line Name';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=HydroLine_Label_1;
searchServiceList[counter]=topoServiceID;
searchToolTip[counter]='A line defining hydrography features';
counter++;
searchNameList[counter]='Cadastral';
optionClass[counter]='header';
counter++;
searchIDList['Address_Label_1_Query_0']=counter;
searchNameList[counter]='Address';
searchPageURLList[counter]='searchAddress.jsp';
queryIndexList[counter]=0;
searchLayerList[counter]=Address_Label_1;
searchServiceList[counter]=cadServiceID;
searchToolTip[counter]='Property address consisting of street number, name, type and suburb';
counter++;
searchNameList[counter]='LGA';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=LocalGovernmentArea_Label_1;
searchServiceList[counter]=cadServiceID;
searchToolTip[counter]='A gazetted boundary defining the Local Government Area';
counter++;
searchIDList['Lot_Label_1_Query_0']=counter;
searchNameList[counter]='Plan Number';
searchPageURLList[counter]='searchLot.jsp';
queryIndexList[counter]=0;
searchLayerList[counter]=Lot_Label_1;
searchServiceList[counter]=cadServiceID;
searchToolTip[counter]='A parcel of land created on a plan of subdivison or title';
counter++;
searchNameList[counter]='Suburb';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=Suburb_Label_1;
searchServiceList[counter]=cadServiceID;
searchToolTip[counter]='A gazetted boundary of a suburb or locality area';
counter++;
searchNameList[counter]='Town';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=Town_Label_1;
searchServiceList[counter]=cadServiceID;
searchToolTip[counter]='';
counter++;
searchNameList[counter]='Trig Station';
searchPageURLList[counter]='searchSurvey.jsp';
queryIndexList[counter]=0;
searchLayerList[counter]=SurveyMark_Label_1;
searchServiceList[counter]=cadServiceID;
searchToolTip[counter]='Trigonometric Station';
counter++;
searchNameList[counter]='State Survey Mark';
searchPageURLList[counter]='searchSurvey.jsp';
queryIndexList[counter]=1;
searchLayerList[counter]=SurveyMark_Label_1;
searchServiceList[counter]=cadServiceID;
searchToolTip[counter]='State Survey Mark';
counter++;
searchNameList[counter]='Permanent Mark';
searchPageURLList[counter]='searchSurvey.jsp';
queryIndexList[counter]=2;
searchLayerList[counter]=SurveyMark_Label_1;
searchServiceList[counter]=cadServiceID;
searchToolTip[counter]='Permanent Survey Mark';
counter++;
searchNameList[counter]='Aerial Photo';
optionClass[counter]='header';
counter++;
searchNameList[counter]='Map Name';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=Airview_Index_Label_1;
searchServiceList[counter]=prodAirviewServiceID;
searchToolTip[counter]='The name of the 1:100,000 map that covers the aerial photo';
counter++;
searchNameList[counter]='Topographic Map';
optionClass[counter]='header';
counter++;
searchNameList[counter]='Mnemonic';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=Topographic_Map_Index_Label_1;
searchServiceList[counter]=prodTopoServiceID;
searchToolTip[counter]='The unique identifier for a topographic map';
counter++;
searchNameList[counter]='Map Name';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=1;
searchLayerList[counter]=Topographic_Map_Index_Label_1;
searchServiceList[counter]=prodTopoServiceID;
searchToolTip[counter]='The name of a topographic map';
counter++;
searchNameList[counter]='Map Number';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=2;
searchLayerList[counter]=Topographic_Map_Index_Label_1;
searchServiceList[counter]=prodTopoServiceID;
searchToolTip[counter]='The number of a topographic map';
counter++;
searchNameList[counter]='Crown Reserve';
optionClass[counter]='header';
counter++;
searchIDList['LandDistrict_Label_1_Query_0']=counter;
searchNameList[counter]='LandDistrictName';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=LandDistrict_Label_1;
searchServiceList[counter]=prodCrownServiceID;
searchToolTip[counter]='The unique Name for a Land District';
counter++;
searchIDList['CrownReserve_Label_1_Query_0']=counter;
searchNameList[counter]='CrownReserveNumber';
searchPageURLList[counter]=defaultSearchPage;
queryIndexList[counter]=0;
searchLayerList[counter]=CrownReserve_Label_1;
searchServiceList[counter]=prodCrownServiceID;
searchToolTip[counter]='The Crown Reserve identifier';
counter++;
function writeSearchOptions(loggedIn)
{
var buf='';
var displayOptions=true;
for(var i=0;i<searchNameList.length;i++)
{
var classID='';
var value=i;
var space='  ';
var selected='';
var r=new String(parseFloat(i/2));
if(r.indexOf('.')==-1)
classID='even_row';
else
classID='odd_row';
if(optionClass[i]!=null)
{
classID='header';
value='header';
space='';
if(searchNameList[i]=='Crown Reserve')
{
if(!loggedIn) 
displayOptions=false;
else
displayOptions=true;
}
else
displayOptions=true;
}
if(displayOptions==true)
{
if(previousSearchIndex==i)
{
selected='selected';
}
buf+='<option '+selected+' value="'+value+'" onMouseOver="displaySearchTip(this.value)" id="'+classID+'" class="'+classID+'">'+space+searchNameList[i]+'</option>';
}
}
return buf;
}
function handleSearchChange(searchID,searchDocument)
{
currentSearchID=searchID;
if(searchDocument!=null)
{
if(searchDocument.location!=searchPageURLList[currentSearchID])
searchDocument.location=searchPageURLList[currentSearchID];
}
if(activeMapServiceIndex!=searchServiceList[currentSearchID])
{
previousActiveService=activeMapServiceIndex;
switchActiveMapService(searchServiceList[currentSearchID],false);
}
}
function performSearch(theValue)
{
previousSearchIndex=currentSearchID;
currentSearchVal=theValue;
processPerformSearch(null);
}
function processPerformSearch(theReply)
{
previousActiveLayer=ActiveLayerIndex;
setActiveLayer(searchLayerList[currentSearchID]);
previousSearchIndex=currentSearchID;
getStoredQueries();
}
function submitQuery()
{
var theCount=new Number(queryIndexList[currentSearchID])+new Number(queryIndexBuffer);
queryIndexBuffer=new Number(0);
var theValue=currentSearchVal;
sendStoredQuery(theCount,theValue.toUpperCase());
}
