function check(which)
{
	//eval("var passwd = $F('passwd'"+which+");");
	//eval("var _action = $F('_action'"+which+");");
	//eval("var album_id = $F('album_id'"+which+");");
	var passwd = $F("passwd"+which);
	var _action = $F("_action"+which);
	var album_id = $F("album_id"+which);

//var btn_login = $("btn_login");
	
	
	//hidden_all();
	//Common.hidden("msg"+which);
	Common.EchoError("passwd"+which,"验证中...","msg"+which,null);
	
	if(passwd=="")
	{
		return Common.EchoError("passwd"+which,"请输入密码!","msg"+which,null);
	}
	else
	{
		//btn_login.disabled = true;
		register(passwd,_action,album_id,which);
	}

}

function hidden_all()
{
	Common.hidden("msg");
}

function register(passwd,_action,album_id,which)
{
	var url = "/member/request/_photo_ajax.php";
	var postStr = "passwd="+passwd+"&_action="+_action+"&album_id="+album_id;
	var ajax = InitAjax();
	ajax.open("POST",url,true);
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	ajax.send(postStr);
	
	ajax.onreadystatechange = function()
	{
		
		if (ajax.readyState == 4 && ajax.status == 200)
		{
			var r = ajax.responseText;
			if(r==1)
			{
				return Common.EchoError("passwd"+which,"请输入密码!","msg"+which,null);
			}
			if(r==2)
			{
				return Common.EchoError("passwd"+which,"密码错误!","msg"+which,null);
			}
			if(r.indexOf("|")>0)
			{
				_r = r.split("|");
				getviewdata(2,_r[1]);
				//window.location = "./PhotoManage.php?albumid="+_r[1];
				Common.EchoError("passwd"+which,"密码正确,页面跳转中...","msg"+which,null);
				//getviewdata(2,album_id);
			}
			else
			{
				//msg_username.innerHTML = r;
			}
		}
		//btn_login.disabled = false;
	}
	
}
