function vzonelogin(){		
	var username = $("#username").val();
	var password =  $("#password").val();	
	var log_type_id = $(":radio:checked").val();	
	var forwards = $("#forward").val();
	if(username == '' || password == '' || log_type_id == ''){
		alert("你提交的信息不完整!");			
	}else{
		if(log_type_id == '1'){//个人用户登录
			$.ajax({
				type:"POST",
				url:"./user.php?action=loginajax",
				data:"username="+username+"&password="+password,	
				beforeSend: function(){
					$('#p_3').hide();	
					$('#logining').show();
					$("#logining").html("　<img src='image/loading2.gif'/> 正在请求。。。");
				},
				success:function(msg){
					var items = msg.split('|');
					if(items[0] == '0'){
						$('#logining').hide();
						$('#p_3').show();						
						alert("用户名或密码错误");
						$("#username").val('');
						$("#password").val('');
						$("#username").focus();
					}else{					
						window.location=forwards;
					}
				}
			})
		}
		if(log_type_id == '2'){
			$.ajax({
				type:"POST",
				url:"./user.php?action=login_ad",
				data:"username="+username+"&password="+password,	
				success:function(msg){
					var items = msg.split('|');
					if(items[0] == '0')	{
						$('#logining').hide();
						$('#p_3').show();	
						alert("用户名密码错误");
						$("#username").val('');
						$("#password").val('');
						$("#username").focus();
					}else{						
						window.location="./adv";
					}
				}
			})
		}
	}

}
function logout()
{
	$.ajax({
	type:"POST",
	url:"./user.php?action=logout",
	data:"",	
	success:function(msg){
	var items = msg.split('|');	
	$ID("user").innerHTML = items[0] ;
	//alert("你已经安全的退出了系统");
	//window.location.reload();
	window.location="index.php";
	}
	})
}
function gologin()
{
	$("#username").focus();
}