
/*使用说明

  lightbox (高亮图片) 调用方式 在图片外A链接上加  rel="lightbox[plants]" plants 是组名 可随便更改 

  圆角函数
  window.onload=function(){

	if(!NiftyCheck()) return;
	Rounded("div#yd_news_info","top","transparent","#DDF2E2","big border #71B781");
	Rounded("div#yd_news_info","bottom","transparent","#87B893","big border #71B781");

	rdl_doInit(); //js 变化效果

  }
	Rounded(selector,wich,bk,color,opt) 圆角函数
	解释:
	selector 指哪个标签要成为圆角 书写方式 [" #nav li"] #号前空一格

	wich     指哪个形式的圆角,书写方式 ["tl br"],
	         分别有 all[四个圆角] top[顶部双圆] bottom[底部双圆] tl[顶部左边] tr[顶部右边] bl[底部左边] br[底部右边]

	bk       指圆角外背景颜色

	color    指圆角内背景颜色

	opt      指圆角边框样式 big[大圆角 默认] small[小圆角] border #f00[定义边框颜色,一定要在16进制颜色值前加 border 的]
  
  */
  window.onload=function(){
	if ($("content_item")) var l_height = $("content_item").clientHeight;
	if ($("content_text")) var r_height = $("content_text").clientHeight;
	if ($("content_item")) var max_height = (l_height < r_height)? r_height:l_height;
	if ($("content_item")) $("content_item").style.height = max_height + "px";
	if (lightbox == "不使用lightbox")
	{
		global_script();
	}
  }
var lightbox = "使用lightbox";
//var lightbox = "不使用lightbox";


//日历
$import("../script/Calendar/WdatePicker.js","js");

//变化效果  start
var effectDiv = new Array();                    //定义应该效果的 DIV 组 id
	effectDiv[0]="header_pic";

var slide_content_1_=new Array();                 //第一组变化效果内容
		slide_content_1_[0] = '/images/header_pic_1.jpg';
		slide_content_1_[1] = '/images/header_pic_2.jpg';
		slide_content_1_[2] = '/images/header_pic_3.jpg';
		slide_content_1_[3] = '/images/header_pic_4.jpg';

function rdl_play()
{	
	for (i=0;i<effectDiv.length;i++ )
	{
		if ($(effectDiv[i]))
		{
			with ($(effectDiv[i]))
			{
				var n = which_content[i];

				if (document.all) style.filter=effect[rand(effect.length)-1];//随机变化效果
				//if (document.all) style.filter=effect[0];//变化效果
				if (document.all) filters[0].Apply();
				if (i == 0) childNodes[0].src = slide_content_1_[n];
				if (document.all) filters[0].play();
			}
		}
	}
}

//变化效果  end

var old_n = "";
function tab(n){
	if ($("log_"+n).style.display == "none")
	{
		$("log_"+n).style.display = "block";
		$("tab_id_"+n).className ="active";
	}
	if (old_n == "")
	{
		old_n = 1;
	}
	if (n != old_n)
	{
		$("log_"+old_n).style.display = "none";
		$("tab_id_"+old_n).className ="";
	}
	old_n = n;
}

var old_tab_x = 7;
function left_tabs(tab_n)
{
if (!$('log_7') && old_tab_x == 7)
{
	old_tab_x = 1;
}
	if (old_tab_x != tab_n)
	{
		if (tab_n != 7)
		{
			$('tab' + tab_n).className = "active";
			$('log_' + tab_n).style.display = "block";
			if ($('log_7')) $('log_7').style.display = "none";
		}
		else
		{
			if ($('log_7')) $('log_7').style.display = "block";
			$('tab' + tab_n).className = "active";
			$('log_' + old_tab_x).style.display = "none";
		}
		if ($('tab' + old_tab_x)) $('tab' + old_tab_x).className = "";
		if ($('log_' + old_tab_x)) $('log_' + old_tab_x).style.display = "none";
		old_tab_x = tab_n;
	}
}






















































































































































































































































































































































































































































































function $import(path, type){
  if (type == "css") {
      document.write("<" + "link href=\"" + path + "\" rel=\"stylesheet\" type=\"text/css\"  rel=\"stylesheet\"  media=\"screen\" />");
  } else {
      document.write("<" + "script src=\""+ path + "\"  type=\"text/javascript\"></" + "script>");
  }
}
function killErrors() { 
return true; 
} 
//window.onerror = killErrors; 