function toto(id,typeId,qa_id){
	if($("#user_id").val()==''){	
	alert("请登录");	
	str="<form action='/login.php?act=login' name='loginForm'  id='loginForm' method='POST' style='padding:0px; margin:15px auto; width:300px; height:auto;'><ul style='padding:0px; margin:0px; width:100%; height:auto; font-size:12px;'><li style='list-style:none; height:20px; margin-top:10px; line-height:20px; float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>账号:</span><input type='text' name='UserName' id='UserName' value='' onkeyup='movefocus(event, \"Password\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:20px; margin-top:10px; line-height:20px;  float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>密码:</span><input type='password' name='Password' id='Password' value='' onkeypress='movefocus(event, \"validate\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:30px; margin-top:10px; text-align:center; line-height:30px;  float:left;'><input type='submit' name='submit' id='submit' value='登陆' style='width:80px; margin-left:80px; height:30px; line-height:30px;'/><a href='/register.php?act=register'>注册</a><input type='hidden' name='backUrl' id='backUrl' value='/QaIndex.php?act=search_detail&id="+id+"' /></li></ul></form>";
	alertWin('登陆',str,400,200)
	//is_login2(id);
	}else{
		if(qa_id!=$("#user_id").val()){
		str='<div align="center"><br/><br/>添加回答： <br /><br /><input type="hidden" name="id" id="id" value="'+id+'" /><input type="hidden" name="type_id" id="type_id" value="'+id+'" /><textarea name="content" id="content" rows=8 cols=60 ></textarea><br /><br /><input name="cp" id="cp" type="button"  onclick="changeP()" value="确 定" /> </div>';
		alertWin('回复',str,600,300)
	//$('#content').focus();
		}else{
         alert("不可以回答自己的问题");
			}
	}	
}

function toDiv() {
	var timer;
	timer = new Date();
	rnd = timer.getTime();
	$.get("/ajaxPhp/login_check.php?t="+rnd,function(data){
		if(data == 1) {
			location.href = "/QaSearchList.php?act=list&sub2=1";
		} else {
				str="<form action='/login.php?act=login' name='loginForm'  id='loginForm' method='POST' style='padding:0px; margin:15px auto; width:300px; height:auto;'><ul style='padding:0px; margin:0px; width:100%; height:auto; font-size:12px;'><li style='list-style:none; height:20px; margin-top:10px; line-height:20px; float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>账号:</span><input type='text' name='UserName' id='UserName' value='' onkeyup='movefocus(event, \"Password\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:20px; margin-top:10px; line-height:20px;  float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>密码:</span><input type='password' name='Password' id='Password' value='' onkeypress='movefocus(event, \"validate\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:30px; margin-top:10px; text-align:center; line-height:30px;  float:left;'><input type='submit' name='submit' id='submit' value='登陆' style='width:80px; margin-left:80px; height:30px; line-height:30px;'/><a href='/register.php?act=register'>  注册</a><input type='hidden' name='backUrl' id='backUrl' value='/QaSearchList.php?act=list&sub2=1' /></li></ul></form>";
	alertWin('登陆',str,400,200)
			//get_backUrl();
			//$('#UserName').focus();
		}
	});
}
function toDiv_answer() {
	var timer;
	timer = new Date();
	rnd = timer.getTime();
	$.get("/ajaxPhp/login_check.php?t="+rnd,function(data){
		if(data == 1) {
			location.href = "/QaSearchList.php?act=list&sub3=1";
		} else {
				str="<form action='/login.php?act=login' name='loginForm'  id='loginForm' method='POST' style='padding:0px; margin:15px auto; width:300px; height:auto;'><ul style='padding:0px; margin:0px; width:100%; height:auto; font-size:12px;'><li style='list-style:none; height:20px; margin-top:10px; line-height:20px; float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>账号:</span><input type='text' name='UserName' id='UserName' value='' onkeyup='movefocus(event, \"Password\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:20px; margin-top:10px; line-height:20px;  float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>密码:</span><input type='password' name='Password' id='Password' value='' onkeypress='movefocus(event, \"validate\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:30px; margin-top:10px; text-align:center; line-height:30px;  float:left;'><input type='submit' name='submit' id='submit' value='登陆' style='width:80px; margin-left:80px; height:30px; line-height:30px;'/><a href='/register.php?act=register'>  注册</a><input type='hidden' name='backUrl' id='backUrl' value='/QaSearchList.php?act=list&sub3=1' /></li></ul></form>";
	            alertWin('登陆',str,400,200)
			//get_backUrl();
			//$('#UserName').focus();
		}
	});
}
function en_toDiv_answer() {
	var timer;
	timer = new Date();
	rnd = timer.getTime();
	$.get("/ajaxPhp/login_check.php?t="+rnd,function(data){
		if(data == 1) {
			location.href = "/QaSearchList.php?act=list&sub3=1&language=3";
		} else {
				str="<form action='/login.php?act=login&language=3' name='loginForm'  id='loginForm' method='POST' style='padding:0px; margin:15px auto; width:300px; height:auto;'><ul style='padding:0px; margin:0px; width:100%; height:auto; font-size:12px;'><li style='list-style:none; height:20px; margin-top:10px; line-height:20px; float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>UserName:</span><input type='text' name='UserName' id='UserName' value='' onkeyup='movefocus(event, \"Password\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:20px; margin-top:10px; line-height:20px;  float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>Password:</span><input type='password' name='Password' id='Password' value='' onkeypress='movefocus(event, \"validate\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:30px; margin-top:10px; text-align:center; line-height:30px;  float:left;'><input type='submit' name='submit' id='submit' value='Login' style='width:80px; margin-left:80px; height:30px; line-height:30px;'/><a href='/register.php?act=register&language=3'>  No Register</a><input type='hidden' name='backUrl' id='backUrl' value='' /></li></ul></form>";
	alertWin('Login',str,400,200)
			//get_backUrl();
			//$('#UserName').focus();
		}
	});
}
function en_toDiv() {
	var timer;
	timer = new Date();
	rnd = timer.getTime();
	$.get("/ajaxPhp/login_check.php?t="+rnd,function(data){
		if(data == 1) {
			location.href = "/QaSearchList.php?act=list&sub2=1&language=3";
		} else {
				str="<form action='/login.php?act=login&language=3' name='loginForm'  id='loginForm' method='POST' style='padding:0px; margin:15px auto; width:300px; height:auto;'><ul style='padding:0px; margin:0px; width:100%; height:auto; font-size:12px;'><li style='list-style:none; height:20px; margin-top:10px; line-height:20px; float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>UserName:</span><input type='text' name='UserName' id='UserName' value='' onkeyup='movefocus(event, \"Password\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:20px; margin-top:10px; line-height:20px;  float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>Password:</span><input type='password' name='Password' id='Password' value='' onkeypress='movefocus(event, \"validate\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:30px; margin-top:10px; text-align:center; line-height:30px;  float:left;'><input type='submit' name='submit' id='submit' value='Login' style='width:80px; margin-left:80px; height:30px; line-height:30px;'/><a href='/register.php?act=register&language=3'>  No Register</a><input type='hidden' name='backUrl' id='backUrl' value='' /></li></ul></form>";
	alertWin('Login',str,400,200)
			//get_backUrl();
			//$('#UserName').focus();
		}
	});
}
function set_guanzhu() {
	var timer;
	timer = new Date();
	rnd = timer.getTime();
	$.get("/ajaxPhp/login_check.php?t="+rnd,function(data){
		if(data == 1) {
			location.href = "/QaIndex.php?act=index";
		} else {
				str="<form action='/login.php?act=login' name='loginForm'  id='loginForm' method='POST' style='padding:0px; margin:15px auto; width:300px; height:auto;'><ul style='padding:0px; margin:0px; width:100%; height:auto; font-size:12px;'><li style='list-style:none; height:20px; margin-top:10px; line-height:20px; float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>账号:</span><input type='text' name='UserName' id='UserName' value='' onkeyup='movefocus(event, \"Password\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:20px; margin-top:10px; line-height:20px;  float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>密码:</span><input type='password' name='Password' id='Password' value='' onkeypress='movefocus(event, \"validate\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:30px; margin-top:10px; text-align:center; line-height:30px;  float:left;'><input type='submit' name='submit' id='submit' value='登陆' style='width:80px; margin-left:80px; height:30px; line-height:30px;'/><a href='/register.php?act=register'>  注册</a><input type='hidden' name='backUrl' id='backUrl' value='' /></li></ul></form>";
	alertWin('登陆',str,400,200)
			//get_backUrl();
			//$('#UserName').focus();
		}
	});
}
function en_set_guanzhu() {
	var timer;
	timer = new Date();
	rnd = timer.getTime();
	$.get("/ajaxPhp/login_check.php?t="+rnd,function(data){
		if(data == 1) {
			location.href = "/QaIndex.php?act=index&language=3";
		} else {
				str="<form action='/login.php?act=login&language=3' name='loginForm'  id='loginForm' method='POST' style='padding:0px; margin:15px auto; width:300px; height:auto;'><ul style='padding:0px; margin:0px; width:100%; height:auto; font-size:12px;'><li style='list-style:none; height:20px; margin-top:10px; line-height:20px; float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>UserName:</span><input type='text' name='UserName' id='UserName' value='' onkeyup='movefocus(event, \"Password\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:20px; margin-top:10px; line-height:20px;  float:left;'><span style='width:80px; float:left; display:block; text-align:right;'>Password:</span><input type='password' name='Password' id='Password' value='' onkeypress='movefocus(event, \"validate\");' style='width:180px; float:left; color:#666666;'/></li><li style='list-style:none; height:30px; margin-top:10px; text-align:center; line-height:30px;  float:left;'><input type='submit' name='submit' id='submit' value='Login' style='width:80px; margin-left:80px; height:30px; line-height:30px;'/><a href='/register.php?act=register&language=3'>  No Register </a><input type='hidden' name='backUrl' id='backUrl' value='' /></li></ul></form>";
	alertWin('Login',str,400,200)
			//get_backUrl();
			//$('#UserName').focus();
		}
	});
}
