var onids = new Array([8]);
onids[0]="nat1";
onids[1]="new_hat1";
onids[2]="fr_hat1";
onids[3]="fg_hat1";
onids[4]="ws_hat1";
onids[5]="pl_hat1";
onids[6]="lSearch1";
onids[7]="nd1";

var onds = new Array([8]);
onds[0]="nat1";
onds[1]="class174";
onds[2]="class47";
onds[3]="class49";
onds[4]="class62";
onds[5]="class111";
onds[6]="dSearch1";
onds[7]="class8";
function onLi(lid,i){
	var oid = onids[i];
	if(lid!=oid){
		document.getElementById(lid).className = "currnt";
		document.getElementById(oid).className = "";
		onids[i] = lid;
		return true;
	}
	return false;
}

function onLiToshow(lid,i,did,cid,count,maxL,liNum){
	if(onLi(lid,i)){
		var showDiv = document.getElementById(did);
		document.getElementById(onds[i]).style.display = "none";
		showDiv.style.display = "block";
		onds[i] = did;
		ls = showDiv.getElementsByTagName("font");
		if(ls.length>0){
			if(i==4){
				getCsUl(did,count,maxL,liNum);	
			}else
			getArticleUl(did,cid,count,maxL,liNum);
		}
		//alert(document.getElementById(did).innerHTML);
	}
	

}



////classId(i):栏目ID
///did(s):显示容器ID
////typeID(i):列表类型号；
////rowCount(i):列表行数
////tLength(i):列表标题最大长度
function showList(classId,did,typeId,rowCount,tLength,flag){
	var classDiv;
	if(typeId==3)
		classDiv =document.getElementById("img"+classId);
	else
		classDiv =document.getElementById("class"+classId);
	var showDiv=document.getElementById(did);
	if(classDiv.innerHTML.length<10){
			if(typeId==0)
				getArtTable1(classId,classDiv.id,rowCount,tLength);
			if(typeId==1)
				getArtTable2(classId,classDiv.id,rowCount,tLength);
			if(typeId==2)
				getArtTable3(classId,classDiv.id,rowCount,tLength,flag);
			if(typeId==3){
				classDiv =document.getElementById("img"+classId);
				getArtImgTab(classId,classDiv.id,rowCount);
			}
			//确认当前字体并转换
			var c =getCookie("isF");
			c=(c=="true"?true:false);
			if(c)
				StranBody(c,classDiv);
	}
	showDiv.innerHTML = classDiv.innerHTML;
}

var Tshow=null;
var isShow=false;

function readyshow(did){
	//document.title="showing";
	if(Tshow!=null)
		window.clearTimeout(Tshow);
	Tshow = window.setTimeout("flashShow('"+did+"')", 100);
}

function readyhide(did){
	//document.title="hideing";
	if(Tshow!=null)
		window.clearTimeout(Tshow);
	isShow=false;
	Tshow = window.setTimeout("flashhide('"+did+"')",100);
}

//带渐出效果的延时显示
function flashShow(did){
	if(!isShow){
		isShow = true;
	var div = document.getElementById(did);
	var h = 65;
	var size =25;
	div.style.overflow="hidden";
	if(div.clientHeight+size<h)
		div.style.height =  (div.clientHeight+size)+"px";
	div.style.display = "";
	//alert(h+"|"+size+"|"+div.clientHeight);
	Tshow =	window.setTimeout("flashShowGrow('"+did+"',"+h+","+size+")",15);
	}
}

//渐出效果
function flashShowGrow(did,h,size){
		var div = document.getElementById(did);
			//alert(h+" "+div.style.height);
		if(div.clientHeight+size<h){
			div.style.height =  (div.clientHeight+size)+"px";
			Tshow =	window.setTimeout("flashShowGrow('"+did+"',"+h+","+size+")",15);
		}else{
			div.style.height=h+"px";
			Tshow=null;
		}
	
}

//带渐出效果的延时显示
function flashhide(did){

	var div = document.getElementById(did);
	var h = 65;
	var size =22;
	div.style.overflow="hidden";
	//div.style.height=h+"px";
	//alert(h+"|"+size+"|"+div.clientHeight);
	Tshow =	window.setTimeout("flashhideGrow('"+did+"',"+h+","+size+")",15);
	
}

//渐出效果
function flashhideGrow(did,h,size){
		var div = document.getElementById(did);
			//alert(h+" "+div.style.height);
		if(div.clientHeight-size>=0){
			div.style.height =  (div.clientHeight-size)+"px";
			//alert(did+","+h+","+size);
			Tshow =	window.setTimeout("flashhideGrow('"+did+"',"+h+","+size+")",15);
		}else{
			div.style.height=0+"px";
			div.style.display = "none";
			Tshow=null;
		}
	
}




function oldInit(){
	//0加载一级分类
	//getACli(0,"fisrtClass");

	//2加载公告公示
	getArtTable1(210,"class210",6,21);
	//3加载警务新闻
	getArtTable1(206,"class206",6,23);
	//4加载各地警讯
	getArtTable2(208,'class2078',5,23);
	//5信息公开
    getAcTable(6,"class6tab");
	//6加载警情通报
	getArtTable1(209,"class209",6,23);
	//7加载警方提示
	getArtTable2(162,'class7',5,23);
	//8网上通缉 
    getArtTable3(202,'class202',4,22);
    //9法律资讯
    getArtTable3(203,'class203',4,23);
    //10警事要闻
    getArtTable4(182,'class182',5,25);
    //11阳江警讯
    getTopArt(244,'yjtitle','yjabout',10,20,"yjimg",80,80);
    //12互动留言
    getCsTable3(226,'class226',3,21,true);
  	//13警民互动
    getArtTable3(225,'class204',4,21);
    //14警察文化长廊 图片
    getArtImgTab(228,'img205',2);
    //15警察文化长廊
    getArtTable3(228,'class205',4,28,true)
    //16投票
    getVq(61,"voteQuestion","voteItem");
    //17时间
    showDate("nowDate");
    //18简繁转换
    
    if(checkCookie()){
		font=4;
	}
	//1顶文章
	getTopArt(182,'topTiltle','topAbout',11,50);
	//滚动公告公示
	rollUp("class210",100,2,100)
}

