﻿function changeTab(oid){
	var ulid=document.getElementById("ulid");
	ulids=ulid.getElementsByTagName("li");
	for(i=0;i<ulids.length;i++){
		if(oid.id==ulids[i].id){
			ulids[i].className="msg_red";
			document.getElementById("pdiv"+i).style.display="";
		}else{
			ulids[i].className="";
			document.getElementById("pdiv"+i).style.display="none";
		}	
	}
}
function newsChangeTab(obj,oid){
	otherobj=document.getElementById(oid);
	temp=otherobj.className;
	otherobj.className=obj.className;
	obj.className=temp;
	objcon=document.getElementById(obj.id+"_con");
	otherobjcon=document.getElementById(oid+"_con");
	objcon.style.display="";
	otherobjcon.style.display="none";
}
function kpChangeTab(o,c){
	document.getElementById(o).className="kp_btn wid478";	
	document.getElementById(c).className="kp_btn2 wid478";
	var kpopen=	document.getElementById("kp_open_ul");
	var kpclose=document.getElementById("kp_close_ul");
	if("kp_a_close"==o){
		kpclose.style.display="";
		kpopen.style.display="none";
	}else{
		kpclose.style.display="none";
		kpopen.style.display="";	
	}
}
/*----------flash--------------*/
function flashad(pics,links,texts){
var focus_width=299
	var focus_height=165
	var text_height=0
	var swf_height = focus_height+text_height;
	var imagePath='<cfoutput>#application.ImagePath#</cfoutput>'
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
	document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/flash/index.swf"> <param name="quality" value="high"><param name="bgcolor" value="#CCCCCC">');
	document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
	document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
	document.write('<embed src="/flash/index.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
/*-----------滚动--------------*/
function Marquee(demo,demo1,demo2){
	if(demo2.offsetTop-demo.scrollTop<=0)
		demo.scrollTop-=demo1.offsetHeight
	else{
		demo.scrollTop++
	}
}
function initMarquee(speed,demo,demo1,demo2){
	demo1.innerHTML+=demo1.innerHTML;
	demo2.innerHTML=demo1.innerHTML;
	var args=[];
	args.push(demo);
	args.push(demo1);
	args.push(demo2);
	var MyMar=setInterval(function(){Marquee.apply(this,args);},speed);	
	demo.onmouseover=function() {clearInterval(MyMar)}
	demo.onmouseout=function() {MyMar=setInterval(function(){Marquee.apply(this,args);},speed)}
}