
var xmlHttp;
function makeRequest(auction_id) {
	var msXml = new Array();
	msXml[0] = "Microsoft.XMLHTTP";
	msXml[1] = "MSXML2.XMLHTTP.5.0";
	msXml[2] = "MSXML2.XMLHTTP.4.0";
	msXml[3] = "MSXML2.XMLHTTP.3.0";
	msXml[4] = "MSXML2.XMLHTTP";
	if (window.xmlHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	} else {
		for (var i = 0; i < msXml.length; i++) {
			try {
				xmlHttp = new ActiveXObject(msXml[i]);
				break;
			} catch (e) {
				xmlHttp = new xmlHttpRequest();
			}
		}
	}
	xmlHttp.onreadystatechange = getRequest;
	xmlHttp.open('GET', 'index.php?cake=auction&module=detail&mode=shoucang&auction_id='+auction_id, true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttp.send(null);
}
function getRequest() {
	if(xmlHttp.readyState==4) { 
		if(xmlHttp.status==200) {
			Msg(xmlHttp.responseText);
		}
	}	
}
function Msg(str){
//创建提示对话框面板
            var dvMsg = document.createElement("div");
           dvMsg.style.position = "absolute";
            dvMsg.setAttribute('id','msg');
            dvMsg.style.width = "400px";
            dvMsg.style.height = "150px";
            dvMsg.style.top="40%";
            dvMsg.style.right="40%";
            dvMsg.style.background = "white";
            dvMsg.style.border="1px solid #D7B4CB";
           dvMsg.style.zIndex = "1112";
            document.body.appendChild(dvMsg);
            //标题栏
            var title = document.createElement("div");
            title.style.position = "absolute";
            title.setAttribute('id','title');
            title.style.width = "400px";
            title.style.height = "10px";
            title.style.top= "0";            
            title.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=11,opacity=100,finishOpacity=100%)";
            title.style.zIndex = "1113";
            title.innerHTML = "<font style='color: #8E4F6B;font-size: 13px;font-weight: bold;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;收藏夹提醒</font>";
            title.style.background = "#D7B4CB";
            
            //提示图片
            var imgErr = document.createElement("img");
           // imgErr.src = "user/images/delete.jpg";
           // imgErr.style.marginLeft = "15px";
           // imgErr.style.weith = "15px";
          //  imgErr.style.height = "15px";
           // imgErr.style.marginTop = "30px";
           // imgErr.style.position = "absolute";

            //关闭图片
            var imgClo = document.createElement("img");
            imgClo.src = "user/images/err.jpg";
            imgClo.style.marginright = "78px";
          //  imgClo.style.weith = "274px";
           // imgClo.style.height = "42px";
            imgClo.style.marginTop = "0px";
            imgClo.style.position = "absolute";
            imgClo.style.zIndex = "1115";
            imgClo.style.cursor = "hand";
            imgClo.onclick = function ()
                             {
                                document.body.removeChild(dv);
                                document.body.removeChild(dvMsg);    
                             }
            //确定按钮
            var btn = document.createElement("input");
            btn.id = "ok";
            btn.type= "button";
           btn.value = "确  定";
           btn.style.marginTop = "93px";
          　btn.style.marginLeft = "60%";
            btn.style.position = "absolute";
            btn.style.marginLeft = "60%";
            btn.style.background = "#ffffff";
            btn.style.color = "#E80300";
            btn.style.border = "2px solid #CCB893";
            btn.style.height = "20px";
          //  btn.style.background = "lightwhite";
            //点击关闭
            btn.onclick = function ()
                          {
                            document.body.removeChild(dv);
                            document.body.removeChild(dvMsg);
                          }        
            //响应回车              
            btn.onkeydown = function ()
                          {
                            if (event.keyCode == "13")
                           {
                                document.body.removeChild(dv);
                                document.body.removeChild(dvMsg);
                            }
                          }
            var msg = document.createElement("div");
           msg.style.marginTop = "25px";
            msg.style.marginLeft = "20%";
            msg.style.position = "absolute";
            msg.style.width = "300px";
            msg.innerHTML = str; 
            document.getElementById('msg').appendChild(msg);
            document.getElementById('msg').appendChild(btn);
            //document.getElementById('msg').appendChild(imgErr);
            document.getElementById('msg').appendChild(imgClo);
            document.getElementById('msg').appendChild(title);         
            document.getElementById('ok').focus();//确定遮罩层的高度，宽度
             var h = screen.availHeight;
             var w = screen.availHeight;
             //创建遮罩层，它的主要作用就是使网页中的其他元素不可用。
             var dv = document.createElement("div");
             dv.setAttribute('id','bg');
            //设置样式
            dv.style.height = h + "px";
            dv.style.width = w + "px";
            dv.style.zIndex = "1111";
            dv.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=2,opacity=1,finishOpacity=100%)";
            dv.style.background = "red";
            dv.style.top = 0;
            //设为绝对定位很重要
            dv.style.position = "absolute";
            //将该元素添加至body中
           document.body.appendChild(dv);
}