//去掉字符串的前后空格
var xmlHttp = window.XMLHttpRequest?(new XMLHttpRequest()):(new ActiveXObject("Microsoft.XMLHTTP"));

function createXMLHttpRequest()
{
	var xmlHttp=false;
	try
	{
		xmlHttp=new ActiveXObject('Msxm12.XMLHTTP');
	}
	catch(e)
	{
		try
		{
			xmlHttp=new ActiveXObject('Microsoft.XMLHTTP');
		}
		catch(e)
		{
			try
			{
				xmlHttp=new XmlHttpRequest();
			}
			catch(e)
			{
			}
		}
	}
	return xmlHttp;
}


function ShowLoginTd()
{
	var TdStr = "<table width='480' border='0' cellpadding='0' cellspacing='0' style='margin-bottom:5px;'><tr><td width='394' height='22' align='right'>登录：<input name='TopUserName' type='text' id='TopUserName' size='12' maxlength='12'/><span id='UserNameErrSpan'></span><input name='TopUserPwd' type='password' id='TopUserPwd' size='12'/><span id='UserPwdErrSpan'></span></td><td width='43' align='right'><img src='/images/2so5new_09.gif' width='36' height='20' onclick='SubmitLogin();' /></td><td width='43' align='right'><a href='/Reg2010.asp'><img src='/images/t_3.gif' width='36' height='20' border='0' align='absmiddle'/></a></td></tr></table>"
	document.getElementById("LoginTD").innerHTML =TdStr;
}

function SubmitLogin()
{
	var UserName = document.getElementById("TopUserName").value;
	//alert(UserName);
	//UserName = UserName.trim();
	//alert(UserName);
	if (UserName=="")
	{
		alert("提示信息：\n\n请填写用户名！");
		document.getElementById("UserNameErrSpan").innerTEXT = "*";
		document.getElementById("TopUserName").focus();
		return false;
	}
	var UserPwd = document.getElementById("TopUserPwd").value;
	if (UserPwd=="")
	{
		document.getElementById("UserPwdErrSpan").innerTEXT = "*";
		document.getElementById("TopUserPwd").focus();
		return false;
	}
	var url ="&timeStamp=" + new Date().getTime();
	var url = url + "&UserName=" + UserName;
	var url = url + "&userPassWord=" + UserPwd;
	////var xmlHttp = createXMLHttpRequest();
	var ActionCode = "Login";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				if(xmlHttp.responseText=="锁定")
				{
					for(var i=1;i<100;i++)
					{
						alert("你的帐号或IP已经被锁定，请不要尝试非法操作！！");
					}
				}
				else
				{
					crossDomain(UserName,UserPwd)
					//PostHref.setAttribute("href","javascript:HideWindow(PostContent);");
					document.getElementById("PostHref").setAttribute("href","javascript:HideWindow(PostContent);");
					document.getElementById("LoginTD").innerHTML = xmlHttp.responseText+"<iframe src='http://i.fj007.com/login.asp?action=chk&username="+UserName+"&passwd="+UserPwd+"' style='display:none;'></iframe>";
					
					GetFwin();
					document.getElementById("PostHref2").href = "javascript:HideWindow(PostContent);";
				}
			}
			else
			{
				alert("Login failed！");
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

function QuickLoginAjax()
{
	var UserName = document.getElementById("QuickLoginUserName").value;
	//UserName = UserName.Trim();
	if (UserName=="")
	{
		alert("提示信息：\n\n请填写用户名！");
		document.getElementById("QuickLoginUserName").focus();
		return false;
	}
	var UserPwd = document.getElementById("QuickLoginUserPwd").value;
	if (UserPwd=="")
	{
		alert("提示信息：\n\n请填写密码！");
		document.getElementById("QuickLoginUserPwd").focus();
		return false;
	}
	var url ="&timeStamp=" + new Date().getTime();
	var url = url + "&UserName=" + UserName;
	var url = url + "&userPassWord=" + UserPwd;
	//var xmlHttp = createXMLHttpRequest();
	var ActionCode = "QuickLogin";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				if (xmlHttp.responseText == "error")
				{
					document.getElementById("LeftTitle").innerHTML = "帐号或密码输入错误，重新登录";
					document.getElementById("QuickLoginUserName").value= "";
					document.getElementById("QuickLoginUserPwd").value= "";
				}
				else
				{
					document.getElementById("LoginTD").innerHTML = xmlHttp.responseText;
					document.getElementById("PostHref").href = "javascript:HideWindow(PostContent);";
					DialogHide();
					HideWindow(PostContent);
					
					GetFwin();
					document.getElementById("PostHref2").href = "javascript:HideWindow(PostContent);";
				}
			}
			else
			{
				document.getElementById("LeftTitle").innerHTML = "登录失败... :(";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

/*SetPage(SearchType,CateID,AreaID,PageSize,Page,Order)*/

function SetPage(SearchType,CateID,AreaID,PageSize,Page,Order)
{
	var url ="&timeStamp=" + new Date().getTime();
	var url = url + "&SearchType=" + SearchType;
	var url = url + "&CateID=" + CateID;
	var url = url + "&AreaID=" + AreaID;
	var url = url + "&PageSize=" + PageSize;
	var url = url + "&Page=" + Page;
	var url = url + "&Order=" + Order;
	//var xmlHttp = createXMLHttpRequest();
	var ActionCode = "SetPage";
	//window.open("Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","Ajax.asp?ActionCode=" + ActionCode + url,true);
	
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				//document.getElementById("List" + ListType).innerHTML = xmlHttp.responseText;
				document.getElementById("List1").innerHTML = xmlHttp.responseText;
			}
			else
			{
				//document.getElementById("List" + ListType).innerHTML = "加载失败... :(";
				document.getElementById("List1").innerHTML = "加载失败... :(";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

function SetOnlinePage(PageSize,Page)
{
	var url ="&timeStamp=" + new Date().getTime();
	var url = url + "&PageSize=" + PageSize;
	var url = url + "&Page=" + Page;
	//var xmlHttp = createXMLHttpRequest();
	var ActionCode = "SetOnlinePage";
	//window.open("Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","Ajax.asp?ActionCode=" + ActionCode + url,true);
	
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				document.getElementById("OnlineTD").innerHTML = xmlHttp.responseText;
			}
			else
			{
				document.getElementById("OnlineTD").innerHTML = "加载失败... :(";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

function SetCommentPage(ObjectType,ObjectID,PageSize,Page)
{
	var url ="&timeStamp=" + new Date().getTime();
	var url = url + "&PageSize=" + PageSize;
	var url = url + "&Page=" + Page;
	var url = url + "&ObjectType=" + ObjectType;
	var url = url + "&ObjectID=" + ObjectID;
	//var xmlHttp = createXMLHttpRequest();
	var ActionCode = "SetCommentPage";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				document.getElementById("CommentTb").innerHTML = xmlHttp.responseText;
			}
			else
			{
				document.getElementById("CommentTb").innerHTML = "加载失败... :(";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}


function LoginOut()
{
	var url ="&timeStamp=" + new Date().getTime();
	//var xmlHttp = createXMLHttpRequest();
	var ActionCode = "LoginOut";
	//window.open("Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			window.location="/index.asp";
			//ShowLoginTd();
			//document.all.PostHref.href = "javascript:HideWindow(LoginContent);";
		}
		
	}
	xmlHttp.send(null);
	return false;
}

function CheckUserName()
{
	var UserName = document.getElementById("RegUsername").value;
	//UserName =UserName.Trim();
	if (UserName=="")
	{
		document.getElementById("UserChkSpan").innerText="请填写用户名";
		document.getElementById("RegUsernameBK").className="ubk1";
		return false;
	}
	document.getElementById("UserChkSpan").innerText="用户名检测中...";
	//xmlHttp = createXMLHttpRequest();
	var ActionCode = "CheckUserName";
	xmlHttp.open("Get","Ajax.asp?ActionCode=" + ActionCode + "&UserName=" + UserName + "&timeStamp=" + new Date().getTime(),true);

	xmlHttp.onreadystatechange = function()
	{
		if( xmlHttp.readyState == 4 )
		{
			if(xmlHttp.status == 200)
			{
				var MsgTxt;
				switch(xmlHttp.responseText)
				{
					case "0":
						MsgTxt = "请填写用户名";
						break;
					case "1":
						MsgTxt = "用户名必须6-12位字符.";
						break;
					case "2":
						MsgTxt = "用户名含有非法字符不能使用.";
						break;
					case "3":
						MsgTxt = "该用户名可以使用.";
						break;
					case "4":
						MsgTxt = "该用户名已被使用.";
						break;
					default:
						MsgTxt = "未选择操作!";
						break;
				}
				document.getElementById("UserChkSpan").innerText=MsgTxt;
				if (xmlHttp.responseText == 3){
					document.getElementById("RegUsernameBK").className="ubk3";
				}else{
					document.getElementById("RegUsernameBK").className="ubk1";
				}
			}
		}
	}
	xmlHttp.send(null);
	return false;
}

function CheckUserPwd()
{
	var userPwd = document.getElementById("userPwd").value;
	var chkPwd = document.getElementById("chkPwd").value;
	//UserName =UserName.Trim();
	if (userPwd==""){
		document.getElementById("pass").innerText="请填写登录密码";
		document.getElementById("userPwdBK").className="ubk1";
	}else{
		document.getElementById("pass").innerText="填写正确";
		document.getElementById("userPwdBK").className="ubk3";
	}
	if (chkPwd==""){
		document.getElementById("pass2").innerText="请填写确认密码";
		document.getElementById("chkPwdBK").className="ubk1";
	}else if(userPwd != chkPwd){
		document.getElementById("pass2").innerText="确认密码和登录密码不一致";
		document.getElementById("chkPwdBK").className="ubk1";
	}else{
		document.getElementById("pass2").innerText="填写正确";
		document.getElementById("chkPwdBK").className="ubk3";
	}
	return false;
}

function EditUserPwd()
{
	var oldUserPwd = document.getElementById("oldUserPwd").value;
	var userPassWord = document.getElementById("userPassWord").value;
	var chkUserPwd = document.getElementById("chkUserPwd").value;
	//UserName =UserName.Trim();
	if (userPassWord!=""){
		if (oldUserPwd==""){
			document.getElementById("opass").innerText="请填写旧密码";
			document.getElementById("userPwdOld").className="ubk1";
			return false;
		}
		if (chkUserPwd==""){
			document.getElementById("pass2").innerText="确认密码和新密码不一致";
			document.getElementById("chkPwdBK").className="ubk1";
			return false;
		}
	}
}

function CheckPostText(PostID,PostName,PostType)
{
	var PostTxt = document.getElementById(PostID).value;
	//UserName =UserName.Trim();
	if (PostTxt==""){
		document.getElementById(PostID+"_div").innerText="请"+PostType+PostName+"。";
		document.getElementById(PostID+"_div").className="ubk1";
	}else{
		document.getElementById(PostID+"_div").innerText=PostName+"已"+PostType+"。";
		document.getElementById(PostID+"_div").className="ubk3";
	}
	return false;
}

function GetUserOnline(UserID)
{

}

function GetUserOnline2(UserID)
{
	var url = "&UserID=" + UserID + "&timeStamp=" + new Date().getTime();
	var ActionCode = "GetUserOnline";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				document.getElementById("UserOnline").innerHTML = xmlHttp.responseText;
			}
			else
			{
				document.getElementById("UserOnline").innerHTML = ":(";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

function UpClick(ID)
{
	var url = "&ID=" + ID + "&timeStamp=" + new Date().getTime();
	var ActionCode = "UpClick";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				if (xmlHttp.responseText==1)
				{
					GetUpClick(ID);
				}
				else if(xmlHttp.responseText==0)
				{
					alert("请不要在4小时内重复操作!")
				}
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

function GetUpClick(ID)
{
	var url = "&ID=" + ID + "&timeStamp=" + new Date().getTime();
	var ActionCode = "GetUpClick";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				document.getElementById("UpHits").innerHTML = xmlHttp.responseText;
			}
			else
			{
				document.getElementById("UpHits").innerHTML = ":(";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

function getSphone1(ID)
{
	var url = "&ID=" + ID + "&timeStamp=" + new Date().getTime();
	var ActionCode = "getSphone1";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				document.getElementById("Sphone1").value = xmlHttp.responseText;
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}


function doOrderStyle(ID,CateID)
{
	if (ID=="1"){
		SetPage("0",CateID,"","40","1","updatetime");
		//alert(ID);
	}else if (ID=="2"){
		SetPage("0",CateID,"","40","1","LastComment");
		//alert(ID);
	}else if (ID=="3"){
		SetPage("1",CateID,"","40","1","updatetime");
		//alert(ID);
	}else if (ID=="4"){
		SetPage("2",CateID,"","40","1","updatetime");
		//alert(ID);
	}else if (ID=="5"){
		SetPage("3",CateID,"","40","1","updatetime");
		//alert(ID);
	}else if (ID=="6"){
		SetPage("0",CateID,"5","40","1","updatetime");
		//alert(ID);
	}else if (ID=="7"){
		SetPage("0",CateID,"77","40","1","updatetime");
		//alert(ID);
	}else if (ID=="8"){
		SetPage("0",CateID,"78","40","1","updatetime");
		//alert(ID);
	}else if (ID=="9"){
		SetPage("0",CateID,"79","40","1","updatetime");
		//alert(ID);
	}else if (ID=="10"){
		SetPage("0",CateID,"179","40","1","updatetime");
		//alert(ID);
	}else if (ID=="11"){
		SetPage("0",CateID,"80","40","1","updatetime");
		//alert(ID);
	}else if (ID=="12"){
		SetPage("0",CateID,"81","40","1","updatetime");
		//alert(ID);
	}else if (ID=="13"){
		SetPage("0",CateID,"82","40","1","updatetime");
		//alert(ID);
	}else if (ID=="14"){
		SetPage("0",CateID,"83","40","1","updatetime");
		//alert(ID);
	}
}

function GetFwin(){
	var ActionCode = "getfwin";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + "&timeStamp=" + new Date().getTime(),true);	
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				document.getElementById("MsgDiv").innerHTML = xmlHttp.responseText;
			}
			else
			{
				document.getElementById("MsgDiv").innerHTML = "Loading...";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

function fwinLoginAjax()
{
	var UserName = document.getElementById("fwinUserName").value;
	//UserName = UserName.Trim();
	if (UserName=="")
	{
		alert("提示信息：\n\n请填写用户名！");
		document.getElementById("fwinUserName").focus();
		return false;
	}
	var UserPwd = document.getElementById("fwinUserPwd").value;
	if (UserPwd=="")
	{
		alert("提示信息：\n\n请填写密码！");
		document.getElementById("fwinUserPwd").focus();
		return false;
	}
	var url ="&timeStamp=" + new Date().getTime();
	var url = url + "&UserName=" + UserName;
	var url = url + "&userPassWord=" + UserPwd;
	//var xmlHttp = createXMLHttpRequest();
	var ActionCode = "fwinLogin";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				if (xmlHttp.responseText == "error")
				{
					//document.getElementById("LeftTitle").innerHTML = "帐号或密码输入错误，重新登录";
					alert('帐号或密码输入错误，请重新登录！');
					document.getElementById("fwinUserName").value= "";
					document.getElementById("fwinUserPwd").value= "";
				}
				else
				{
					document.getElementById("MsgDiv").innerHTML = xmlHttp.responseText;
					document.getElementById("PostHref").href = "javascript:HideWindow(PostContent);";
					GetTopLogin();
					setInterval("RefreshMsg();",60000);
					document.getElementById("PostHref2").href = "javascript:HideWindow(PostContent);";
				}
			}
			else
			{
				//document.getElementById("LeftTitle").innerHTML = "登录失败... :(";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

function GetTopLogin(){
	var ActionCode = "GetTopLogin";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + "&timeStamp=" + new Date().getTime(),true);	
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				document.getElementById("LoginTD").innerHTML = xmlHttp.responseText;
			}
			else
			{
				document.getElementById("LoginTD").innerHTML = "登录失败... :(";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

//取得分类下的帖子数
function GetCateCounts(ID)
{
	var url = "&ID=" + ID + "&timeStamp=" + new Date().getTime();
	var ActionCode = "GetCateCounts";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				alert(xmlHttp.responseText);
				document.getElementById("Cate_"+ID).innerHTML = xmlHttp.responseText;
			}
			else
			{
				document.getElementById("Cate_"+ID).innerHTML = "0";
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

//弹出发送短消息窗口
function SendMsgWin(UserName)
{
	var url = "&timeStamp=" + new Date().getTime();
	var ActionCode = "GetUserIsLogin";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				if (xmlHttp.responseText==0)
				{
					//initbox2('floatBox','draghead');
					//showBox();
					alert("您还未登录，请先登录后再发送短消息！");
					return false;
				}
				else{
					HideWindow(SendMsgContent);
					document.getElementById("Msg_ReceiveUserName").value = UserName;
					document.getElementById("Msg_ReceiveUserName_Show").innerHTML = UserName;
				}
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

//发送短消息
function SendMsgAjax()
{
	var ReceiveUserName = document.getElementById("Msg_ReceiveUserName").value;
	if (ReceiveUserName=="")
	{
		alert("提示信息：\n\n请填写收信人名称！");
		return false;
	}
	var Title = document.getElementById("Msg_Title").value;
	if (Title=="")
	{
		alert("提示信息：\n\n请填写标题！");
		document.getElementById("Msg_Title").focus();
		return false;
	}
	var MsgContent = document.getElementById("MsgContent").value;
	if (MsgContent=="")
	{
		alert("提示信息：\n\n请填写内容！");
		document.getElementById("MsgContent").focus();
		return false;
	}
	var url ="&timeStamp=" + new Date().getTime();
	var url = url + "&ReceiveUserName=" + ReceiveUserName;
	var url = url + "&Title=" + Title;
	var url = url + "&MsgContent=" + MsgContent;
	var ActionCode = "SendMsgAjax";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				DialogHide();
				HideWindow(SendMsgReturn);
				document.getElementById("SendMsgReturnStr").innerHTML = xmlHttp.responseText;
				setTimeout('CWTime()', 1000);
			}
			else
			{
				DialogHide();
				HideWindow(SendMsgReturn);
				document.getElementById("SendMsgReturnStr").innerHTML = "未知原因发送失败，请检查！";
				setTimeout('CWTime()', 1000);
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}
var _sw = 5; 
var _tw;
function CWTime() {
	_sw --;
	if (_sw==0) {
		DialogHide(); 
	}
	else
	{
		document.getElementById("timeSpan").innerHTML = _sw;
		setTimeout('CWTime()', 1000);
	}
}

//获取用户已发帖列表
function GetUserLatestList(UserID)
{
	document.getElementById("UserLatestList").innerHTML = "资料获取中，请稍候……";
	var url = "&timeStamp=" + new Date().getTime();
	var url = url + "&UserID=" + UserID;
	var ActionCode = "GetUserLatestList";
	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				//alert(xmlHttp.responseText);
				document.getElementById("UserLatestList").innerHTML = xmlHttp.responseText;
			}
		}
		
	}
	xmlHttp.send(null);
	return false;
}

//显示目前正在浏览信息的人员
function GetViewOnline(pName,iTitle)
{
	//document.getElementById("ViewOnlineList").innerHTML = "资料获取中，请稍候……";
//	var url = "&timeStamp=" + new Date().getTime();
//	var url = url + "&pName=" + pName;
//	var url = url + "&iTitle=" + iTitle;
//	var ActionCode = "GetViewOnline";
//	//window.open("/Ajax.asp?ActionCode=" + ActionCode + url);
//	xmlHttp.open("get","/Ajax.asp?ActionCode=" + ActionCode + url,true);
//	xmlHttp.onreadystatechange=function()
//	{
//		if(xmlHttp.readyState==4)
//		{
//			if(xmlHttp.status==200)
//			{
//				//alert(xmlHttp.responseText);
//				document.getElementById("ViewOnlineList").innerHTML = xmlHttp.responseText;
//			}
//		}
//		
//	}
//	xmlHttp.send(null);
//	return false;
}

//i.fj007.com帖子列表
function slist2(page)
{
	document.getElementById("slist2").innerHTML = "内容加载中，请稍候……";
	var url ="?timeStamp=" + new Date().getTime();
	var url = url + "&page=" + page;
	//alert('1');
	//window.open("/bbslist.asp" + url);
	xmlHttp.open("get","/bbslist.asp" + url,true);
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				//alert("2");
				document.getElementById("slist2").innerHTML = xmlHttp.responseText;
			}
			else
			{
				//alert("3");
				document.getElementById("slist2").innerHTML = "加载失败，请刷新……";
			}
		}
		
	}
	xmlHttp.send(null);
	//return false;
}

function crossDomain(userName,passWD){
	var urls = new Array();

	urls[0] = "http://i.fj007.com/login.asp?action=chk&username="+ userName +"&passwd="+ passWD;


	var objPanels = document.body.getElementsByTagName('table');
	var objPanel;
	if(objPanels.length<0)
		objPanels = document.body.getElementsByTagName('div');
	objPanel = objPanels[objPanels.length - 1];

	var HTML = "";
	for(var i=0;i<urls.length;i++){
		 HTML += "<iframe src='" + urls[i] + "' style='display:none;'></iframe>";
	}

	objPanel.outerHTML += HTML;
	
}
