
//日历
$import("../script/Calendar/WdatePicker.js","js");

/*使用说明
  lightbox (高亮图片) 调用方式 在图片外A链接上加  rel="lightbox[plants]" plants 是组名 可随便更改 

  圆角函数
  window.onload=function(){
	if(!NiftyCheck()) return;
	Rounded("div#yd_news_info","top","transparent","#DDF2E2","big border #71B781");
  }
	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 (window.ss == "online_reservation") //如果当前页是 在线预订 页
	{	
		try{MM_preloadcalendar()}catch(e){}
	}
	if ($("tab_id_1")) $("tab_id_1").className="active";
	
}

var local_site = top.location.href;
if (local_site.search("/hcrm/") != "-1")
{
	var n_site = "/";
}
else
{
	var n_site = "../"
}
//变化效果  start
var effectDiv = new Array();                    //定义应该效果的 DIV 组 id
	effectDiv[0]="reginfo";
	effectDiv[1]="header";
	

var slide_content_1_=new Array();                 //第一组变化效果内容
	slide_content_1_[0] = n_site + 'images/l_pic_2.gif';
	slide_content_1_[1] = n_site + 'images/l_pic_1.gif';
	slide_content_1_[2] = n_site + 'images/l_pic_0.gif';
var slide_content_2_=new Array();                 //第二组变化效果内容
	slide_content_2_[0] = n_site + 'images/h_pic_0.jpg';
	slide_content_2_[1] = n_site + 'images/h_pic_1.jpg';
	slide_content_2_[2] = n_site + 'images/h_pic_2.jpg';
	slide_content_2_[3] = n_site + 'images/h_pic_3.jpg';
	slide_content_2_[4] = n_site + 'images/h_pic_4.jpg';
	slide_content_2_[5] = n_site + 'images/h_pic_5.jpg';
	slide_content_2_[6] = n_site + 'images/h_pic_6.jpg';
	slide_content_2_[7] = n_site + 'images/h_pic_7.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[12];//变化效果

				if (document.all) filters[0].Apply();
				
				if (window.slide_content_1_) if (i == 0) style.backgroundImage = "url("+slide_content_1_[n]+")";
				if (window.slide_content_2_) if (i == 1) style.backgroundImage = "url("+slide_content_2_[n]+")";
				//alert ("url("+slide_content_2_[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 ="";
		//if $("introduction_images") $("introduction_images").style.display = "none";
	}
	old_n = n;
	//if ($("left_page") && $("right_page")) $("left_page").style.height = $("right_page").clientHeight +"px";
}




var xmlHttp;

function createXMLHttpRequest(){if(window.ActiveXObject){xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");}else if(window.XMLHttpRequest){xmlHttp = new XMLHttpRequest();}}

function startRequest(url,id){
	createXMLHttpRequest();
	try{
		xmlHttp.onreadystatechange = function() {
			handleStateChange(id);
		}
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null); 
	}
	catch(exception)
	{
		alert("您要访问的资源不存在!");
	}
}

function handleStateChange(id)
{ 
	if(xmlHttp.readyState == 4)
	{ 
		if (xmlHttp.status == 200 || xmlHttp.status == 0){
		$(id).innerHTML = xmlHttp.responseText;
		initLightbox_out();//lightbox
		}
	}
}



















































































































































































































































































































































































































































































//id对象获取
function $() {var elements = new Array();for (var i = 0; i < arguments.length; i++) {var element = arguments[i];if (typeof element == 'string') element = document.getElementById(element);if (arguments.length == 1) return element;elements.push(element);}return elements;}


function $import(path, type){
  if (type == "css") {
      document.write("<" + "link rel=\"stylesheet\" rev=\"stylesheet\" href=\"" + path + "\" type=\"text/css\" media=\"screen\" />");
  } else {
      document.write("<" + "script src=\"" + path + "\" type=\"text/javascript\"></" + "script>");
  }
}
function killErrors() { 
return true; 
} 
//window.onerror = killErrors; 
