var bgObj=document.createElement("div");
var htmlBody =document.createElement("div");
var pindex;
function DIVWindow(cid){
	pindex=cid;
	var msgw,msgh,bordercolor;
        msgw=881;//提示窗口的宽度
        msgh=538;//提示窗口的高度
        titleheight=25 //提示窗口标题高度
        bordercolor="#336699";//提示窗口的边框颜色
        titlecolor="#99CCFF";//提示窗口的标题颜色
        var sWidth,sHeight;
        sWidth=document.body.offsetWidth;
        sHeight=screen.height;
        bgObj.setAttribute('id','bgDiv');
        bgObj.style.position="absolute";
        bgObj.style.top="0";
        bgObj.style.background="#000";
        bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=7,opacity=75,finishOpacity=25";
        bgObj.style.opacity="0.6";
        bgObj.style.left="0";
        
        bgObj.style.width=sWidth + "px";
        bgObj.style.height=sHeight + "px";
        bgObj.style.zIndex = "9999";
        bgObj.style.textAlign = "right";
        bgObj.style.padding = "5px";
       	//var closediv=Object();
       	//closediv.innerHTML="<input style='border:1px solid #cccccc;' type=button value='关闭' >";
       	//closediv.style.width="37px";
      // 	closediv.style.fontSize="12px";
       	//closediv.style.cursor ="pointer";
        	htmlBody.style.width="100%";
        	htmlBody.style.textAlign="center";
        	htmlBody.style.position="absolute";
        	htmlBody.style.overflow='auto';
        	htmlBody.style.zIndex = "10000";
        	htmlBody.style.top	="50px";
        	htmlBody.style.left	= "0px";
        	
			var TableHtml=''
				+'<table width="881" border="0" align="center" cellpadding="0" cellspacing="0">'
			    +'  <tr>'
			    +'    <td width="881" align="right"><img onclick="CloseWindow()" style="cursor:pointer;" src="images/zuopinzhanshitc_03.gif" width="16" height="16" /></td>'
			    +'  </tr>'
			    +'  <tr>'
			    +'    <td height="26" align="right" bgcolor="#FFFFFF" class="hui40"><span sylte="color:#f00;width:200px;height:21px;" id=_state name=_state></span><img src="images/zuopinzhanshitc_07.gif" width="7" height="12" align="absmiddle" />&nbsp;<a onclick="_showPicCont(\'\',(pindex-1))">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;<a onclick="_showPicCont(\'\',(Number(pindex)+1))">下一页</a>&nbsp;<img src="images/zuopinzhanshitc_09.gif" width="7" height="12" align="absbottom" /></td>'
			    +'  </tr>'
			    +'  <tr>'
			    +'    <td bgcolor="#cccccc" height="1px"></td>'
			    +'  </tr>'
			    +'  <tr>'
			    +'    <td  height="449" align="center" bgcolor="#FFFFFF">'
			    +'		<table border="0" cellspacing="0" cellpadding="0">'
          		+'			<tr>'
            	+'				<td id=_picLeft class="picstyle" align=center >'
            	+'				</td>'
            	+'			<td  id=_picRight width="150" align="left" valign="top" class="padding18">'
            	+'			</td>'
            	+'			</tr>'
            	+'		 </table>'
			    +'    </td>'
			    +'  </tr>'
			    +'</table>'
				+'';
          	htmlBody.innerHTML=TableHtml;
         	document.body.style.overflow="hidden";
	        document.body.scrollTop =0;
	        document.body.appendChild(bgObj);
	        document.body.appendChild(htmlBody);
	        document.body.onkeydown=function(){
				if(window.event.keyCode==27){
				 	CloseWindow();
				}
	    	}
	    	_showPicCont('this',pindex);
}
function  CloseWindow(){
          document.body.removeChild(bgObj);
          document.body.removeChild(htmlBody);
          document.body.style.overflow="auto";
}
function nodeValue(obj){
	return obj.firstChild.nodeValue;
}
