	var endPoint = "/bfapp";
	var buffalo = new Buffalo(endPoint);
	var areaName = '';
	var areaCode = '';
	function refreshPage()
	{
		document.location.reload();
	}
	function changeArea(num)
	{
		if(num == 1)
		{
			document.getElementById("area").style.display = 'block';
		}else{
			if(num == 0)
				document.getElementById("area").style.display = 'none';
			else{
				if(num == 2)
				{
					if(document.getElementById("area2"))
					{
						var code1 = document.getElementById("area1");
						var code2 = document.getElementById("area2");
						var tmp = code2[code2.selectedIndex].getAttribute('dis') ;
						if (tmp == '-1')	{
							tmp = '' ;
						}
						areaName = code1[code1.selectedIndex].getAttribute('dis') + '  ' + tmp ;
						areaCode = code1[code1.selectedIndex].value + ',' + code2[code2.selectedIndex].value;
					}else{
						var code1 = document.getElementById("area1");
						if (code1[code1.selectedIndex].getAttribute('dis') != -1)
						{
							areaName = code1[code1.selectedIndex].getAttribute('dis') + '  ';
							areaCode = code1[code1.selectedIndex].value + ',-1';
						} else {
							areaName = '±±¾©' ;
							areaCode = '110000,-1';
						}
					}
					var expdate = new Date();
					expdate.setFullYear(expdate.getFullYear() + 1);
					document.cookie = "cndir_area=" + escape(areaCode)
					+ "; expires=" + expdate.toGMTString() + "; path=/";
					document.getElementById("displayArea").innerHTML = Trim(areaName);
					document.getElementById("area").style.display = 'none';
				}
			}
		}
	}

	function displayBottomArea(code)
	{
		var backVal = '0';
		buffalo.remoteCall("SPrint.displayBottomArea",[code,code], function(reply){
			backVal = reply.getResult();
			document.getElementById("bottomArea").innerHTML = backVal;	
		});
	}

	function changeBottomArea()
	{
		var result;
		var code1 = document.getElementById("area1");
		var code2 = document.getElementById("area2");
		areaName = code1[code1.selectedIndex].getAttribute('dis') + '  ' + code2[code2.selectedIndex].getAttribute('dis');
		areaCode = code1[code1.selectedIndex].value + ',' + code2[code2.selectedIndex].value;
	}
	function moveTop() {
		obj = document.getElementById("top");
		obj.focus();
	}