 function showLogin(username,userid)
    {
	   //login.style.display = "block";
	   document.getElementById('login1').style.display = "block";
	   document.getElementById('login2').innerHTML = "";
	   document.getElementById('toname').innerText = username;
	   document.getElementById('touserid').value=userid;
	   //document.getElementById('touserid').value = userid;
	   //document.getElementById('toform').action="/mianshi.asp?touserid="+userid;
	   
	  document.getElementById('login').style.display = "block";
	}
   function showForbid()
   {
       //forbid.style.width = document.body.clientWidth;
	   //forbid.style.height = document.body.clientHeight;
	   //forbid.style.visibility = "visible";
	   document.getElementById('forbid').style.width = document.body.clientWidth;
	   document.getElementById('forbid').style.height = document.body.clientHeight;
	   document.getElementById('forbid').style.visibility = "visible";
   }
   function clicklogin()
   {
    document.getElementById('login').style.display = "none";
	 document.getElementById('forbid').style.visibility = "hidden";
	 top.location.href="/login.shtml";
   }
   function mclose()
   {
	   document.getElementById('login').style.display = "none";
	 document.getElementById('forbid').style.visibility = "hidden";
	 document.getElementById('login1').style.display = "block";
	   document.getElementById('login2').innerHTML = "";
   }
   function chkmian()
   {
    if(document.toform.ms_content.value=="")
	{
	 alert("信息不完整");
	 return false;
	}
	else
	{
	saveUserInfo();
	
	
	
	 }
   }
   
   
function saveUserInfo()
{
	document.getElementById('login1').style.display = "none";
	   

var msg = document.getElementById("login2");
var userid=document.getElementById("touserid").value;

var f = document.toform;

var ms_content = f.ms_content.value;

//ձURLַ
var url = "/mianshi.asp";

//ҪPOSTֵÿͨ&
var postStr    = "ms_content="+ escape(ms_content) +"&ms_userid="+ userid;


//ʵAjax
//var ajax = InitAjax();


           var ajax = false;
          //ʼʼXMLHttpRequest
          if(window.XMLHttpRequest) { //Mozilla 
                  ajax = new XMLHttpRequest();
                  if (ajax.overrideMimeType) {//MiME
                          ajax.overrideMimeType("text/xml");
                  }
          }
          else if (window.ActiveXObject) { // IE
                  try {
                          ajax = new ActiveXObject("Msxml2.XMLHTTP");
                  } catch (e) {
                          try {
                                  ajax = new ActiveXObject("Microsoft.XMLHTTP");
                          } catch (e) {}
                  }
          }
          if (!ajax) { // 쳣ʵʧ
                  window.alert("不能创建XMLHttpRequest对象实例.");
                  return false;
          }
                
                
    
//ͨPostʽ
ajax.open("POST", url, true); 

//崫ļHTTPͷϢ
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 

//POST
ajax.send(postStr);

//ȡִ״̬
ajax.onreadystatechange = function() { 
    //ִ״̬ɹôͰѷϢдָĲ
    if (ajax.readyState == 4 && ajax.status == 200) { 
     msg.innerHTML = ajax.responseText; 
    }else
	{
		msg.innerHTML="<div align=center><br><br><br><br><img src=\"/images/loading1.gif\" alt=\"\" /><br><br></div>"
	}
} 
}
