/**
 * 图片超过宽度自动缩小
 * @param ImgID 图片ID
 * @param Width 最大宽度
 */
function SetImgW(ImgID,Width)
{
    var w=document.getElementById(ImgID).width;
    var h=document.getElementById(ImgID).height;
    if (w>Width)
    {
        document.getElementById(ImgID).width=Width;
        document.getElementById(ImgID).height=h*Width/w
    }
}


//创建AJAX对象
var xmlHttp;
function createXMLHttpRequest()
{
    if(window.ActiveXObject)
    {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    else
    {
        xmlHttp=new XMLHttpRequest();
    }
}

/**
 * 列表
 */
function _PC_LIST_AJAX()
{
    createXMLHttpRequest();
    xmlHttp.open("POST","../../pclist.jsp",true);
    xmlHttp.setRequestHeader("Cache-Control","no-cache");
    xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    xmlHttp.onreadystatechange=function()
        {
            if(xmlHttp.readyState==4)
            {
                if(xmlHttp.status==200)
                {
                    document.getElementById("pc").innerHTML="评车信息正在加载....";
                    document.getElementById("pc").innerHTML=xmlHttp.responseText;
                }
                else
                {
                    document.getElementById("pc").innerHTML="评车信息正在加载....";
                }
            }
        }
    xmlHttp.send(null);
}

function ShowDriver()
{
    window.onload = function()
    {
        _PC_LIST_AJAX();
    }
}
