var xmlHttp

function ajaxmemberexist(str)
{
	if (str.length==0){ 
	  $("m_noticebox").innerHTML="&nbsp;<img src=\"images/common/check_error.gif\" class=\"absmiddle\" />&nbsp;用户名不能为空";
	  return ;
	  }
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null){
	  alert ("浏览器不支持ajax");
	  return;
	  } 
	var url="ajax.php";
	url=url+"?qmember="+str;
	url=url+"&action=checkuser";
	xmlHttp.open("GET",url,true);
	xmlHttp.onreadystatechange=useridnotice;
	xmlHttp.send(null);
} 


function ajaxcheckemail(str)
{
if (str.length==0)
  { 
  $("e_noticebox").innerHTML="&nbsp;<img src=\"images/common/check_error.gif\" class=\"absmiddle\" />&nbsp;email不能为空";
  return ;
  }
xmlHttp=GetXmlHttpObject();
var url="ajax.php";
url=url+"?qemail="+str;
url=url+"&action=checkemail";
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange=emailnotice;
xmlHttp.send(null);
} 


function GetXmlHttpObject(){
	var xmlHttp = false;
		if(window.XMLHttpRequest) {
			xmlHttp = new XMLHttpRequest();
			if(xmlHttp.overrideMimeType) {
				xmlHttp.overrideMimeType('text/xml');
			}
		} else if(window.ActiveXObject) {
			var versions = ['Microsoft.XMLHTTP', 'MSXML.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.7.0', 'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.5.0', 'Msxml2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP'];
			for(var i=0; i<versions.length; i++) {
				try {
					xmlHttp = new ActiveXObject(versions[i]);
					if(xmlHttp) {
						return xmlHttp;
					}
				} catch(e) {}
			}
		}
		return xmlHttp;
}



function emailnotice(){
	if(xmlHttp.readyState==4){
		$("e_noticebox").innerHTML=xmlHttp.responseText;
	}
} 

function useridnotice(){
	if(xmlHttp.readyState==4){
		$("m_noticebox").innerHTML=xmlHttp.responseText;
	}
} 
