/*!
 * Site:     http://www.cheermi.com
 * License:  http://opensource.org/licenses/MIT
 * Copyright (c) 2015 CheerMi; Licensed MIT
*/
	function get_area( obj_val,  area_type , sel_val )
	{
		if(obj_val!='')
		{
			$.get(webroot_url+"/user/index.php?load=ajax_area&act="+area_type+"&obj_val="+obj_val+"&sel_val="+sel_val, function(data)
			{
				$('#'+area_type+'_span' ).html(data);
			})
		}else{
			$.get(webroot_url+"/user/index.php?load=ajax&act=area&type="+area_type, function(data)
			{
				$('#'+area_type+'_span' ).html(data);
			})
		}
	}
	
	function get_pcd_all(obj,type)
	{
		var all_val = '';
		var p_obj = document.getElementById('province');
		var c_obj = document.getElementById('city');
		var d_obj = document.getElementById('district');
		
		if(type=='province' && obj.value!='' ){
			all_val = obj.options[obj.selectedIndex].text;
		}
		
		if(type=='city' && obj.value!='' ){
			all_val = p_obj.options[p_obj.selectedIndex].text + obj.options[obj.selectedIndex].text;
		}
		if(type=='district' && obj.value!='' ){
			all_val = p_obj.options[p_obj.selectedIndex].text + c_obj.options[c_obj.selectedIndex].text + obj.options[obj.selectedIndex].text;
		}
		$('#pcd_all').val( all_val );
	}

