// JavaScript Document
function _(objname){
	return document.getElementById(objname);
	}
var delay=0;
function rollnews(){
	var news = new Array('roll01','roll02','roll03'); 
	var newscount=news.length;
	for(var i=0;i<news.length;i++){
		_(news[i]).style.display='none';
		}
	var news_delay=(delay % newscount);
	_(news[news_delay]).style.display='';
	delay+=1;
	setTimeout("rollnews()",3000);
}

function SWFObject(focus_width,focus_height,text_height,pics,links,texts){
var swf_height = focus_height+text_height;
document.write('<object 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="movie" value="/flashs/movie.swf">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight=0">');
document.write('<embed src="/flashs/movie.swf" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight=0" width="'+ focus_width +'" height="'+ swf_height +'type="application/x-shockwave-flash"" />');
document.write('</object>');
}
function swfshow(swf_file,swidth,sheight,transparent){
var ff_trans,ie_trans;
ff_trans='';
ie_trans='';
if(transparent==1){
	ff_trans='wmode="transparent"';
	ie_trans='<param name="wmode" value="transparent" />';
	}
document.write('<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" height="'+sheight+'" width="'+swidth+'" align="left" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">');
document.write('<param name="movie" value="'+swf_file+'" />');
document.write('<param name="quality" value="high" />'+ie_trans);
document.write('<embed src="'+swf_file+'" width="'+swidth+'" height="'+sheight+'" align="left" '+ff_trans+' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash">');
document.write('</embed></object>');
}

function addBookmark(title,url) {
if (window.sidebar){
	window.sidebar.addPanel(title, url,""); 
	}
	else if(document.all){
	window.external.AddFavorite( url, title);
	}
	else if( window.opera && window.print ) {
	return true;
	}
}
function y2k(number){
		return(number<1000)?number+1900:number;
	}
function showdate(){
	var now=new Date();
	var dd=now.getDate(),mt=now.getMonth()+1,yy=y2k(now.getYear()),weekVal=now.getDay();
	if(weekVal==0) 
		msg1="日";
	else if(weekVal==1)
		msg1="一";
	else if(weekVal==2)
		msg1="二";
	else if(weekVal==3)
		msg1="三";
	else if(weekVal==4)
		msg1="四";
	else if(weekVal==5)
		msg1="五";
	else if(weekVal==6)
		msg1="六";
	document.write("<div id=\"datetime\">"+yy+"年"+mt+"月"+dd+"日&nbsp;&nbsp;&nbsp;&nbsp;星期"+msg1+"</div>");
}
function Marquee(){
if(tab2.offsetWidth-tab.scrollLeft<=0){
		tab.scrollLeft-=tab1.offsetWidth;
}
	else{
		tab.scrollLeft++;
	}
}

function showsubmenu(idx){
	for(var i=1;i<6;i++){
		_('sub'+i).style.display='none';
	}
	if(idx!=0){
		if(_('sub'+idx).style.display=='none'){
			_('sub'+idx).style.left=(81*idx)+'px';
			_('sub'+idx).style.top='25px';
			_('sub'+idx).style.display='block';
			if(idx==4){
				_('sub'+idx).style.width='180px';
			}
			else{
				_('sub'+idx).style.width='100px';
			}
		}
	}	
}