function xmloperation(url)
{
    var xmlHttp;       
    if(window.ActiveXObject)
    {
        try        
        {            
            xmlHttp=new ActiveXObject("Micriosoft.XMLHTTP");        
        }
        catch(err)                
        {            
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");        
        }
	    xmlHttp.open("POST",url,false);	
	    xmlHttp.send(null);
    }
    else if(window.XMLHttpRequest)//非IE浏览器
    {        
        xmlHttp=new XMLHttpRequest();            
        if(xmlHttp.overrideMimeType)//设置Mime类别
            xmlHttp.overrideMimeType("text/xml");
        xmlHttp.open("GET",url,false);	
	    xmlHttp.send(null);
    }
	return xmlHttp.responseText;
}
function $d(id)
{
    return document.getElementById(id);           
}
function $p(id)
{
    return window.opener.document.getElementById(id);
}
function echo(obj,html,flag)
{
    if(flag)    
        $p(obj).innerHTML=html;    
    else
        $d(obj).innerHTML=html;        
}
//创建xmlhttp对象
function createxmlhttp()
{
    var xmlhttp=false;
    try
    {
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(e)
    {
        try
        {
            xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e)
        {
            xmlhttp=false;
        }
    }
    if(!xmlhttp && typeof XMLHttpRequest!="undefined")
    {
        xmlhttp=new XMLHttpRequest();
        if(xmlhttp.overrideMimeType)
        {//设置MIME类别
            xmlhttp.overrideMimeType("text/xml");
        }
    }
    return xmlhttp;
}
//向服务器获取数据,flag是否父页面id
function getdata(msg,url,obj,flag)
{
    var xmlhttp=createxmlhttp();
    if(!xmlhttp)
    {
        alert("你的浏览器不支持XMLHTTP！！");
        return;
    }
    xmlhttp.onreadystatechange=requestdata;
    xmlhttp.open("GET",url,true);
    xmlhttp.setRequestHeader("If-Modified-Since","0");
    xmlhttp.send(null);    
    function requestdata()
    {        
        if(xmlhttp.readyState==4)
        {
            if(xmlhttp.status==200)
            {
                //echo(obj,xmlhttp.responseText,flag);  
				document.getElementById(obj).innerHTML=xmlhttp.responseText;    
            }
        }
    }
}

function RndPic()
{
    rnd=Math.random();
    document.getElementById("txtUserName").focus();
	document.RndPic.src="/LogRnd.aspx?rnd="+rnd.toString();
}