﻿
 //--------------- 主导航条内容 ------------//
//var mainLayer=new Array("<img src='../images/menu/s.jpg' onmouseover='javascript:Tshow_fn(1);' width='70' height='33' border='0'>"
//						,"<img src='../images/menu/1.jpg' onmouseover='javascript:Tshow_fn(2);' width='100' height='33' border='0'>"
//						,"<img src='../images/menu/2.jpg' onmouseover='javascript:Tshow_fn(3);' width='100' height='33' border='0'>"
//						,"<img src='../images/menu/3.jpg' onmouseover='javascript:Tshow_fn(4);' width='100' height='33' border='0'>"
//						,"<img src='../images/menu/4.jpg' onmouseover='javascript:Tshow_fn(5);' width='100' height='33' border='0'>"
//						,"<img src='../images/menu/5.jpg' onmouseover='javascript:Tshow_fn(6);' width='100' height='33' border='0'>"
//						,"<img src='../images/menu/6.jpg' onmouseover='javascript:Tshow_fn(7);' width='100' height='33' border='0'>"
//						,"<img src='../images/menu/7.jpg' onmouseover='javascript:Tshow_fn(8);' width='100' height='33' border='0'>"
//						,"<img src='../images/menu/8.jpg' onmouseover='javascript:Tshow_fn(9);' width='100' height='33' border='0'>"
//						,"<img src='../images/menu/9.jpg' onmouseover='javascript:Tshow_fn(10);' width='101' height='33' border='0'>");//主导航栏目
var mainLayer=new Array("<img src='../images/menu/s.jpg' onmouseover='javascript:Tshow_fn(1);' width='71' height='33' border='0'>"
						,"<div onmouseover='javascript:Tshow_fn(2);' vertical-align: baseline; background-repeat: repeat; text-align: center; height:100%; width:100%;'>"
						,"<div onmouseover='javascript:Tshow_fn(3);' vertical-align: middle; background-repeat: repeat; text-align: center; height:100%; width:100%;'>"
						,"<div onmouseover='javascript:Tshow_fn(4);' vertical-align: middle; background-repeat: repeat; text-align: center; height:100%; width:100%;'>"
						,"<div onmouseover='javascript:Tshow_fn(5);' vertical-align: middle; background-repeat: repeat; text-align: center; height:100%; width:100%;'>"
						,"<div onmouseover='javascript:Tshow_fn(6);' vertical-align: middle; background-repeat: repeat; text-align: center; height:100%; width:100%;'>"
						,"<div onmouseover='javascript:Tshow_fn(7);' vertical-align: middle; background-repeat: repeat; text-align: center; height:100%; width:100%;'>"
						,"<div onmouseover='javascript:Tshow_fn(8);' vertical-align: middle; background-repeat: repeat; text-align: center; height:100%; width:100%;'>"
						,"<div onmouseover='javascript:Tshow_fn(9);' vertical-align: middle; background-repeat: repeat; text-align: center; height:100%; width:100%;'>"
						,"<div onmouseover='javascript:Tshow_fn(10);' vertical-align: middle; background-repeat: repeat; text-align: center; height:100%; width:100%;'>"
						,"<div onmouseover='javascript:Tshow_fn(11);' vertical-align: middle; background-repeat: repeat; text-align: center; height:100%; width:100%;'>");//主导航栏目
var mainTdWidth=new Array("71","90","90","90","90","90","90","90","90","90","90") ;
var mainLayerLink=new Array("../index/index.aspx","../about/about1.aspx","../about/about2.aspx","../about/about3.aspx","../xzxk/xzxk.aspx"
							,"../about/about5.aspx","../about/about6.aspx","../about/about7.aspx","../about/about8.aspx","../about/about9.aspx");
							


var subLayer0=new Array(); //导航栏目一下的次级栏目
var subLayerHttp0=new Array();//主导航栏目一下的次级栏目连接地址
var subLayer1=new Array();//导航栏目二的次级栏目
var subLayerHttp1=new Array();//主导航栏目二的次级栏目连接地址
var subLayerId1=new Array();
var subLayer2=new Array();
var subLayerHttp2=new Array();
var subLayerId2=new Array();
var subLayer3=new Array();
var subLayerHttp3=new Array();
var subLayerId3=new Array();
var subLayer4=new Array();
var subLayerHttp4=new Array();
var subLayerId4=new Array();
var subLayer5=new Array();
var subLayerHttp5=new Array();
var subLayerId5=new Array();
var subLayer6=new Array();
var subLayerHttp6=new Array();
var subLayerId6=new Array();
var subLayer7=new Array();
var subLayerHttp7=new Array();
var subLayerId7=new Array();
var subLayer8=new Array();
var subLayerHttp8=new Array();
var subLayerId8=new Array();
var subLayer9=new Array();
var subLayerHttp9=new Array(); 
var subLayerId9=new Array();
var subLayer10=new Array();
var subLayerHttp10=new Array(); 
var subLayerId10=new Array();



//--------------- 主导航条Table参数调整 ------------//
var mainTableTdWidth=88.3; //每个TD的宽度，调整主导航内容间距
var mainTableBorder=0; //调整主导航表格边框宽度
var mainTableCellspacing=0; //调整主导航表格Cellspacing
var mainTableCellpadding=0; //调整主导航表格Cellpadding
var mainTableBgcolor=""; //调整主导航表格背景色
var mainTableBordercolor=""; //调整主导航表格编框颜色
var mainTableBackgroundImg=""; //调整主导航表格背景图片url地址
var hrefClassName="hei1" //调整url风格样式
var mainTableTdBgcolor=""; //调整主导航表格Td色



//--------------- 次导航条Table参数调整 ------------//
var subTableBorder=0; //调整次导航条表格边框宽度
var subTableCellspacing=0; //调整次导航条表格Cellspacing
var subTableCellpadding=1; //调整次导航条表格Cellpadding
var subTableBgcolor="#3884BB"; //调整次导航条表格背景色
var subTableBordercolor=""; //次导航条表格编框颜色
var subTableBackgroundImg=""; //次导航条表格背景图片url地址
var subTableTdBgcolor="#EEF7FF"; //调整次导航表格Td色
var sbuTabbleTop=33; //次导航表格上下微调
var sbuTabbleLeft=0; //次导航表格左右微调
var onMouseOverBgcolor="this.style.backgroundColor='#8FC4E8'";
var onMouseOutBgcolor="this.style.backgroundColor='#EEF7FF'" ;

var menutablewidth=new Array("71px","100px","90px","120px","90px","100px","90px","90px","100px","90px","90px"); //次导航表格宽度
var layerleft = new Array(9,71,161,251,341,431,521,611,701,791,881); //次导航表格位置

//--------------- 系统参数*请勿调整 ------------//
var layerMax=mainLayer.length+10;
var layerName="index";

//--------------- 生成下拉菜单 ------------//
function createMainLayer(){ 
        var data = AjaxClass.GetModule('3');
        var firstMenuData = AjaxClass.GetFirstMenu_Pre();
var a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,j=0;
for(var i=0;i<data.value.Tables[0].Rows.length;i++)
{
//----------20090607 lmz-----------------------------------------
    if(data.value.Tables[0].Rows[i].parentId == '5') //政务公开
    {        
        subLayer1[a] = data.value.Tables[0].Rows[i].name;
        if(data.value.Tables[0].Rows[i].nodeId == "12") //信息公开目录
        {
            subLayerHttp1[a] = "http://zwgk.dl.gov.cn/dpt.jse?dpt=115";
        }
        else if(data.value.Tables[0].Rows[i].nodeId == "78") //信息公开目录
        {
            subLayerHttp1[a] = "http://zwgk.dl.gov.cn/catalogguideinfolist.jse";
        }
        else
        {
            subLayerHttp1[a] = "../about/about.aspx?typeId=" + data.value.Tables[0].Rows[i].parentId + "&id="+data.value.Tables[0].Rows[i].nodeId;
            subLayerId1[a] = data.value.Tables[0].Rows[i].nodeId;
        }
        a = a + 1;
    }
    if(data.value.Tables[0].Rows[i].parentId == '14')
    {
        subLayer2[b] = data.value.Tables[0].Rows[i].name;
        subLayerHttp2[b] = "../about/about.aspx?typeId=" + data.value.Tables[0].Rows[i].parentId + "&id="+data.value.Tables[0].Rows[i].nodeId;
        subLayerId2[b] = data.value.Tables[0].Rows[i].nodeId;
        b = b + 1;
    }
    if(data.value.Tables[0].Rows[i].parentId == '19')
    {
        subLayer3[c] = data.value.Tables[0].Rows[i].name;
        subLayerHttp3[c] = "../about/about.aspx?typeId=" + data.value.Tables[0].Rows[i].parentId + "&id="+data.value.Tables[0].Rows[i].nodeId;
        subLayerId3[c] = data.value.Tables[0].Rows[i].nodeId;
        c = c + 1;
    }
    if(data.value.Tables[0].Rows[i].parentId == '23')
    {
        subLayer4[d] = data.value.Tables[0].Rows[i].name;
        subLayerHttp4[d] = "../about/about.aspx?typeId=" + data.value.Tables[0].Rows[i].parentId + "&id="+data.value.Tables[0].Rows[i].nodeId;
        subLayerId4[d] = data.value.Tables[0].Rows[i].nodeId;
        d = d + 1;
    }
    if(data.value.Tables[0].Rows[i].parentId == '24')
    {
        subLayer5[e] = data.value.Tables[0].Rows[i].name;
        subLayerHttp5[e] = "../about/about.aspx?typeId=" + data.value.Tables[0].Rows[i].parentId + "&id="+data.value.Tables[0].Rows[i].nodeId;
        subLayerId5[e] = data.value.Tables[0].Rows[i].nodeId;
        e = e + 1;
    }
    if(data.value.Tables[0].Rows[i].parentId == '29')
    {
        subLayer6[f] = data.value.Tables[0].Rows[i].name;
        if(data.value.Tables[0].Rows[i].nodeId == "32")
        {
            subLayerHttp6[f] = "../../XZXK/Default.aspx"
        }
        else
        {
            subLayerHttp6[f] = "../about/about.aspx?typeId=" + data.value.Tables[0].Rows[i].parentId + "&id="+data.value.Tables[0].Rows[i].nodeId;
        }
        subLayerId6[f] = data.value.Tables[0].Rows[i].nodeId;
        f = f + 1;
    }
    if(data.value.Tables[0].Rows[i].parentId == '35')
    {
        subLayer8[g] = data.value.Tables[0].Rows[i].name;
        subLayerHttp8[g] = "../about/about.aspx?typeId=" + data.value.Tables[0].Rows[i].parentId + "&id="+data.value.Tables[0].Rows[i].nodeId;
        subLayerId8[g] = data.value.Tables[0].Rows[i].nodeId;
        g = g + 1;
    }
    if(data.value.Tables[0].Rows[i].parentId == '38')
    {
        subLayer9[h] = data.value.Tables[0].Rows[i].name;
        subLayerHttp9[h] = "../about/about.aspx?typeId=" + data.value.Tables[0].Rows[i].parentId + "&id="+data.value.Tables[0].Rows[i].nodeId;
        subLayerId9[h] = data.value.Tables[0].Rows[i].nodeId;
        h = h + 1;
    }
    if(data.value.Tables[0].Rows[i].parentId == '41')
    {
        subLayer10[j] = data.value.Tables[0].Rows[i].name;
        subLayerHttp10[j] = "../about/about.aspx?typeId=" + data.value.Tables[0].Rows[i].parentId + "&id="+data.value.Tables[0].Rows[i].nodeId;
        subLayerId10[j] = data.value.Tables[0].Rows[i].nodeId;
        j = j + 1;
    }
}  
document.write("<table border=0 cellspacing=0 cellpadding=0><tr><td><div id='wall' onmouseout=layervib('visible','"+layerMax+"') style='position:relative; left:0px; top:0px; width:100%; z-index:1' ><table width="+mainLayer.length*mainTableTdWidth+" border='"+mainTableBorder+"' cellspacing='"+mainTableCellpadding+"' cellpadding='"+mainTableCellpadding+"' bgcolor='"+mainTableBgcolor+"' bordercolor='"+mainTableBordercolor+"' background='"+mainTableBackgroundImg+"'><tr>");
document.write("");
for(i=0;i<mainLayer.length;i++){
if( i==0 )
{
    document.write("<td width='"+mainTdWidth[i]+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+i+"')><a href='"+mainLayerLink[i]+"'>"+mainLayer[i]+ "</a></td>");
}
else if(i==4 )
{
   document.write("<td  align='center' width='"+mainTdWidth[i]+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+i+"') style='background-image: url(../images/index_02_02_2.jpg);' >"+mainLayer[i]+ "<a href='"+mainLayerLink[i]+"' style='color:#000000; font-size:12px;'>"+firstMenuData.value.Tables[0].Rows[i-1].name + "</a></div></td>");
}
else if(i==7)
{
   document.write("<td  align='center' width='"+mainTdWidth[i]+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+i+"') style='background-image: url(../images/index_02_02_2.jpg);' >"+mainLayer[i]+ "<a href='../about/about.aspx?typeId="+firstMenuData.value.Tables[0].Rows[i-1].parentId + "&id="+firstMenuData.value.Tables[0].Rows[i-1].nodeId+"' style='color:#000000; font-size:12px;'>"+firstMenuData.value.Tables[0].Rows[i-1].name + "</a></div></td>");
}
else
{
      if( i == mainLayer.length - 1)
      {
          document.write("<td  align='center' width='"+mainTdWidth[i]+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+i+"') style='background-image: url(../images/index_02_02_1.jpg);' >"+mainLayer[i]+ firstMenuData.value.Tables[0].Rows[i-1].name + "</div></td>");
      }
      else
      {
          document.write("<td  align='center' width='"+mainTdWidth[i]+"' bgcolor='"+mainTableTdBgcolor+"' class='"+hrefClassName+"' onmouseover=layervib('visible','"+i+"') style='background-image: url(../images/index_02_02_2.jpg);' >"+mainLayer[i]+ firstMenuData.value.Tables[0].Rows[i-1].name + "</div></td>");
      }
}
}
document.write("<td valign='top'>");

for(j=0;j<mainLayer.length;j++){
createSubLayer(j);

}
document.write("</div></table></td></tr></table>");
}
//--------------- 生成每项下拉菜单内容 ------------//
function createSubLayer(num){
var subLayerName= layerName +num;
//var subLayerLeft=(mainTableTdWidth*num)+mainTableCellpadding+mainTableBorder;
//var subLayerLeft=(mainTdWidth[num]*num)+mainTableCellpadding+mainTableBorder;
var subLayerLeft=layerleft[num]+mainTableCellpadding+mainTableBorder;

var subLayerList=eval("subLayer"+num);
var subLayerHttpList=eval("subLayerHttp"+num);
document.write("<div id='"+subLayerName+"' style='position:absolute; left:"+(subLayerLeft+sbuTabbleLeft)+"px; top:"+((mainTableBorder+mainTableCellspacing+mainTableCellpadding)*2+sbuTabbleTop)+"px; z-index:2; height: 24px; visibility: hidden' onmouseover=layervib('visible','"+num+"') onmouseout=layervib('visible','"+layerMax+"')>");
if(subLayerList.length!=0){
document.write("<table width='"+menutablewidth[num]+"' border='"+subTableBorder+"' cellspacing='"+subTableCellpadding+"' cellpadding='"+subTableCellpadding+"' bgcolor='"+subTableBgcolor+"' bordercolor='"+subTableBordercolor+"' background='"+subTableBackgroundImg+"'><tr><td bgcolor='"+subTableTdBgcolor+"'>") 
document.write("<table width='100%' border='0' align='center' cellpadding='0' cellspacing='5'>");
for(h=0;h<(subLayerList.length)-1;h++){ 

document.write("<tr width='100%' onMouseOver="+onMouseOverBgcolor+" onMouseOut="+onMouseOutBgcolor+"><td align='center' width='100%'>&nbsp;<a href='"+ subLayerHttpList [h]+"' class='menulan'>"+subLayerList[h]+"</a>&nbsp;</td></tr><tr><td height='1' background='/images/menul.gif'></td></tr>");
}
document.write("<tr width='100%' onMouseOver="+onMouseOverBgcolor+" onMouseOut="+onMouseOutBgcolor+"><td align='center' width='100%'>&nbsp;<a href='"+ subLayerHttpList [(subLayerList.length)-1]+"' class='menulan'>"+subLayerList[(subLayerList.length)-1]+"</a>&nbsp;</td></tr>");
document.write("</table></td></tr></table><table width='"+menutablewidth[num]+"' border='0' cellspacing='0' cellpadding='0'><tr><td background='/images/menuyy.gif' height='2'></td></tr></table>");
}
document.write("</div>"); 



}
//------------------------------次菜单显隐控制--------------------------//
function layervib(type,num){
var H=type;
var temp=(H='visible'?'hidden':'visible')
for(var i=0;i<mainLayer.length;i++){
//var E=eval('document.all.index'+i+'.style');
var E=eval('document.getElementById("index'+i+'").style');
var H=eval(i);
    if(i==num)
    {
        E.visibility=type;
    }
    else
    {
        E.visibility=temp;
    }
}
//if(document.all.Select_SecondMenu)
//{
//        var K = eval('document.all.Select_SecondMenu.style');
//        if(num == 6 || num == 7)
//        {
//            K.display = 'none';
//        }
//        else
//        {
//           K.display = '';
//        }
//}
}


//----------------------传给下属页面---------------//
var cur_top = 7;
var cur_no = 0;
function Tshow_fn(vv){
		cur_no = vv;
		cur_top = -(23*vv)+5;
}


//------------------------显示栏目信息--------------------------//

var nodeId_tag; 
var id_tag;
var timers;
var speed = 3;
var readerID = '1';
var condition;
    //获得栏目内容
    function getNodeContent(nodeId,startIndex)
    {
//                           clearTimeout(timers);
            if(document.uniqueID)
            {
                document.getElementById("pageState").style.cssText = "display:none;";   
            }
            else
            {
                document.getElementById("pageState").setAttribute("style","display:none;");
            }

var totalCount;
    if(nodeId != 75 && nodeId !=76) //75为测绘管理 76为测绘学会
    {
        if(id_tag)
        {
            if(document.uniqueID)
            {
                document.getElementById(id_tag).style.cssText = "color:#000000;height: 20px;width:100%;background-image: url(../images/about1/0904_06.jpg);background-repeat: no-repeat;";   
            }
            else
            {
                 document.getElementById(id_tag).setAttribute("style","color:#000000;height: 20px;width:100%;background-image: url(../images/about1/0904_06.jpg);background-repeat: no-repeat;");
            }

//            document.getElementById(id_tag).style.color = "#ffffff";
        }
        id_tag = "row"+nodeId;
        if(document.uniqueID)
        {
            document.getElementById(id_tag).style.cssText = "color:#fe9b00;height: 20px;width:100%;background-image: url(../images/about1/0904_07.jpg);background-repeat: no-repeat;";   
        }
        else
        {
            document.getElementById(id_tag).setAttribute("style","color:#fe9b00;height: 20px;width:100%;background-image: url(../images/about1/0904_07.jpg);background-repeat: no-repeat;");
        }
        }

//        document.getElementById(id_tag).style.color = "#ffff00";

//           timers = setTimeout("changeColor()", 100);
        
       if(document.getElementById("content").hasChildNodes())
       {
           var a = document.getElementById("content").childNodes.length;
           for(var i=0;i<a;i++)
           {
               document.getElementById("content").removeChild(document.getElementById("content").childNodes[0]);
           }

       } 
//        content.innerHTML="";
        getNavigation(nodeId);
        var typeId = AjaxClass.GetShowTypeId(nodeId);
        var pageRow = 20;
        var pager = startIndex * pageRow;
        var table=null,tbody=null,row=null,cell=null,img=null,a=null,iframe=null,div=null,table1=null,tbody1=null,row1=null,cell1=null;
        if(document.uniqueID)
        {
            document.getElementById("content").style.cssText = "text-align:center;";   
        }
        else
        {
            document.getElementById("content").setAttribute("style","text-align:center;");
        }        
        if(typeId.value == '2')
        {
//            pageState.style.display = 'none';
//            if(document.uniqueID)
//            {
//                document.getElementById("pageState").style.cssText = "display:none;";   
//            }
//            else
//            {
//                document.getElementById("pageState").setAttribute("style","display:none;");
//            }
            var data = AjaxClass.GetContent_Special(nodeId,readerID);
//            content.innerHTML = data.value.Tables[0].Rows[0].content;
//            document.getElementById("content").appendChild(document.createTextNode(data.value.Tables[0].Rows[0].content));
            if(document.uniqueID)
            {
                document.getElementById("content").style.cssText = "text-align:left;";   
            }
            else
            {
                document.getElementById("content").setAttribute("style","text-align:left;");
            } 
            if(data.value.Tables[0].Rows.length > 0)
            {
              document.getElementById("content").innerHTML = data.value.Tables[0].Rows[0].content;
            }
        }
        else if(typeId.value == '1')
        {
//            pageState.style.display = '';
            if(document.uniqueID)
            {
                document.getElementById("pageState").style.cssText = "display:;";   
            }
            else
            {
                document.getElementById("pageState").setAttribute("style","display:;");
            }
            nodeId_tag = nodeId;
            var data = AjaxClass.GetContent(nodeId,pager,pageRow,totalCount,readerID);
//            var str = "<table  width='100%'>";
//            for(var i=0;i<data.value.Tables[0].Rows.length;i++)
//            {
//                  var datetime = data.value.Tables[0].Rows[i].setDatetime.toLocaleString();
//                  str = str + "<tr><td style='width:10px;'><img src='../images/but3.jpg' style ='vertical-align:middle'></td><td style='width:500px;'><a href='../read/ReadInfo.aspx?id=" + data.value.Tables[0].Rows[i].id + "' target='_blank' style='font-size:13px;' title='" + data.value.Tables[0].Rows[i].title + "'>" + data.value.Tables[0].Rows[i].title + "</a>" + calculateDay(datetime) + "</td><td  style='width:100px;'>"+getDateTime(datetime)+"</td></tr>"

//            }
//            str = str + "</table>";
//            content.innerHTML = str; 
            if(data.value.Tables[0].Rows.length > 0)
            {

                table = document.createElement("table");
                 table.setAttribute("style","width:650px;");
                tbody = document.createElement("tbody");
                for(var i=0;i<data.value.Tables[0].Rows.length;i++)
                {
                    var datetime = data.value.Tables[0].Rows[i].setDatetime.toLocaleString();
                    row = document.createElement("tr");
                    //行交替变色
                    if(i%2==0)
                    {
                        if(document.uniqueID)
                        {
                            row.style.cssText = "height:25px;";
                            row.setAttribute("className","tableCaseB");
                        }
                        else
                        {
                            row.setAttribute("style","height:25px;");
                            row.setAttribute("class","tableCaseB");
                        }
                    }
                    else
                    {
                     if(document.uniqueID)
                    {
                        row.style.cssText = "height:25px;";
                        row.setAttribute("className","tableCaseT");
                    }
                    else
                    {
                        row.setAttribute("style","height:25px;");
                        row.setAttribute("class","tableCaseT");
                    }
                    }
                    
                    //设置第一个单元格
                    cell = document.createElement("td");
                    if(document.uniqueID)
                    {
                        cell.style.cssText = "width:10px;";
                    }
                    else
                    {
                        cell.setAttribute("style","width:10px;");
                    }
                    img = document.createElement("img");
                    img.setAttribute("src","../images/but3.jpg");
                    if(document.uniqueID)
                    {
                        img.style.cssText = "vertical-align:middle;";
                    }
                    else
                    {
                        img.setAttribute("style","vertical-align:middle;");
                    }
                    cell.appendChild(img);
                    row.appendChild(cell);
                    //设置第二个单元格
                    cell = document.createElement("td");
                    if(document.uniqueID)
                    {
                        cell.style.cssText = "width:593px;";
                    }
                    else
                    {
                        cell.setAttribute("style","width:593px;");
                    }
                    cell.setAttribute("align","left");
                    a = document.createElement("a");
                    a.setAttribute("href","../read/ReadInfo.aspx?id="+data.value.Tables[0].Rows[i].id);
                    a.setAttribute("target","_blank");
                    a.setAttribute("title",data.value.Tables[0].Rows[i].title);
                    if(data.value.Tables[0].Rows[i].nodeId == 25 || data.value.Tables[0].Rows[i].nodeId == 26 || data.value.Tables[0].Rows[i].nodeId == 27 || data.value.Tables[0].Rows[i].nodeId == 28)
                    {
                        if(data.value.Tables[0].Rows[i].RSS == 0)
                        {
                            a.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].title+"（已结束）")); 
                        }  
                        else
                        {
                            a.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].title));   
                        }
                    }
                    else
                    {
                        a.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].title));   
                    }            
                    cell.appendChild(a);
                    if(calculateDay(datetime))
                    {                       
                 
                        img = document.createElement("img");
                        img.setAttribute("src","../images/new.gif");                   
                        cell.appendChild(img);
                    }
                    row.appendChild(cell);
                    //设置第三个单元格
                    if(data.value.Tables[0].Rows[i].nodeId != 26 && data.value.Tables[0].Rows[i].nodeId != 27)
                    {
                        cell = document.createElement("td");
                        cell.appendChild(document.createTextNode(getDateTime(datetime)));
                        row.appendChild(cell);
                    }
                    
                    tbody.appendChild(row);
                }
                table.appendChild(tbody);
                document.getElementById("content").appendChild(table);
            }
            var totalCount = AjaxClass.GetTotalCount(nodeId,startIndex,20,readerID);     
            getPage(totalCount.value,pageRow,startIndex);
        }
        else if(typeId.value == '3')
        {
//            pageState.style.display = 'none';
//            if(document.uniqueID)
//            {
//                document.getElementById("pageState").style.cssText = "display:none;";   
//            }
//            else
//            {
//                document.getElementById("pageState").setAttribute("style","display:none;");
//            }
            var data = AjaxClass.GetContent(nodeId,pager,pageRow,totalCount,readerID);
            
//            var str = "";
//            for(var i=0;i<data.value.Tables[0].Rows.length;i++)
//            {
//                if(data.value.Tables[0].Rows[i].UrlIsValidated == '1')
//                {
//                    str = "<iframe src='"+data.value.Tables[0].Rows[i].Url+"' width='700px' height='800px'></iframe>";
//                    break;
//                }  
//            }   
//            content.innerHTML = str; 
            var helpStr = "1、关于动迁、拆迁类的问题，如动迁范围、动迁时间、动迁费用等事宜非我局业务范围，因此对于此类问题，我们将不予以答复。<br>";
            helpStr += "2、关于《大连市城市建筑物间距及挡日照处理规定》具体内容，详见我局“法律法规”栏目。<br>";
            helpStr += "3、非大连四区（中山区、西岗区、沙河口区、甘井子区部分）内项目的审批、执法情况，请向相应的规划管理部门（如高新园区、甘井子区、开发区等等）咨询和投诉。<br>";
            helpStr += "4、我局与外县区规划管理部门为业务指导关系，非隶属，故相关区域的规划咨询和投诉请向当地规划管理部门或当地政府咨询、投诉。"; 
            table = document.createElement("table");
            table.setAttribute("width","600px");
            if(document.uniqueID)
            {
                table.style.cssText = "border-color: #9bc9df; border: 1px; border-style: dotted; border-collapse: separate; background-color: #dbedf5; margin-bottom:20px;";
            }
            else
            {
                table.setAttribute("style","border-color: #9bc9df; border: 1px; border-style: dotted; border-collapse: separate; background-color: #dbedf5; margin-bottom:20px;");
            }

            tbody = document.createElement("tbody");
            row = document.createElement("tr");
            cell = document.createElement("td");
            cell.setAttribute("align","left");
            if(document.uniqueID)
            {
                cell.style.cssText = "font-size: 12px; text-align: left; padding-left: 10px;";
            }
            else
            {
                cell.setAttribute("style","font-size: 12px; text-align: left; padding-left: 10px;");
            }
            img = document.createElement("img");
            img.setAttribute("src","../images/read/01564428.gif");
            cell.appendChild(img);
            cell.appendChild(document.createTextNode("使用说明"));
            row.appendChild(cell);
            tbody.appendChild(row);
            
            row = document.createElement("tr");
            cell = document.createElement("td");
            cell.setAttribute("align","left");
            if(document.uniqueID)
            {
                cell.style.cssText = "padding: 3px; background-color: #ffffff;";
            }
            else
            {
                cell.setAttribute("style","padding: 3px; background-color: #ffffff;");
            }
//            cell.appendChild(document.createTextNode(helpStr));
cell.innerHTML = helpStr;
            row.appendChild(cell);
            tbody.appendChild(row);
            table.appendChild(tbody);
            document.getElementById("content").appendChild(table); 
             
            if(data.value.Tables[0].Rows.length > 0)
            {
                for(var i=0;i<data.value.Tables[0].Rows.length;i++)
                {
                    if(data.value.Tables[0].Rows[i].UrlIsValidated == '1')
                    {
                        iframe = document.createElement("iframe");
                        iframe.setAttribute("src",data.value.Tables[0].Rows[i].Url);
                        iframe.setAttribute("width","700px");
                        iframe.setAttribute("height","850px");
                        iframe.setAttribute("frameBorder","0");
                        iframe.setAttribute("scrolling","no");

                        
                    }
                }
                document.getElementById("content").appendChild(iframe);  
            }          
            

                  
        }
        else if(typeId.value == '4')
        {
//            pageState.style.display = '';
            if(document.uniqueID)
            {
                document.getElementById("pageState").style.cssText = "display:;";   
            }
            else
            {
                document.getElementById("pageState").setAttribute("style","display:;");
            }
            nodeId_tag = nodeId;
            var data = AjaxClass.GetContent(nodeId,pager,pageRow,totalCount,readerID);
//             var str = "<table  width='100%'>";
            if(data.value.Tables[0].Rows.length > 0)
            {
                table = document.createElement("table");
                tbody = document.createElement("tbody");
                for(var i=0;i<data.value.Tables[0].Rows.length;i++)
                {
                    if(data.value.Tables[0].Rows[i].uploadIsValidated == '1')
                    {
                        var result = false;                                                     //判断针对用户
                        var readerList = data.value.Tables[0].Rows[i].readerList.split(',');    //
                        for(var j=0;j<readerList.length;j++)                                    //
                        {                                                                       //
                            if(readerList[j] == '1')                                            //
                            {                                                                   //
                                result = true;                                                  //
                                break;                                                          //
                            }                                                                   //
                        }                                                                       //
                        if(result)
                        {
                        
                            var datetime = data.value.Tables[0].Rows[i].setDatetime.toLocaleString();
    //                        str = str + "<tr><td style='width:10px;'><img src='../images/but3.jpg' style ='vertical-align:middle'></td><td style='width:500px;'><a href='../read/download.aspx?id=" + data.value.Tables[0].Rows[i].id + "' target='_blank' style='font-size:13px;' title='点击下载'>" + data.value.Tables[0].Rows[i].title + "</a>" + calculateDay(datetime) + "</td><td  style='width:100px;'>"+getDateTime(datetime)+"</td></tr>"
                            row = document.createElement("tr");
                            //行交替变色
                    if(i%2==0)
                    {
                        if(document.uniqueID)
                        {
                            row.style.cssText = "height:25px;";
                            row.setAttribute("className","tableCaseB");
                        }
                        else
                        {
                            row.setAttribute("style","height:25px;");
                            row.setAttribute("class","tableCaseB");
                        }
                    }
                    else
                {
                     if(document.uniqueID)
                    {
                        row.style.cssText = "height:25px;";
                        row.setAttribute("className","tableCaseT");
                    }
                    else
                    {
                        row.setAttribute("style","height:25px;");
                        row.setAttribute("class","tableCaseT");
                    }
                }
                            //设置第一个单元格
                            cell = document.createElement("td");
                            img = document.createElement("img");
                            img.setAttribute("src","../images/but3.jpg");
                            if(document.uniqueID)
                            {
                                img.style.cssText = "vertical-align:middle;";
                            }
                            else
                            {
                                img.setAttribute("style","vertical-align:middle;");
                            }
                            cell.appendChild(img);
                            row.appendChild(cell);
                            //设置第二个单元格
                            cell = document.createElement("td");
                            if(document.uniqueID)
                            {
                                cell.style.cssText = "width:593px;";
                            }
                            else
                            {
                                cell.setAttribute("style","width:593px;");
                            }
                             cell.setAttribute("align","left");

                            a = document.createElement("a");
                            a.setAttribute("href","../read/download.aspx?id="+data.value.Tables[0].Rows[i].id);
                            a.setAttribute("target","_blank");
                            a.setAttribute("title","点击下载");
                            a.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].title));               
                            cell.appendChild(a);
                            if(calculateDay(datetime))
                            {                       
                         
                                img = document.createElement("img");
                                img.setAttribute("src","../images/new.gif");                   
                                cell.appendChild(img);
                            }
                            row.appendChild(cell);
                            //设置第三个单元格
                            cell = document.createElement("td");
                            cell.appendChild(document.createTextNode(getDateTime(datetime)));
                            row.appendChild(cell);
                            
                            tbody.appendChild(row);
                       }
                   }
                }                
                table.appendChild(tbody);
                document.getElementById("content").appendChild(table);
            }
//            str = str + "</table>";
//                content.innerHTML = str;
                var totalCount = AjaxClass.GetTotalCount(nodeId,startIndex,20,readerID);     
                getPage(totalCount.value,pageRow,startIndex);

        }
        else if(typeId.value == '5')
        {
//            pageState.style.display = 'none';
//            if(document.uniqueID)
//            {
//                document.getElementById("pageState").style.cssText = "display:none;";   
//            }
//            else
//            {
//                document.getElementById("pageState").setAttribute("style","display:none;");
//            }

            var data = AjaxClass.GetContent(nodeId,pager,pageRow,totalCount,readerID);    
            if(data.value.Tables[0].Rows.length > 0)
            {
                table = document.createElement("table");
                tbody = document.createElement("tbody");  
                for(var i=0;i<data.value.Tables[0].Rows.length;i++)
                {
                    var num = i + 1;
                    row = document.createElement("tr");
                    row.setAttribute("id","organization" + num);
                    if(document.uniqueID)
                    {
                        row.style.cssText = "height:30px;";   
                    }
                    else
                    {
                        row.setAttribute("style","height:30px;");
                    }   
                                
                    cell = document.createElement("td");
                    img = document.createElement("img");
                    img.setAttribute("src","../images/but3.jpg");
                    if(document.uniqueID)
                    {
                        img.style.cssText = "vertical-align:middle;";   
                    }
                    else
                    {
                        img.setAttribute("style","vertical-align:middle;");
                    }  
                    cell.appendChild(img);
                    row.appendChild(cell);
                    
                    cell = document.createElement("td");
                    a = document.createElement("a");
                    if(document.uniqueID)
                    {
                        a.style.cssText = "cursor: hand; text-decoration: underline;";   
                    }
                    else
                    {
                        a.setAttribute("style","cursor: hand; text-decoration: underline;");
                    }  
                    a.onclick = new Function("organizationDetail("+data.value.Tables[0].Rows[i].id+","+num+")");
                    a.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].title));
                    cell.appendChild(a);
                    row.appendChild(cell);
                    
                    tbody.appendChild(row);                              
                }
                table.appendChild(tbody);
                document.getElementById("content").appendChild(table);
                
                div = document.createElement("div");
                  if(document.uniqueID)
            {
               div.style.cssText = "text-align:left;";   
            }
            else
            {
                div.setAttribute("style","text-align:left;");
            } 
                div.setAttribute("id","organizationDetail");
                document.getElementById("content").appendChild(div);
            }

//            var str = "<table align='center' cellpadding='0' cellspacing='0' border='0'  width='100%'>";
//            for(var i=0;i<data.value.Tables[0].Rows.length;i++)
//            {
//                var num = i + 1;
//                str = str + "<tr id='organization"+num+"' style='height:30px;'><td width='20px' align='center'><img src='../images/but3.jpg' style ='vertical-align:middle;'></td><td width='400px' align='left'><a style='cursor: hand; text-decoration: underline;' onclick='organizationDetail("+data.value.Tables[0].Rows[i].id+","+num+")'>"+data.value.Tables[0].Rows[i].title+"</a></td></tr>";
//            }
//            str = str + "</table><div id='organizationDetail'></div>";
//            content.innerHTML = str;
        }
        else if(typeId.value == '6')
        {
            var picture_pageRow = 20;
            var rowcount = 4;
            var picture_pager = startIndex * picture_pageRow;
//            pageState.style.display = '';
            if(document.uniqueID)
            {
                document.getElementById("pageState").style.cssText = "display:;";   
            }
            else
            {
                document.getElementById("pageState").setAttribute("style","display:;");
            }

            var data = AjaxClass.GetContent(nodeId,picture_pager,picture_pageRow,totalCount,readerID);
            var count = Math.round(data.value.Tables[0].Rows.length/rowcount);
//            var count_remain = data.value.Tables[0].Rows.length%rowcount;
//            if(count_remain >0 )
//            {
//                count = count + 1;
//            }
            if(data.value.Tables[0].Rows.length > 0)
            {
                table = document.createElement("table");
                tbody = document.createElement("tbody");
                for(var j=0;j<count;j++)
                {
                    row = document.createElement("tr");
                    for(var i=1;i<=rowcount;i++)
                    {
                        var num = j * rowcount + i; 
                        if(num <= data.value.Tables[0].Rows.length)
                        {
                            var datetime = data.value.Tables[0].Rows[num-1].setDatetime.toLocaleString();
                            cell = document.createElement("td");
                            table1 = document.createElement("table");
                            tbody1 = document.createElement("tbody");
                            //设置第一行
                            row1 = document.createElement("tr");
                            cell1 = document.createElement("td");
                            a = document.createElement("a");
                            a.setAttribute("href","../../ManagementWeb" + data.value.Tables[0].Rows[num-1].contentAccessoryUrl);
                            a.setAttribute("target","_blank");
                            a.setAttribute("title","点击查看原图！");
                            img = document.createElement("img");
                            img.setAttribute("src","../../ManagementWeb" + data.value.Tables[0].Rows[num-1].contentAccessoryUrl);
                            img.setAttribute("border","0");
                            if(document.uniqueID)
                            {
                                img.style.cssText = "width:150px; height:100px; vertical-align:middle; cursor: hand;";   
                            }
                            else
                            {
                                img.setAttribute("style","width:150px; height:100px; vertical-align:middle; cursor: hand;");
                            }
                            a.appendChild(img);
                            cell1.appendChild(a);
                            row1.appendChild(cell1);
                            tbody1.appendChild(row1);
                            //设置第二行                        
                            row1 = document.createElement("tr");
                            cell1 = document.createElement("td");
                            cell1.setAttribute("align","center");
                            cell1.appendChild(document.createTextNode(data.value.Tables[0].Rows[num-1].title));
                            row1.appendChild(cell1);
                            tbody1.appendChild(row1);
                            //设置第三行
                            row1 = document.createElement("tr");
                            cell1 = document.createElement("td");
                            cell1.setAttribute("align","center");
                            cell1.appendChild(document.createTextNode(getDateTime(datetime)));
                            row1.appendChild(cell1);
                            tbody1.appendChild(row1);   
                            
                            table1.appendChild(tbody1);  
                            cell.appendChild(table1);                   
                        }
                        row.appendChild(cell);
                    }
                    tbody.appendChild(row);

                }
                table.appendChild(tbody);
                document.getElementById("content").appendChild(table);
            }

//            var str = "<table width='100%'>";  
//            for(var j=0;j<count;j++)
//            {
//                str = str + "<tr>";
//                for(var i=1;i<=rowcount;i++)
//                {
//                    var num = j * rowcount + i; 
//                    if(num <= data.value.Tables[0].Rows.length)
//                    {
//                        var datetime = data.value.Tables[0].Rows[num-1].setDatetime.toLocaleString();
//                        str = str + "<td><table><tr><td ><a href='../../ManagementWeb"+data.value.Tables[0].Rows[num-1].contentAccessoryUrl+"' target='_blank'><img width='150px;' height='100px;' src='../../ManagementWeb"+data.value.Tables[0].Rows[num-1].contentAccessoryUrl+"' style ='vertical-align:middle; cursor: hand;'></a></td></tr><tr><td align='center'>"+data.value.Tables[0].Rows[num-1].title+"</td></tr><tr><td align='center'>"+getDateTime(datetime)+"</td></tr></table></td>"
//                    }
//                }
//                str = str + "</tr>";
//            }     
//            str = str + "</table>";    
//            content.innerHTML = str; 
            totalCount = AjaxClass.GetTotalCount(nodeId,startIndex,20,readerID);     
            getPage(totalCount.value,picture_pageRow,startIndex);
        }
        else if(typeId.value == '7')
        {
            var conditionUrl;
//            if(document.uniqueID)
//            {
//                document.getElementById("pageState").style.cssText = "display:none;";   
//            }
//            else
//            {
//                document.getElementById("pageState").setAttribute("style","display:none;");
//            }
            iframe = document.createElement("iframe");
            if(condition)
            {
                var str = condition.split('_');
                conditionUrl = "../search/AuditingResult.aspx?type="+str[0]+"&condition="+str[1];
            }
            else
            {
                conditionUrl = "../search/AuditingResult.aspx";
            }
//            if(document.uniqueID)
//            {
//                iframe.style.cssText = "border-right: white 0px solid; border-top: white 0px solid; border-left: white 0px solid; border-bottom: white 0px solid;";   
//            }
//            else
//            {
//                iframe.setAttribute("style","border-right: white 0px solid; border-top: white 0px solid; border-left: white 0px solid; border-bottom: white 0px solid;");
//            }
            iframe.setAttribute("src",conditionUrl);
            iframe.setAttribute("width","700px");
            iframe.setAttribute("height","800px");
            iframe.setAttribute("frameBorder","0");
	    if(nodeId != 30)
            {
            iframe.setAttribute("scrolling","no");
	    }
//            iframe.setAttribute("allowTransparency","true");
            document.getElementById("content").appendChild(iframe);  
        }
        else if(typeId.value == '8')
        {
//            if(document.uniqueID)
//            {
//                document.getElementById("pageState").style.cssText = "display:none;";   
//            }
//            else
//            {
//                document.getElementById("pageState").setAttribute("style","display:none;");
//            }
            var inquirydata = AjaxClass.GetAllInquiry_Pre(readerID);
            if(inquirydata.value)
            {
                for(var j=0;j<inquirydata.value.Tables[0].Rows.length;j++)
                {
                    table = document.createElement("table");
                    table.setAttribute("width","300px");
                    table.setAttribute("align","center");
                    table.setAttribute("cellPadding","0");
                    table.setAttribute("cellSpacing","0");
                    if(document.uniqueID)//IE浏览器
                    {
                        table.setAttribute("cellPadding","0");
                        table.setAttribute("cellSpacing","0");
                    }
                    else//其他浏览器
                    {
                        table.setAttribute("cellpadding","0");
                        table.setAttribute("cellspacing","0");
                    }  
                    
                    if(document.uniqueID)//IE浏览器
                    {
                        if(j == 0)
                        {
                            table.style.cssText = " border-right: #a9d3f3 1px solid; border-top: #a9d3f3 1px solid; border-left: #a9d3f3 1px solid; border-bottom: #a9d3f3 1px solid;";
                        }
                        else
                        {
                            table.style.cssText = " margin-top:20px; border-right: #a9d3f3 1px solid; border-top: #a9d3f3 1px solid; border-left: #a9d3f3 1px solid; border-bottom: #a9d3f3 1px solid;";
                        }
                    }
                    else//其他浏览器
                    {
                       if(j == 0)
                       {
                           table.setAttribute("style"," border-right: #a9d3f3 1px solid; border-top: #a9d3f3 1px solid; border-left: #a9d3f3 1px solid; border-bottom: #a9d3f3 1px solid;");
                       }
                       else
                       {
                           table.setAttribute("style"," margin-top:20px; border-right: #a9d3f3 1px solid; border-top: #a9d3f3 1px solid; border-left: #a9d3f3 1px solid; border-bottom: #a9d3f3 1px solid;");
                       }
                    }  

                    tbody = document.createElement("tbody");
                    //设置第一行
                    row = document.createElement("tr");
                    if(document.uniqueID)//IE浏览器
                    {
                        row.style.cssText = "height:30px;background-color:#f7fbff;";
                    }
                    else//其他浏览器
                    {
                       row.setAttribute("style","height:30px;background-color:#f7fbff;");
                    }  
                    cell = document.createElement("td");
                    cell.appendChild(document.createTextNode(inquirydata.value.Tables[0].Rows[j].question));
                    if(document.uniqueID)//IE浏览器
                    {
                        cell.setAttribute("colSpan", '2');
                    }
                    else//其他浏览器
                    {
                        cell.setAttribute("colspan", '2');
                    }            
                    cell.setAttribute("align","left");
                    row.appendChild(cell); 
                    tbody.appendChild(row);
                    
                    var data = AjaxClass.GetInquiryContentByInquiryId_Pre(inquirydata.value.Tables[0].Rows[j].inquiryId);
                    //设置第二行
                    if( inquirydata.value.Tables[0].Rows[j].typeId == 1)
                    {
                        for(var i=0;i<data.value.Tables[0].Rows.length;i++)
                        {
                            row = document.createElement("tr");
                            if(document.uniqueID)//IE浏览器
                            {
                                row.style.cssText = "height:20px;";
                            }
                            else//其他浏览器
                            {
                               row.setAttribute("style","height:20px;");
                            }  
                            cell = document.createElement("td");
                            cell.setAttribute("align","right");
                            if(document.uniqueID)//IE浏览器
                            {
                                cell.style.cssText = "width:30px;";
                            }
                            else//其他浏览器
                            {
                               cell.setAttribute("style","width:30px;");
                            }  

                            if(document.uniqueID)//IE浏览器
                            {
                                control = document.createElement("<input id='Radioinquiry" + j+"_"+i + "' type='radio' value='" + data.value.Tables[0].Rows[i].contentId + "' onclick='radioButtonClick(" + j+","+i + ","+data.value.Tables[0].Rows.length+")'/>");
                            }
                            else
                            {                
                                control = document.createElement("input");
                                control.setAttribute("type","radio");
                                control.setAttribute("id","Radioinquiry"+j+i);
                                control.setAttribute("value",data.value.Tables[0].Rows[i].contentId);
                                control.onclick = new Function("radioButtonClick("+j+","+i+","+data.value.Tables[0].Rows.length+")");
                            }
                            cell.appendChild(control);
                            row.appendChild(cell);
                            
                            cell = document.createElement("td");
                            cell.setAttribute("align","left");
                            if(document.uniqueID)//IE浏览器
                            {
                                cell.style.cssText = "width:200px;";
                            }
                            else//其他浏览器
                            {
                               cell.setAttribute("style","width:200px;");
                            }  

                            cell.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].content));
                            row.appendChild(cell);
                            tbody.appendChild(row);
                        }
                    }
                    else
                    {
                        for(var i=0;i<data.value.Tables[0].Rows.length;i++)
                        {
                            row = document.createElement("tr");
                            if(document.uniqueID)//IE浏览器
                            {
                                row.style.cssText = "height:20px;";
                            }
                            else//其他浏览器
                            {
                               row.setAttribute("style","height:20px;");
                            }  
                            cell = document.createElement("td");
                            cell.setAttribute("align","right");
                            if(document.uniqueID)//IE浏览器
                            {
                                cell.style.cssText = "width:30px;";
                            }
                            else//其他浏览器
                            {
                               cell.setAttribute("style","width:30px;");
                            }  

                            control = document.createElement("input");
                            control.setAttribute("type","checkbox");
                            control.setAttribute("id","Checkbox"+j+"_"+i);
                            control.setAttribute("value",data.value.Tables[0].Rows[i].contentId);
//                            control.onclick = new Function("CheckboxClick("+j+i+")");
                            cell.appendChild(control);
                            row.appendChild(cell);
                            
                            cell = document.createElement("td");
                            cell.setAttribute("align","left");
                            if(document.uniqueID)//IE浏览器
                            {
                                cell.style.cssText = "width:200px;";
                            }
                            else//其他浏览器
                            {
                               cell.setAttribute("style","width:200px;");
                            }  

                            cell.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].content));
                            row.appendChild(cell);
                            tbody.appendChild(row);
                        }
                    }
                    //设置第三行
                    row = document.createElement("tr");
                    if(document.uniqueID)//IE浏览器
                    {
                        row.style.cssText = "height:50px;";
                    }
                    else//其他浏览器
                    {
                        row.setAttribute("style","height:50px;");
                    }
                    cell = document.createElement("td");
                    if(document.uniqueID)//IE浏览器
                    {
                        cell.setAttribute("colSpan","2");
                    }
                    else//其他浏览器
                    {
                        cell.setAttribute("colspan","2");
                    }
                    cell.setAttribute("align","center");
                    control = document.createElement("input");
                    control.setAttribute("type","button");
                    control .setAttribute("id","Button_Vote"+j);
                    control .setAttribute("value","投 票");
                    control.onclick = new Function("vote("+inquirydata.value.Tables[0].Rows[j].inquiryId+","+inquirydata.value.Tables[0].Rows[j].typeId+","+j+","+data.value.Tables[0].Rows.length+")");
                    if(document.uniqueID)//IE浏览器
                    {
                        control.style.cssText = "width:50px;";
                    }
                    else//其他浏览器
                    {
                        control.setAttribute("style","width:50px;");
                    }
                    cell.appendChild(control);
                    cell.appendChild(document.createTextNode("     "));
                    control = document.createElement("input");
                    control.setAttribute("type","button");
                    control .setAttribute("id","Button_Result"+j);
                    control .setAttribute("value","查 看");
                    control.onclick = new Function("result("+inquirydata.value.Tables[0].Rows[j].inquiryId+")"); 
                    if(document.uniqueID)//IE浏览器
                    {
                        control.style.cssText = "width:50px;";
                    }
                    else//其他浏览器
                    {
                        control.setAttribute("style","width:50px;");
                    }
                    cell.appendChild(control);        
                    row.appendChild(cell);
                    tbody.appendChild(row);
                    table.appendChild(tbody);
                    document.getElementById("content").appendChild(table);  
                }
            }
        }
        else if(typeId.value == '9')
        {
            var programmedata =  AjaxClass.GetMenu(nodeId);
            if(programmedata.value)
            {
                table = document.createElement("table");
                tbody = document.createElement("tbody");                      
                    row = document.createElement("tr");
                    if(document.uniqueID)
                    {
                        row.style.cssText = "height:30px;";   
                    }
                    else
                    {
                        row.setAttribute("style","height:30px;");
                    }   
                  
                for(var i=0;i<programmedata.value.Tables[0].Rows.length;i++)
                {
                    var num = i + 1;
//                    row.setAttribute("id","programmeShow" + num);
                    cell = document.createElement("td");
                    if(document.uniqueID)//IE浏览器
                    {
                        cell.style.cssText = "width:10px;";
                    }
                    else//其他浏览器
                    {
                       cell.setAttribute("style","width:10px;");
                    }  

                    img = document.createElement("img");
                    img.setAttribute("src","../images/but3.jpg");
                    if(document.uniqueID)
                    {
                        img.style.cssText = "vertical-align:middle;";   
                    }
                    else
                    {
                        img.setAttribute("style","vertical-align:middle;");
                    }  
                    cell.appendChild(img);
                    row.appendChild(cell);
                    
                    cell = document.createElement("td");
                    cell.setAttribute("id","programmeShow" + num);
                    cell.setAttribute("align","left");
                    if(document.uniqueID)//IE浏览器
                    {
                        if( i == 0 || i == 1)
                        {
                            cell.style.cssText = "width:60px;";
                        }
                        else
                        {
                            cell.style.cssText = "width:90px;";
                        }
                    }
                    else//其他浏览器
                    {
                       if(i ==0 || i ==1)
                       {
                           cell.setAttribute("style","width:60px;");
                       }
                       else
                       {
                           cell.setAttribute("style","width:90px;");
                       }
                    }  

                    a = document.createElement("a");
                    if(document.uniqueID)
                    {
                        a.style.cssText = "cursor: hand;";   
                    }
                    else
                    {
                        a.setAttribute("style","cursor: hand;");
                    }  
                    a.onclick = new Function("getProgrammeShow("+programmedata.value.Tables[0].Rows[i].nodeId+","+startIndex+","+num+")");
                    a.appendChild(document.createTextNode(programmedata.value.Tables[0].Rows[i].name));
                    cell.appendChild(a);
                    row.appendChild(cell);
                    
                }
                    tbody.appendChild(row);
                table.appendChild(tbody);
                document.getElementById("content").appendChild(table);  
                
                div = document.createElement("div");
                div.setAttribute("id","programmeShow");
                document.getElementById("content").appendChild(div);

            }
        }


    }
    //初始化界面
    function init()
    {
          var nodeId,typeId;
          var url = window.location.href;
          var conditionIndex = url.indexOf('condition');
          if(conditionIndex == -1)
          {
              var index = url.indexOf('id');
              if(index == -1)
              {
                  typeId = url.substring(url.lastIndexOf('typeId')+7,url.length);
                  switch(typeId)
                  {
                      case"5":
                          nodeId = 6;
                      break;
                      case"14":
                          nodeId = 15;
                      break;
                      case"19":
                          nodeId = 20;
                      break;
                      case"4":
                      break;
                      case"24":
                          nodeId = 25;
                      break;
                      case"29":
                          nodeId = 30;
                      break;
                      case"35":
                          nodeId = 36;
                      break;
                      case"38":
                          nodeId = 39;
                      break;
                      case"41":
                          nodeId = 42;
                      break;
                  }
              }
              else          
              {
                  var a = url.length - url.lastIndexOf('=');
                  nodeId = url.substring(url.lastIndexOf('=')+1,url.lastIndexOf('=')+a);
                  nodeId_tag = nodeId;
                  typeId = url.substring(url.indexOf('=')+1,url.indexOf('&'));
              }
          }
          else
          {
               typeId = url.substring(url.indexOf('=')+1,url.indexOf('&'));
               nodeId = url.substring(url.indexOf('id')+3,url.lastIndexOf('&'));
               condition = url.substring(url.lastIndexOf('=')+1,url.length);
               if(!document.uniqueID)
               {
                  condition = decodeURI(condition);
               }

          }
          
          getMenu(typeId);
          getNodeContent(nodeId,0);
   }
    //获得导航条
    function getNavigation(nodeId)
    {
        var str;
        
        var data = AjaxClass.GetModuleByNodeId(nodeId);
        document.title = data.value.Tables[0].Rows[0].name;
        document.getElementById('menuTitle').innerHTML = data.value.Tables[0].Rows[0].name;
        if(nodeId != 75 && nodeId != 76)
        {
            document.title = data.value.Tables[0].Rows[0].name;
            document.getElementById('menuTitle').innerHTML = data.value.Tables[0].Rows[0].name;
            str = '当前位置：'+ "<a href='../index/index.aspx' style='color:blue;font-size:13px;'>首页</a>" + " → " + data.value.Tables[0].Rows[0].name + ' → ' + data.value.Tables[0].Rows[1].name;
        }
        else
        {
            document.title = data.value.Tables[0].Rows[1].name;
            document.getElementById('menuTitle').innerHTML = data.value.Tables[0].Rows[1].name;
            str = '当前位置：'+ "<a href='../index/index.aspx' style='color:blue;font-size:13px;'>首页</a>" + " → "  + data.value.Tables[0].Rows[1].name;
        }
        if(document.getElementById("Navigation").hasChildNodes())
        {
           var a = document.getElementById("Navigation").childNodes.length;
           for(var i=0;i<a;i++)
           {
               document.getElementById("Navigation").removeChild(document.getElementById("Navigation").childNodes[0]);
           }

        } 

        document.getElementById('Navigation').innerHTML = str;
//        document.getElementById('Navigation').appendChild(document.createTextNode(str));
    }
    //显示分页状态
    function getPage(totalCount,pageRow,startIndex)
    {
        document.getElementById('First').disabled = false;
        document.getElementById('Pre').disabled = false;
        document.getElementById('Next').disabled = false;
        document.getElementById('Last').disabled = false;
        document.getElementById('GoTo').disabled = false;
        document.getElementById('Page_GoTo').disabled = false;

        var pageCount;
        var result =  totalCount/pageRow;
        if(result == 0)
        {
            pageCount = 0;
        }
        else
        {
            if(totalCount%pageRow == 0)
            {
                pageCount = parseInt(result);
            }
            else
            {
                pageCount = parseInt(result) + 1;
            }
        }
        document.getElementById('totalCount').innerHTML = totalCount;
        document.getElementById('pageRow').innerHTML = pageRow;
        document.getElementById('pageCount').innerHTML = pageCount;
        document.getElementById('currentPage').innerHTML = startIndex+1;
        if(pageCount == 0)
        {
            document.getElementById('First').disabled = true;
            document.getElementById('Pre').disabled = true;
            document.getElementById('Next').disabled = true;
            document.getElementById('Last').disabled = true;
            document.getElementById('GoTo').disabled = true;
            document.getElementById('Page_GoTo').disabled = true;
            document.getElementById('currentPage').innerText = 0;
        }
        else if (pageCount == 1)
        {
            document.getElementById('First').disabled = true;
            document.getElementById('Pre').disabled = true;
            document.getElementById('Next').disabled = true;
            document.getElementById('Last').disabled = true;
            document.getElementById('GoTo').disabled = true;
            document.getElementById('Page_GoTo').disabled = true;
        }

        else
        {
            if(startIndex+1 == 1)
            {
                document.getElementById('First').disabled = true;
                document.getElementById('Pre').disabled = true;
//                document.getElementById('GoTo').style.visibility="hidden";
//                document.getElementById('Page_GoTo').style.visibility="hidden";
            }
//            else
//            {
//                document.getElementById('First').style.visibility="visible";
//                document.getElementById('Pre').style.visibility="visible";
//                document.getElementById('GoTo').style.visibility="visible";
//                document.getElementById('Page_GoTo').style.visibility="visible";
//            }
            
            if(startIndex+1 == pageCount)
            {
                document.getElementById('Next').disabled = true;
                document.getElementById('Last').disabled = true;
            }
//            else
//            {
//                document.getElementById('Next').style.visibility="visible";
//                document.getElementById('Last').style.visibility="visible";
//            }

        }
    }
    //翻页
    function turnPage(type)
    {
        var currentPage = parseInt(document.getElementById('currentPage').innerHTML) - 1;
        switch(type)
        {
            case"First":
                currentPage = 0;
            break;
            case"Pre":
                currentPage = currentPage - 1;
            break;
            case"Next":
                currentPage = currentPage + 1;
            break;
            case"Last":
                currentPage = parseInt(document.getElementById('pageCount').innerHTML) - 1;
            break;
            case"GoTo":
                currentPage = parseInt(document.getElementById('Page_GoTo').value) - 1;
            break;
        }
        if(currentPage <= parseInt(document.getElementById('pageCount').innerHTML) - 1)
        {
            getNodeContent(nodeId_tag,currentPage);
        }
        else
        {
            alert('输入页码超过范围！');
        }
    }
    // 获得二级栏目
    function getMenu(typeId)
    {
        if(typeId != 3)
        {
            var data = AjaxClass.GetMenu(typeId);
    //        table = document.createElement("table");
    //        for(var i=0;i<data.value.Tables[0].Rows.length;i++)
    //        {
    //            new_row = table.insertRow();
    //            new_row.insertCell(0).innerHTML = "<font style='font-size:17px;cursor: hand;' onclick='getNodeContent(" + data.value.Tables[0].Rows[i].nodeId  + ",0)'>" + data.value.Tables[0].Rows[i].name  + "</font>";
    //            new_row.height = '20';
    //            new_row.setAttribute("id","row"+data.value.Tables[0].Rows[i].nodeId);
    //        }
    //        Menu.appendChild(table); 
            var row = null, cell = null, div = null;
            for(var i=0;i<data.value.Tables[0].Rows.length;i++)
            {
                row = document.createElement("tr");
                row.setAttribute("id","row"+data.value.Tables[0].Rows[i].nodeId);
                if(document.uniqueID)
                {
                    row.style.cssText = "height: 20px;width:100%;background-image: url(../images/about1/0904_06.jpg);background-repeat: no-repeat;color:#000000;";   
                }
                else
                {
                    row.setAttribute("style","height: 20px;width:100%;background-image: url(../images/about1/0904_06.jpg);background-repeat: no-repeat;color:#000000;");
                }
                cell = document.createElement("td");
                cell.setAttribute("align","center");
                div = document.createElement("div");
                if(document.uniqueID)
                {
                    div.style.cssText = "cursor: hand; font-size:12px;";   
                }
                else
                {
                    div.setAttribute("style","cursor: default; font-size:12px;");
                }
                if(data.value.Tables[0].Rows[i].nodeId == "32") //网上申报
                {
                    div.onclick = new Function("getxzxk()");
                }
                //-------------------20090607 lmz-----------------------------------
                else if(data.value.Tables[0].Rows[i].nodeId == "12") //信息公开目录
                {
                    div.onclick = new Function("getxxgkml()");
                }
                else if(data.value.Tables[0].Rows[i].nodeId == "78") //信息公开指南
                {
                    div.onclick = new Function("getxxgkzn()");
                }
                //------------------------------------------------------------------
                else
                {
                    div.onclick = new Function("getNodeContent("+data.value.Tables[0].Rows[i].nodeId+",0)");
                }
                div.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].name));
                cell.appendChild(div);
                row.appendChild(cell);
                document.getElementById("Menu").appendChild(row);

            }
        }

    }
    //获得高级查询中的栏目名称
    function getSelect_SecondMenu()
    {
        var option = null;
        option = document.createElement("option");
        option.appendChild(document.createTextNode("******全部******"));
        option.setAttribute("value", "");
        document.getElementById("Select_SecondMenu").appendChild(option);
        for(var i=1;i<10;i++)
        {
            if( i== 2 || i== 3 || i== 5 || i== 7 || i== 8 )
            {
            var MENU = eval("subLayer"+i);
            var NODEID = eval("subLayerId"+i);
                for(var j=0;j<MENU.length;j++)
                {
                    
                        option = document.createElement("option");
                        option.appendChild(document.createTextNode(MENU[j]));
                        option.setAttribute("value", NODEID[j]);
                        document.getElementById("Select_SecondMenu").appendChild(option);
                   
                }
            }
        }

    }
function changeColor()

           {

                 var color,color_rg,c1,c2,color_b=null;
                 if(document.uniqueID)
                 {
                     color = document.getElementById(id_tag).style.color;
                     color_rg = color.slice(1, 5); 
                     color_b = parseInt(color.slice(5), 16) + speed;
                 }
                 else
                 {
                     color = document.getElementById(id_tag).getAttribute("style");
                     color = color.substring(color.indexOf("color")+6,color.indexOf(";"));
                     c1 = color.substring(color.lastIndexOf(",")+2,color.indexOf(")"));
                     c2 = color.substring(0,color.lastIndexOf(",")+1);
                     color_b = parseInt(c1) + speed;
                 }
                 // 当前背景色(rgb)的rg部分:如#123456的1234


                 // 当前背景色(rgb)的b部分:如#123456的56

                 // 并将b部分增加一个数值,转换为10进制整数(向白色靠近)


                 // 如果b部分不超过255

                 if (color_b < 256)

                 {


                       // 求b的16进制形式

    
                       // 设置新的背景色

//                       news.style.backgroundColor = "#" + color_rg + b1 + b2;
                     if(document.uniqueID)
                     {
                        var b1 = Math.floor((color_b / 16)).toString(16);

                        var b2 = (color_b % 16).toString(16);

                        document.getElementById(id_tag).style.color = "#" + color_rg + b1 + b2;
                     }
                     else
                     {
                         document.getElementById(id_tag).setAttribute("style","color:"+c2+color_b+");");
//                         if(b1 == '0')
//                         {
//                             document.getElementById(id_tag).setAttribute("style","color:"+c2+b2+");");
//                         }
//                         else
//                         {
//                             document.getElementById(id_tag).setAttribute("style","color:"+c2+b1+b2+");");
//                         }
                     }
//                        alert(document.getElementById(id_tag).getAttribute("style"));

                       timers = setTimeout("changeColor()", 100);

                 }

                 else //背景色已经是白色

                 {

                       // 停止计时器
                       clearTimeout(timers);

                 }

           }
           //下属各机构的详细信息
           function organizationDetail(organizationId,rowID)
           {
               var a = document.getElementById("content").getElementsByTagName('tr');
               for(var i=0;i<a.length;i++)
               {
                   if(a[i].id != 'organization'+rowID)
                   {
                       a[i].style.color = '#000000';
                   }
                   else
                   {
                       a[i].style.color = 'blue';
                   }
               }
               var data = AjaxClass.GetContentById_Pre(organizationId);
               document.getElementById('organizationDetail').innerHTML = data.value.Tables[0].Rows[0].content;
           }
   //日期格式
   function getDateTime(datetime)
   {
       var y,m,d;
       y = datetime.substring(0,datetime.indexOf('年'));
       m = datetime.substring(datetime.indexOf('年')+1,datetime.indexOf('月')).toString('00');
       d = datetime.substring(datetime.indexOf('月')+1,datetime.indexOf('日')).toString('00');
       
       if( m.length < 2)
       {
           m = '0' + m;
       }
       if(d.length < 2)
       {
           d = '0' + d;
       }
       
       return y + '-' + m + '-' + d;

   }
   //计算时间
   function calculateDay(datetime)
   {
       var y,m,d,str;
       var nowTime = new Date();
       y = datetime.substring(0,datetime.indexOf('年'));
       m = datetime.substring(datetime.indexOf('年')+1,datetime.indexOf('月'));
       d = datetime.substring(datetime.indexOf('月')+1,datetime.indexOf('日'));
       var setTime,count;
       if(document.uniqueID)
       {
           setTime = m + '-' + d + '-' + y + datetime.substring(datetime.indexOf(' '),datetime.length);
           count = (nowTime.getTime() - Date.parse(setTime))/86400000;
       }
       else
       {
           setTime = y + '/'+ m + '/' + d + datetime.substring(datetime.indexOf(' '),datetime.length);
           count = (nowTime.getTime() - new Date(setTime).getTime())/86400000;
       }
       if(count < 3)
       {
           str = true;//"<img src='../images/new.gif'>";
       }
       else
       {
           str = false;//"";
       }
       return str;

   }
   
   
//显示查询结果
function getSearchResult(condition1,condition2)
{
    var table=null,tbody=null,row=null,cell=null,a=null,div=null;
    var resultpageRow = 5;
    var tag = startIndex * resultpageRow;
    data = AjaxClass.GetAuditingResult_Pre(condition1,condition2,tag,resultpageRow);
    if(data.value != null)
    {
        if(data.value.Tables[0].Rows.length > 0)
        {
            table = document.createElement("table");
            if(document.uniqueID)
            {
                table.setAttribute("cellPadding","0");
            }
            else
            {
                 table.setAttribute("cellpadding","0");
            }
            if(document.uniqueID)
            {
                table.setAttribute("cellSpacing","0");
            }
            else
            {
                table.setAttribute("cellspacing","0");
            }
            table.setAttribute("border",0);
            if(document.uniqueID)
            {
                table.style.cssText = "font-size:13px; margin-top:10px;";
            }
            else
            {
                table.setAttribute("style","font-size:13px; margin-top:10px;");
            }
            tbody = document.createElement("tbody");
            row = document.createElement("tr");
            row.setAttribute("id","title");
            if(document.uniqueID)
            {
                row.style.cssText = "height:30px;background-color:#A7E6C3;";
            }
            else
            {
                row.setAttribute("style","height:30px;background-color:#A7E6C3;");
            }
            
            cell = document.createElement("td");
            if(document.uniqueID)
            {
                cell.style.cssText = "border:solid 1px black; font-weight:bold;";
            }
            else
            {
                cell.setAttribute("style","border:solid 1px black; font-weight:bold;");
            }
            cell.setAttribute("align","center");
            cell.appendChild(document.createTextNode("序号"));
            row.appendChild(cell);
            
            cell = document.createElement("td");
            if(document.uniqueID)
            {
                cell.style.cssText = "border:solid 1px black; font-weight:bold;";
            }
            else
            {
                cell.setAttribute("style","border:solid 1px black; font-weight:bold;");
            }
            cell.setAttribute("align","center");
            cell.appendChild(document.createTextNode("项目名称"));
            row.appendChild(cell);
            
            cell = document.createElement("td");
            if(document.uniqueID)
            {
                cell.style.cssText = "border:solid 1px black; font-weight:bold;";
            }
            else
            {
                cell.setAttribute("style","border:solid 1px black; font-weight:bold;");
            }
            cell.setAttribute("align","center");
            cell.appendChild(document.createTextNode("业务类型"));
            row.appendChild(cell);
            
            cell = document.createElement("td");
            if(document.uniqueID)
            {
                cell.style.cssText = "border:solid 1px black; font-weight:bold;";
            }
            else
            {
                cell.setAttribute("style","border:solid 1px black; font-weight:bold;");
            }
            cell.setAttribute("align","center");
            cell.appendChild(document.createTextNode("申请时间"));
            row.appendChild(cell);
            
            cell = document.createElement("td");
            if(document.uniqueID)
            {
                cell.style.cssText = "border:solid 1px black; font-weight:bold;";
            }
            else
            {
                cell.setAttribute("style","border:solid 1px black; font-weight:bold;");
            }
            cell.setAttribute("align","center");
            cell.appendChild(document.createTextNode("操作"));
            row.appendChild(cell);
            tbody.appendChild(row);
            for(var i=0;i<data.value.Tables[0].Rows.length;i++)
            {
                tag = tag + 1;
                row = document.createElement("tr");
                row.setAttribute("id","row"+tag);
                if(document.uniqueID)
                {
                    row.style.cssText = "height:30px;";
                }
                else
                {
                    row.setAttribute("style","height:30px;");
                }
                //设置第一个单元格
                cell = document.createElement("td");
                if(document.uniqueID)
                {
                    cell.style.cssText = "width:50px;border:solid 1px black;";
                }
                else
                {
                    cell.setAttribute("style","width:50px;border:solid 1px black;");
                }
                cell.setAttribute("align","center");
                cell.appendChild(document.createTextNode(tag));
                row.appendChild(cell);
                //设置第二个单元格
                cell = document.createElement("td");
                if(document.uniqueID)
                {
                    cell.style.cssText = "width:300px;border:solid 1px black;";
                }
                else
                {
                    cell.setAttribute("style","width:300px;border:solid 1px black;");
                }
                cell.setAttribute("align","center");
                cell.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].ProjectName));
                row.appendChild(cell);              
                //设置第三个单元格
                cell = document.createElement("td");
                if(document.uniqueID)
                {
                    cell.style.cssText = "width:250px;border:solid 1px black;";
                }
                else
                {
                    cell.setAttribute("style","width:250px;border:solid 1px black;");
                }
                cell.setAttribute("align","center");
                cell.appendChild(document.createTextNode(data.value.Tables[0].Rows[i].INSHEETNAME));
                row.appendChild(cell);
                //设置第四个单元格
                cell = document.createElement("td");
                if(document.uniqueID)
                {
                    cell.style.cssText = "border:solid 1px black;";
                }
                else
                {
                    cell.setAttribute("style","border:solid 1px black;");
                }
                cell.setAttribute("align","center");
                cell.appendChild(document.createTextNode(getDateTime(data.value.Tables[0].Rows[i].INSHEETDATE.toLocaleString())));
                row.appendChild(cell);
                //设置第五个单元格
                cell = document.createElement("td");
                if(document.uniqueID)
                {
                    cell.style.cssText = "border:solid 1px black;";
                }
                else
                {
                    cell.setAttribute("style","border:solid 1px black;");
                }
                cell.setAttribute("align","center");
                a = document.createElement("a");
                a.setAttribute("id","link"+i);
                a.onclick = new Function("detailInfo("+data.value.Tables[0].Rows[i].RECID+","+tag+")");
                if(document.uniqueID)
                {
                    a.style.cssText = "cursor: hand; text-decoration: underline;";
                }
                else
                {
                    a.setAttribute("style","cursor: hand; text-decoration: underline;");
                }
                a.appendChild(document.createTextNode("详细信息"));
                cell.appendChild(a);
                row.appendChild(cell);
                tbody.appendChild(row);
            }
            table.appendChild(tbody);
            document.getElementById("result").appendChild(table);
        }
        else
        {
            div = document.createElement("div");
            if(document.uniqueID)
            {
                div.style.cssText = "color:red;";
            }
            else
            {
                div.setAttribute("style","color:red;");
            }
            div.appendChild(document.createTextNode("查无符合条件的信息！"));
            document.getElementById("result").appendChild(div);
        }
        totalCount = AjaxClass.GetAuditingResultCount();
        getPage(totalCount.value,pageRow,startIndex);
    }

}
//单选
function radioButtonClick(index1,index2,index3)
{
    var id;
    for(var j=0;j<index3;j++)
    {
        id = "Radioinquiry";
        id = id + index1+"_"+j;
        document.getElementById(id).checked = false;

    }
    id = "Radioinquiry" + index1+"_"+index2;
    document.getElementById(id).checked = true;

}

var iHeight = 200;
var iWidth = 550;
var bResizable = 0;
var bScrollbars = 0;
var iTop  = (screen.height - iHeight) / 2 ;
var iLeft = (screen.width  - iWidth) / 2 ;

var sOptions = "toolbar=no" ;
sOptions += ",width=" + iWidth ; 
sOptions += ",height=" + iHeight ;
sOptions += ",resizable="  + (bResizable  ? "yes" : "no") ;
sOptions += ",scrollbars=" + (bScrollbars ? "yes" : "no") ;
sOptions += ",left=" + iLeft ;
sOptions += ",top=" + iTop ;

//查看投票结果
function result(inquiryId)
{	
    var path = window.open("../inquiry/VoteResult.aspx?inquiryId="+inquiryId,"",sOptions);
}

//投票
function vote(inquiryId,type,index1,index2)
{
    var contentId="";
    if(type == 1)
    {
        var id; 
        for(var j=0;j<index2;j++)
        {
            id = "Radioinquiry";
            id = id + index1+"_"+j;
            if(document.getElementById(id).checked)
            {
                contentId = document.getElementById(id).value;
                break;
            }
        }
    }
    else
    {
        for(var j=0;j<index2;j++)
        {
            id = "Checkbox";
            id = id + index1+"_"+j;
            if(document.getElementById(id).checked)
            {
                contentId = contentId + document.getElementById(id).value + ",";
            }
        }
        if(contentId != "")
        {
            contentId = contentId.substring(0,contentId.length-1);
        }
    }
    if( contentId != "")
    {    	
        var path = window.open("../inquiry/VoteResult.aspx?inquiryId="+inquiryId+"&idList="+contentId,"",sOptions);
    }
    else
    {
        alert('请选择投票项！');
    }
}
//获得规划展示信息
function getProgrammeShow(nodeId,startIndex,num)
{
           var a = document.getElementById("content").getElementsByTagName('td');
           for(var i=0;i<a.length;i++)
           {
               if(a[i].id != 'programmeShow'+num)
               {
                   a[i].style.color = '#000000';
               }
               else
               {
                   a[i].style.color = 'blue';
               }
           }

            if(document.uniqueID)
            {
                document.getElementById("pageState").style.cssText = "display:;";   
            }
            else
            {
                document.getElementById("pageState").setAttribute("style","display:;");
            }

var totalCount;
           if(document.getElementById("programmeShow").hasChildNodes())
           {
               var a = document.getElementById("programmeShow").childNodes.length;
               for(var i=0;i<a;i++)
               {
                   document.getElementById("programmeShow").removeChild(document.getElementById("programmeShow").childNodes[0]);
               }
           } 
            var picture_pageRow = 20;
            var rowcount = 4;
            var picture_pager = startIndex * picture_pageRow;
            var data = AjaxClass.GetContent(nodeId,picture_pager,picture_pageRow,totalCount,readerID);
            if(data.value)
            {
                var count = Math.round(data.value.Tables[0].Rows.length/rowcount);
                if(data.value.Tables[0].Rows.length > 0)
                {
                    table = document.createElement("table");
                    tbody = document.createElement("tbody");
                    for(var j=0;j<count;j++)
                    {
                        row = document.createElement("tr");
                        for(var i=1;i<=rowcount;i++)
                        {
                            var num = j * rowcount + i; 
                            if(num <= data.value.Tables[0].Rows.length)
                            {
                                var datetime = data.value.Tables[0].Rows[num-1].setDatetime.toLocaleString();
                                cell = document.createElement("td");
                                table1 = document.createElement("table");
                                tbody1 = document.createElement("tbody");
                                //设置第一行
                                row1 = document.createElement("tr");
                                cell1 = document.createElement("td");
                                a = document.createElement("a");
                                a.setAttribute("href","../../ManagementWeb" + data.value.Tables[0].Rows[num-1].contentAccessoryUrl);
                                a.setAttribute("target","_blank");
                                a.setAttribute("title","点击查看原图！");
                                img = document.createElement("img");
                                img.setAttribute("src","../../ManagementWeb" + data.value.Tables[0].Rows[num-1].contentAccessoryUrl);
                                img.setAttribute("border","0");
                                if(document.uniqueID)
                                {
                                    img.style.cssText = "width:150px; height:100px; vertical-align:middle; cursor: hand;";   
                                }
                                else
                                {
                                    img.setAttribute("style","width:150px; height:100px; vertical-align:middle; cursor: hand;");
                                }
                                a.appendChild(img);
                                cell1.appendChild(a);
                                row1.appendChild(cell1);
                                tbody1.appendChild(row1);
                                //设置第二行                        
                                row1 = document.createElement("tr");
                                cell1 = document.createElement("td");
                                cell1.setAttribute("align","center");
                                cell1.appendChild(document.createTextNode(data.value.Tables[0].Rows[num-1].title));
                                row1.appendChild(cell1);
                                tbody1.appendChild(row1);
                                //设置第三行
                                row1 = document.createElement("tr");
                                cell1 = document.createElement("td");
                                cell1.setAttribute("align","center");
                                cell1.appendChild(document.createTextNode(getDateTime(datetime)));
                                row1.appendChild(cell1);
                                tbody1.appendChild(row1);   
                                
                                table1.appendChild(tbody1);  
                                cell.appendChild(table1);                   
                            }
                            row.appendChild(cell);
                        }
                        tbody.appendChild(row);

                    }
                    table.appendChild(tbody);
                    document.getElementById("programmeShow").appendChild(table);
                    totalCount = AjaxClass.GetTotalCount(nodeId,startIndex,20,readerID);     
                    getPage(totalCount.value,picture_pageRow,startIndex);
                }
                else
                {
                    document.getElementById("programmeShow").innerHTML = "<font color='red'>查无此信息！</font>";
                    if(document.uniqueID)
                    {
                        document.getElementById("pageState").style.cssText = "display:none;";   
                    }
                    else
                    {
                        document.getElementById("pageState").setAttribute("style","display:none;");
                    }

                }
            }

}
//链接网上申报
function getxzxk()
{
    window.location.href = "../../XZXK/Default.aspx";
}
//-------------------20090607 lmz-----------------------------------
//链接信息公开目录
function getxxgkml()
{
    window.location.href = "http://zwgk.dl.gov.cn/dpt.jse?dpt=115";
}
//链接信息公开指南
function getxxgkzn()
{
    window.location.href = "http://zwgk.dl.gov.cn/catalogguideinfolist.jse";
}