// JavaScript Document

function write_cycle_flash(swf_width, swf_height)//首页图片切换的大flash
{
	// 0xffffff:文字颜色|1:文字位置|0x0066ff:文字背景颜色|60:文字背景透明度|0xffffff:按键文字颜色|0x0066ff:按键默认颜色|0x000033:按键当前颜色|8:自动播放时间(秒)|2:图片过渡效果|1:是否显示按钮|_blank:打开窗口
        var swf_config = "|2|||0xFFFFFF|0xFF6600||4|3|1|_blank"
        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="'+ swf_width +'" height="'+ swf_height +'">');
        document.write('<param name="movie" value="data/images/bcastr.swf?bcastr_xml_url=cycle_image.asp"><param name="quality" value="high">');
        document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
        document.write('<param name="FlashVars" value="bcastr_config='+swf_config+'">');
        document.write('<embed src="data/images/bcastr.swf?bcastr_xml_url=cycle_image.asp" wmode="opaque" FlashVars="bcastr_config='+swf_config+'" menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
        document.write('<\/object>');
}

function tab_select(tab_id_pre, show_id, tab_length, div_id_pre)//tab切换函数
{
	tab_class_name_pre = tab_id_pre;
	for(i=1; i<=tab_length; i++)
	{
		if(show_id == i)
		{
			document.getElementById(div_id_pre + '_' + i).style.display = 'block';
			document.getElementById(tab_id_pre + '_' + i).className = tab_id_pre + "_current";
		}
		else
		{
			document.getElementById(div_id_pre + '_' + i).style.display = 'none';
			document.getElementById(tab_id_pre + '_' + i).className = "";
		}
	}
}

function set_ulli_mouse_by_parent(parent_div_id)//根据div id设置其下面所有ul下的li的mouseover，mouseout的背景色效果
{
  obj_div = document.getElementById(parent_div_id);
  obj_ul = obj_div.getElementsByTagName('UL');
  for(j = 0; j <obj_ul.length; j++)
  {
	  arr_obj = obj_ul[j].getElementsByTagName('LI');
	  l = arr_obj.length;
	  for(i = 0; i < l; i++)
	  {
		arr_obj[i].onmouseover = function(e){this.style.backgroundColor = '#FFE9F4';}
		arr_obj[i].onmouseout = function(e){this.style.backgroundColor = '';}
	  }
  }
}
