/**
 * 地址下拉列表改变时查询并显示下一级地址信息
 * @param obj	点出的下拉框对象
 * @param lev	点击的下拉框的级别。1:省，2:市...
 * @return
 */
function doChange(obj, lev) {
	if($(obj).val() != 0 && $(obj).val() != "" || $(obj).val() != '0'){
		switch(lev){	
		/*case 1:
			$("#city").load("/reg/areaSelect.php", {"sid":$(obj).val(),"level":lev});
			$("#district").html("<option value=''>----</option>");
			$("#street").html("<option value=''>----</option>");
			break;
			
		case 2:
			$("#district").load("/reg/areaSelect.php", {"sid":$(obj).val(),"level":lev});
			$("#street").html("<option value=''>----</option>");
			break;
		case 3:
			$("#street").load("/reg/areaSelect.php", {"sid":$(obj).val(),"level":lev});
//			$(".postmes").load("reg/areaSelect.php", {"sid":$(obj).val(),"level":lev});
			break;
			*/
		case 1:
			$.getJSON("http://www.99pto.com/ajax/areaSelect.html?sid=" + $(obj).val()
					+ "&level=" + lev + "&jsoncallback=?", function(data) {
					//window.clipboardData.setData("text",data.options);
					//window.clipboardData.setData("text","http://www.99pto.com/ajax/areaSelect.html?sid=" + $(obj).val() + "&level=" + lev + "&jsoncallback=?");
				$("#city").html(data.options);
			});
			$("#district").html("<option value=''>----</option>");
			$("#street").html("<option value=''>----</option>");
			break;
		case 2:
			$.getJSON("http://www.99pto.com/ajax/areaSelect.html?sid=" + $(obj).val()
					+ "&level=" + lev + "&jsoncallback=?", function(data) {
					//window.clipboardData.setData("text",data.options);
				$("#district").html(data.options);
			});
			$("#street").html("<option value=''>----</option>");
			break;
		case 3:
			$.getJSON("http://www.99pto.com/ajax/areaSelect.html?sid=" + $(obj).val()
					+ "&level=" + lev + "&jsoncallback=?", function(data) {
				$("#street").html(data.options);
			});
			break;
		default:
			break;
		}
	} else {
		$(obj).nextAll().html("<option value=''>----</option>");
	}
}
