function map() {
	var a = document.getElementById("map1").style.display; 
	if(a == "none"){
		document.getElementById("map1").style.display = "block";
	}else{
		document.getElementById("map1").style.display = "none";
	}
}

function mapa() {
	var a = document.getElementById("mapa").style.display; 
	
	if(a == "none"){
		document.getElementById("mapa").style.display = "block";
	}else{
		document.getElementById("mapa").style.display = "none";
	}
}

function mapb() {
	var a = document.getElementById("mapb").style.display; 
	
	if(a == "none"){
		document.getElementById("mapb").style.display = "block";
	}else{
		document.getElementById("mapb").style.display = "none";
	}
}

function regSurrogate(){
			window.location.href="http://www.mapbar.com/help/surrogate_application.html";	
}
		
function check()
{
   	  if (document.loginForm.uid.value=='')
	  {
	    document.loginForm.uid.select();
	    alert("用户名不能为空!");
	    return false;
	  }
	  if (document.loginForm.pwd.value=='')
	  {
	    document.loginForm.pwd.select();
	    alert("密码不能为空!");
	    return false;
	  }
	  return true;
}

var cityListRs = {
    initCityOption:function(defaultCity){
        for(var i=0;i<cityData.province.length;i++){
            document.writeln('<option value='+cityData.province[i].pname+'>'+cityData.province[i].pname+'</option>\n');
            for(var j=0;j<cityData.province[i].city.length;j++){
                document.writeln('<option value='+cityData.province[i].city[j].cityName+'>&nbsp;├'+cityData.province[i].city[j].cityName+'</option>\n');
            }
        }
    } ,
 getCityPropertiesByCity:function(cityValue){
        var cityProperties={strLatLon:"GVCUSBXUIWTCR",zoom:"2",code:"086"};
  for(var i=0;i<cityData.province.length;i++){
   for(var j=0;j<cityData.province[i].city.length;j++){
    if(cityData.province[i].city[j].cityName==cityValue){
                    cityProperties.strLatLon= cityData.province[i].city[j].citylatlon;
                    cityProperties.zoom= cityData.province[i].city[j].cityzoom;
                    cityProperties.code= cityData.province[i].city[j].citycode;
                    break;
                } 
   }
  };        
        return cityProperties;
    }
}
