﻿function ResumeError() {
 return true;
}
window.onerror=ResumeError;
 
function flash(file,w,h) {
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'"> ');
document.write('<param name="movie" value="'+file+'">');
document.write('<param name="quality" value="high"> ');
document.write('<param name="wmode" value="transparent"> ');
document.write('<param name="menu" value="false"> ');
document.write('<embed src="'+file+'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed> ');
document.write('</object>');
}


var n = 0;
var Timer = null;
var oBackImg = document.getElementById('num');

//初始化函数
function InitParm(){
   n++;
   if(n>4)n=0;
   ChangeStart(n);
}

function ChangeStart(value){
   n = value;
   ImgSel(value);//图片切换
   LinkChange(value);//超链接切换
//   BackImg(value);//小图片背景切换  
}

// 定时图片切换
function ImgSel(num){
   with(fc){
    filters[0].Apply();//初始化滤镜
    for(var i = 0;i < 5; i++) (i == num) ? (childNodes[i].style.display = "block") : (childNodes[i].style.display = "none");
    filters[0].play();//滤镜使用
   }  
}

// 定时超链接切换
function LinkChange(num){
   with(con){
    for(var i = 0;i < 5; i++) i == num?childNodes[i].style.display = "block":childNodes[i].style.display = "none";  
   }
  
}
// 定时小背景图片切换
function BackImg(len){
for(var i=0;i<5;i++)
   if(len==i){
   oBackImg.getElementsByTagName("td")[i].className='bigon';
   } 
else{ 
   oBackImg.getElementsByTagName("td")[i].className='bigoff';
   } 
}

//清除定时器
function ClearTime(){
   clearInterval(Timer);
}

function ImgChange(){
   Timer = window.setInterval("InitParm()",3000);
}

//ImgChange();


//鼠标经过单元格变色
function swapBgColor(elementID, bgColor)
{
	elementID.bgColor = bgColor;
}

//点击展开菜单
function tree(strTreename)
{
	var strTreePic = strTreename ;
	if (eval(strTreename).style.display=='none')
		{eval(strTreename).style.display='';eval(strTreePic).background='images/nav_node_minus.gif'}
	else
		{eval(strTreename).style.display='none';eval(strTreePic).background='images/nav_node_plus.gif'};
}

//树形结构
function act(id)
{
	return document.getElementById(id);
}
var myDocument = "";
function openInfo(id)
{
	if(myDocument == id)
	{
		if(act(myDocument).style.display == "none")
		{
			act(myDocument).style.display = "block";
		}else{
			act(myDocument).style.display = "none";
		}
		return false;
	}
	
	if( myDocument!=""){
		act(myDocument).style.display = "none";
	}
		act(id).style.display = "block";
	myDocument = id;
	return false;
}
