function getMap(s_state,s_city,s_suburb) {

//clicked from map, so get state
if ((s_state != null) && (s_city == null) && (s_suburb == null))
	{
	window.location="/personal/mobile/domestic/msiamap/index.asp?state="+s_state
	}
//get city
else if ((s_state != null) && (s_city != null) && (s_suburb == null)) 
	{
	window.location="/personal/mobile/domestic/msiamap/index.asp?state="+s_state+"&city="+s_city
	}
//get suburb
else if ((s_state != null) && (s_city != null) && (s_suburb != null))
	{
	window.location="/personal/mobile/domestic/msiamap/index.asp?state="+s_state+"&city="+s_city+"&suburb="+s_suburb
	}		

}



function getState(what){

if (what.state.options.selectedIndex != 0) {

s_state="";

  for (i=0;i<what.state.options.length;i++){
    if (what.state.options[i].selected)
    {
      if (what.state.options[i].value != "#" && what.state.options[i].value != "")
      {
      s_state=what.state.options[i].value;
      break;
      }
    }
  }

  window.location="/personal/mobile/domestic/msiamap/index.asp?state="+s_state
}
}

function getCity(what){

if ((what.state.options.selectedIndex != 0) && (what.city.options.selectedIndex != 0)) {

s_city="";
s_state="";

  for (i=0;i<what.state.options.length;i++){
    if (what.state.options[i].selected)
    {
      if (what.state.options[i].value != "#" && what.state.options[i].value != "")
      {
      s_state=what.state.options[i].value;
      break;
      }
    }
  }

  for (i=0;i<what.city.options.length;i++){
    if (what.city.options[i].selected)
    {
      if (what.city.options[i].value != "#" && what.city.options[i].value != "")
      {
      s_city=what.city.options[i].value;
      break;
      }
    }
  }

  window.location="/personal/mobile/domestic/msiamap/index.asp?state="+s_state+"&city="+s_city
}
}


function getSuburb(what){

if ((what.state.options.selectedIndex != 0) && (what.city.options.selectedIndex != 0) && (what.suburb.options.selectedIndex != 0)) {

s_city="";
s_state="";
s_suburb="";

  for (i=0;i<what.state.options.length;i++){
    if (what.state.options[i].selected)
    {
      if (what.state.options[i].value != "#" && what.state.options[i].value != "")
      {
      s_state=what.state.options[i].value;
      break;
      }
    }
  }

  for (i=0;i<what.city.options.length;i++){
    if (what.city.options[i].selected)
    {
      if (what.city.options[i].value != "#" && what.city.options[i].value != "")
      {
      s_city=what.city.options[i].value;
      break;
      }
    }
  }
  
    for (i=0;i<what.suburb.options.length;i++){
    if (what.suburb.options[i].selected)
    {
      if (what.suburb.options[i].value != "#" && what.suburb.options[i].value != "")
      {
      s_suburb=what.suburb.options[i].value;
      break;
      }
    }
  }


  window.location="/personal/mobile/domestic/msiamap/index.asp?state="+s_state+"&city="+s_city+"&suburb="+s_suburb
}
}
