

thisJs_j();

function thisJs_j()
{
	/*****输出内容*****/
	var picarry = [];//新闻图片
	var ttlarry = [];//新闻标题
	var conarry = [];//新闻简介
	var lnkarry = [];//新闻链接
	var sotarry = [];//新闻分类
	var slkarry = [];//分类链接
	
	var res=false;
	var timeOut=4000;
	var test_detail="详细内容";
		
	var table_=document.getElementById("pictable");
	var trL_=table_.rows.length;//图片个数
	
	var div_jbig=document.getElementById("div_jbig");
	var ul_jsmall=document.getElementById("ul_jsmall");
	var div_jtt=document.getElementById("div_jtt");
	
	//函数式编程起始
	(
	 function()
	{
		//定于局部变量
		var this_jbig=div_jbig;
		bindEvent(this_jbig, 'mouseover', function()
		{
			if(res){clearTimeout(res);}
		});
		
		bindEvent(this_jbig, 'mouseout', function()
		{
			if(res){clearTimeout(res);}
			res=setTimeout(function(){playIt_j();}, timeOut);
		});
	}
	)();//函数式编程结束

	//函数式编程起始
	(
	 function()
	{
		//定于局部变量
		var this_jsmall=ul_jsmall;
		bindEvent(this_jsmall, 'mouseover', function()
		{
			if(res){clearTimeout(res);}
		});
		
		bindEvent(this_jsmall, 'mouseout', function()
		{
			if(res){clearTimeout(res);}
			res=setTimeout(function(){playIt_j();}, timeOut);
		});
	}
	)();//函数式编程结束
	
	//函数式编程起始
	(
	 function()
	{
		//定于局部变量
		var this_jtt=div_jtt;
		bindEvent(this_jtt, 'mouseover', function()
		{
			if(res){clearTimeout(res);}
		});
		
		bindEvent(this_jtt, 'mouseout', function()
		{
			if(res){clearTimeout(res);}
			res=setTimeout(function(){playIt_j();}, timeOut);
		});
	}
	)();//函数式编程结束
	
	for(var i=0; i<trL_; i++)
	{
		picarry[i]=table_.rows[i].cells[0].childNodes[0].src;
		ttlarry[i]=table_.rows[i].cells[1].innerHTML;
		conarry[i]=table_.rows[i].cells[2].innerHTML;
		lnkarry[i]=table_.rows[i].cells[3].childNodes[0].href;
		sotarry[i]=table_.rows[i].cells[4].innerHTML;
		slkarry[i]=table_.rows[i].cells[5].childNodes[0].href;
		var text_num=(i+1);
		
		if(i==0)
		{
			//创建大图
			var img_jbig=document.createElement("img");
				img_jbig.src=picarry[i];
				img_jbig.setAttribute("id","img_jbig");
				img_jbig.style.filter="RevealTrans (duration="+1+",transition="+23+")";
				img_jbig.style.visibility="visible";
				
			var img_jBg=document.createElement("img");
				img_jBg.src=picarry[i];
				img_jBg.setAttribute("id","img_jBg");
				img_jBg.setAttribute("_num",i);
				
			var a_jbig=document.createElement("a");
				a_jbig.setAttribute("id","a_jbig");
				a_jbig.setAttribute("href",lnkarry[i]);
				
			var a_jfilter=document.createElement("a");
				a_jfilter.setAttribute("id","a_jfilter");
				a_jfilter.setAttribute("href",lnkarry[i]);
				
				a_jbig.appendChild(img_jbig);
				a_jbig.appendChild(img_jBg);
				div_jbig.appendChild(a_jbig);
				div_jbig.appendChild(a_jfilter);
			
			//创建标题
			var text_jtt=document.createTextNode(ttlarry[i]);
			var	a_jtt=document.createElement("a");
				a_jtt.setAttribute("id","a_jtt");
				a_jtt.setAttribute("href",lnkarry[i]);
			var	h_jtt=document.createElement("h6");
			
			var text_jsort=document.createTextNode(sotarry[i]);
			var	a_jsort=document.createElement("a");
				a_jsort.setAttribute("id","a_jsort");
				a_jsort.setAttribute("href",slkarry[i]);
			var	h_jsort=document.createElement("h5");
				
			var text_jcon=document.createTextNode(conarry[i]);
			var	a_jcon=document.createElement("a");
				a_jcon.setAttribute("id","a_jcon");
				a_jcon.setAttribute("href",lnkarry[i]);
			var	div_jcon=document.createElement("div");
				div_jcon.className="div_jcon";
				
			var text_jmore=document.createTextNode(test_detail);
			var	a_jmore=document.createElement("a");
				a_jmore.setAttribute("id","a_jmore");
				a_jmore.setAttribute("href",lnkarry[i]);
				
				a_jtt.appendChild(text_jtt);
				a_jsort.appendChild(text_jsort);
				a_jcon.appendChild(text_jcon);
				a_jmore.appendChild(text_jmore);
				
				a_jtt.innerHTML=FixCode_j(a_jtt.innerHTML);
				a_jsort.innerHTML=FixCode_j(a_jsort.innerHTML);
				a_jcon.innerHTML=FixCode_j(a_jcon.innerHTML);
				
				h_jtt.appendChild(a_jtt);
				h_jsort.appendChild(a_jsort);
				div_jcon.appendChild(a_jcon);
				
				div_jtt.appendChild(h_jtt);
				div_jtt.appendChild(h_jsort);
				div_jtt.appendChild(div_jcon);
				div_jtt.appendChild(a_jmore);
				
			//创建缩略图
			var text_jnum=document.createTextNode(text_num);
			var	a_jnum=document.createElement("a");
				a_jnum.className="a_jnum";
				a_jnum.setAttribute("href",lnkarry[i]);
 
			var img_jsmall=document.createElement("img");
				img_jsmall.src=picarry[i];
			var	a_jsmall=document.createElement("a");
				a_jsmall.className="a_jsmall";
				a_jsmall.setAttribute("href",lnkarry[i]);
				
			var text_js=document.createTextNode(sotarry[i]);
			var	a_js=document.createElement("a");
				a_js.setAttribute("href",slkarry[i]);
				
			var text_jh=document.createTextNode(ttlarry[i]);
			var	a_jh=document.createElement("a");
				a_jh.setAttribute("href",lnkarry[i]);
				
			var text_jp=document.createTextNode(conarry[i]);
			var	a_jp=document.createElement("a");
				a_jp.setAttribute("href",lnkarry[i]);
				
			var	h_js=document.createElement("h5");
			var	h_jh=document.createElement("h6");
			var	div_jp=document.createElement("div");
				div_jp.className="div_jp";
			var	div_jsmall=document.createElement("div");
				div_jsmall.className="div_jsmall "+"small_j"+i;
			var	li_jsmall=document.createElement("li");
				li_jsmall.className="on";
				li_jsmall.setAttribute("_id",i);
								
				a_jnum.appendChild(text_jnum);
				a_jsmall.appendChild(img_jsmall);
				a_js.appendChild(text_js);
				a_jh.appendChild(text_jh);
				a_jp.appendChild(text_jp);
				
				a_js.innerHTML=FixCode_j(a_js.innerHTML);
				a_jh.innerHTML=FixCode_j(a_jh.innerHTML);
				a_jp.innerHTML=FixCode_j(a_jp.innerHTML);
				
				h_js.appendChild(a_js);
				h_jh.appendChild(a_jh);
				div_jp.appendChild(a_jp);
				
				div_jsmall.appendChild(a_jnum);
				div_jsmall.appendChild(a_jsmall);
				div_jsmall.appendChild(h_js);
				div_jsmall.appendChild(h_jh);
				div_jsmall.appendChild(div_jp);
				
				li_jsmall.appendChild(div_jsmall);
				ul_jsmall.appendChild(li_jsmall);
		}
		else
		{
			//创建缩略图
			var text_jnum=document.createTextNode(text_num);
			var	a_jnum=document.createElement("a");
				a_jnum.className="a_jnum";
				a_jnum.setAttribute("href",lnkarry[i]);
 
			var img_jsmall=document.createElement("img");
				img_jsmall.src=picarry[i];
			var	a_jsmall=document.createElement("a");
				a_jsmall.className="a_jsmall";
				a_jsmall.setAttribute("href",lnkarry[i]);
				
			var text_js=document.createTextNode(sotarry[i]);
			var	a_js=document.createElement("a");
				a_js.setAttribute("href",slkarry[i]);
				
			var text_jh=document.createTextNode(ttlarry[i]);
			var	a_jh=document.createElement("a");
				a_jh.setAttribute("href",lnkarry[i]);
				
			var text_jp=document.createTextNode(conarry[i]);
			var	a_jp=document.createElement("a");
				a_jp.setAttribute("href",lnkarry[i]);
				
			var	h_js=document.createElement("h5");
			var	h_jh=document.createElement("h6");
			var	div_jp=document.createElement("div");
				div_jp.className="div_jp";
			var	div_jsmall=document.createElement("div");
				div_jsmall.className="div_jsmall "+"small_j"+i;
			var	li_jsmall=document.createElement("li");
				li_jsmall.setAttribute("_id",i);
				
				
				a_jnum.appendChild(text_jnum);
				a_jsmall.appendChild(img_jsmall);
				a_js.appendChild(text_js);
				a_jh.appendChild(text_jh);
				a_jp.appendChild(text_jp);
				
				a_js.innerHTML=FixCode_j(a_js.innerHTML);
				a_jh.innerHTML=FixCode_j(a_jh.innerHTML);
				a_jp.innerHTML=FixCode_j(a_jp.innerHTML);
				
				h_js.appendChild(a_js);
				h_jh.appendChild(a_jh);
				div_jp.appendChild(a_jp);
				
				div_jsmall.appendChild(a_jnum);
				div_jsmall.appendChild(a_jsmall);
				div_jsmall.appendChild(h_js);
				div_jsmall.appendChild(h_jh);
				div_jsmall.appendChild(div_jp);
				
				li_jsmall.appendChild(div_jsmall);
				ul_jsmall.appendChild(li_jsmall);
		}
		
		//函数式编程起始
		(
		 function()
		{
			//定于局部变量
			var this_=li_jsmall;
			bindEvent(this_, 'mouseover', function()
			{
				if(res){clearTimeout(res);}
				var id_=parseInt(this_.getAttribute("_id"));
				var this_jnum=parseInt(document.getElementById("img_jBg").getAttribute("_num"));
				if(this_jnum!=id_)
				{
					setfoc_j(id_);
					clearAll(id_);
				}
			});
		}
		)();//函数式编程结束
		
		//函数式编程起始
		(
		 function()
		{
			//定于局部变量
			var this_=li_jsmall;
			bindEvent(this_, 'mouseout', function()
			{
				if(res){clearTimeout(res);}
				res=setTimeout(function(){playIt_j();}, timeOut);
			});
		}
		)();//函数式编程结束
	}
	
	//定时器初始化
	res=setTimeout(function(){playIt_j();}, timeOut);
	
	function playIt_j()
	{
		var this_jnum=parseInt(document.getElementById("img_jBg").getAttribute("_num"));
		
		if(this_jnum==trL_-1)
		{
			var this_jnum=0;
		}
		else
		{
			var this_jnum=this_jnum+1;
		}
		
		setfoc_j(this_jnum);
		clearAll(this_jnum);
		
		document.getElementById("img_jBg").setAttribute("_num",this_jnum);
		
		res=setTimeout(function(){playIt_j();},timeOut);
	}
	
	function setfoc_j(id)
	{
		var this_jnum=parseInt(document.getElementById("img_jBg").getAttribute("_num"));		
		document.getElementById("img_jBg").src = picarry[this_jnum];		
		document.getElementById("img_jBg").setAttribute("_num",id);
		
		document.getElementById("a_jbig").href = lnkarry[id];
		document.getElementById("a_jfilter").href = lnkarry[id];
		document.getElementById("a_jtt").href = lnkarry[id];
		document.getElementById("a_jsort").href = slkarry[id];
		document.getElementById("a_jcon").href = lnkarry[id];
		document.getElementById("a_jmore").href = lnkarry[id];
		document.getElementById("img_jbig").src = picarry[id];
		document.getElementById("a_jtt").innerHTML = ttlarry[id];
		document.getElementById("a_jsort").innerHTML = sotarry[id];
		document.getElementById("a_jcon").innerHTML = conarry[id];				
		
		var borserInfo=navigator.userAgent.toLowerCase();
		if(/msie/.test(borserInfo))
		{
			document.getElementById("img_jbig").style.visibility = "hidden";
			document.getElementById("img_jbig").filters[0].Apply();
			document.getElementById("img_jbig").filters[0].transition=23;
			if (document.getElementById("img_jbig").style.visibility == "visible")
			{
				document.getElementById("img_jbig").style.visibility = "hidden";
			}
			else
			{
				document.getElementById("img_jbig").style.visibility = "visible";
			}
			document.getElementById("img_jbig").filters[0].Play();
		}
	}
	
	function clearAll(id)
	{
		var li_jarr=ul_jsmall.getElementsByTagName("li");
		
		for(var j=0; j<li_jarr.length; j++)
		{
			li_jarr[j].className="";
			if(id==j)
			{
				li_jarr[j].className="on";
			}
		}
	}
	
	var aBlank01=div_jbig.getElementsByTagName("a");
	var aBlank02=ul_jsmall.getElementsByTagName("a");
	var aBlank03=div_jtt.getElementsByTagName("a");
	
	for(var ab01=0; ab01<aBlank01.length; ab01++)
	{	
		aBlank01[ab01].setAttribute("target","_blank");
	}
	
	for(var ab02=0; ab02<aBlank02.length; ab02++)
	{	
		aBlank02[ab02].setAttribute("target","_blank");
	}
	
	for(var ab03=0; ab03<aBlank03.length; ab03++)
	{	
		aBlank03[ab03].setAttribute("target","_blank");
	}	
}

function FixCode_j(str){//替换字符
	str=str.replace(/&lt;/g,'<');
	str=str.replace(/&gt;/g,'>');
	str=str.replace(/&amp;/g,'&');
	return str;
}
