﻿/*

AUTHOR:     LK
CREATED:    23/08/08

*/

var _map = null; // global variable to hold map instance

var DEFAULT_SUBURB_POSTCODE_TEXT = "Please enter either a suburb or postcode.";
var DEFAULT_MULTIPLE_TEXT = "Multiple results found. Please select the best match from the list and click search."
var DEFAULT_NO_ADDRESS_FOUND_TEXT = "Sorry, we are unable to find a listing that matches your search. Please refine your search and try again."

var searchType = "";

function LoadDefaultText()
{
  
    if (document.getElementById('txtSuburb').value.length < 1 && document.getElementById('txtPostcode').value.length < 1 ){
     document.getElementById('lblError').value = DEFAULT_SUBURB_POSTCODE_TEXT; 
    }
 }
   

function load() {

    // create a MDSMap instance
    _map=new MDSMap($get('mymap'));

    // pass in the key for the session
    _map.UserIDSet($get('UserID').value);
 
    // load the map - use centre provided
    _map.LoadMap(null,null,555,330,655,430,null);


}


function toggleTable(){
if (document.getElementById('divOther').style.display== 'block'){
document.getElementById('divOther').style.height = '1px';
document.getElementById('divOther').style.display= 'none'; 
document.getElementById('tableLink').innerHTML="<a href='javascript:toggleTable();' id='tableLink' alt='Open List' title='Open List'>Open List &nbsp;&nbsp;<img src='images/arrow_open.jpg' border='0'></a>";

}
else{
document.getElementById('divOther').style.height = '240px';
document.getElementById('divOther').style.display = 'block'; 
document.getElementById('tableLink').innerHTML="<a href='javascript:toggleTable();' id='tableLink' alt='Close List' title='Close List'>Close List &nbsp;&nbsp; <img src='images/arrow_close.jpg' border='0'></a>";
}

}

