
var div_navigationName;
var div_moreSubNavigation;

var parame_name=$H({   
	'a_0':$H({
		'name':'WEB_TITLE','num':'6','num_content':'7'
	}
	)
}
);


function subNavigationInit(){
    div_navigationName = $('div_navigationName').innerText;    
    div_moreSubNavigation = $('div_moreSubNavigation');
	GetMoreSubNavigation('a_0');	
};


//function subNavigationShow(){	
//};

function GetMoreSubNavigation(obj){
	    var url=server_Path+"GetTitleNameAndId";
	    var pars="titleName=" + div_navigationName + "&tableName="+parame_name[obj].name+"&deptName=信息中心";
	    var ajax=new Ajax.Request(url,{
		                onComplete:function(response){
			                        xmldoc.Ini_Doc(response);
			                        var docs=xmldoc.Nodes("//TITLE");
			                        if(docs.length==0)return;
			                        //alert( response.responseText );
                                    $A(docs).each(function(item){                                       
	                                    if(!item.hasChildNodes())return;	                                    
	                                    var ul=document.createElement("ul");
	                                    $A(item.childNodes).each(function(node,j){	                                                                            
                                            var li=document.createElement("li");
                                            li.className = "font";
                                            var a_content=document.createElement("A");
											
											if(node.getAttribute("checkSub") == 'true'){
												Event.observe(a_content,'click',function(){open_moreContent(node.getAttribute("id"),node.getAttribute("name"),'信息中心',node.getAttribute("parentName"),getIndexByName(node.getAttribute("name")), node.getAttribute("checkSub"))},true);                                            
												a_content.setAttribute("href","#");
											}else{									
												if( node.getAttribute("name") == "信息上报"  ){
													a_content.target = "_blank";
													a_content.setAttribute("href","http://www.aqwater.gov.cn:2000/login.aspx");
												}
												else{
													a_content.target = "iframe_subMoreList";
													a_content.setAttribute("href","moreContent.aspx?ID=" + node.getAttribute("id") + "&name=" + node.getAttribute("name") + "&deptName=信息中心");                                            
												}
											}

                                            var _div=document.createElement("DIV");                                            
                                            _div.className = "img";
                                            var _img=document.createElement("img");
                                            _img.setAttribute("src","/IMAGES/INDEX/pic5.gif");
                                            _div.appendChild(_img);                                            
                                            a_content.appendChild(_div);              
                                                                             
                                                                             
                                            //a_content.appendChild(document.createTextNode(node.getAttribute("name"))); 
                                             
                                                if(div_navigationName == "专题报道"){
                                                 var _cutNum=12;
                                                 var _innerText="";
                                                 //20100527 zhouxinyi 添加对专题过长内容进行剪切
                                                 if(node.getAttribute("name").length>_cutNum){
								                        _innerText =node.getAttribute("name").substring(0,_cutNum)+"...";
								                        a_content.appendChild(document.createTextNode(_innerText)); 
							                     }
							                     else{
								                     a_content.appendChild(document.createTextNode(node.getAttribute("name"))); 
							                     }
                                            }
                                            else{
                                                 a_content.appendChild(document.createTextNode(node.getAttribute("name"))); 
                                            }   
                                            
                                            
                                            li.appendChild(a_content);
                                            ul.appendChild(li);//
                                            
                                        }
                                        );
                                        div_moreSubNavigation.appendChild(ul);
                                    }
                                    );
                                    subNavigationShow();
                                }
                        ,method:'post',parameters:pars
                        }
                    );        
};


var server_Path='/VIEW/PUBLIC/server.asmx/';
var xmldoc=new Xml_Doc();

