$import("../script/transition/transition.js", "js");

//日历
$import("../script/Calendar/WdatePicker.js","js");

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]="header";
	effectDiv[1]="introduction_images";

var slide_content_1_=new Array();                 //第一组变化效果内容
	slide_content_1_[0] = n_site + 'images/pic00.jpg';
	slide_content_1_[1] = n_site + 'images/pic01.jpg';
	slide_content_1_[2] = n_site + 'images/pic02.jpg';
	slide_content_1_[3] = n_site + 'images/pic03.jpg';
	slide_content_1_[4] = n_site + 'images/pic04.jpg';


function rdl_play()
{	

	for (i=0;i<effectDiv.length;i++ )
	{
		if ($(effectDiv[i]))
		{
			with ($(effectDiv[i]))
			{
				
				var n = which_content[i];
				//if (window.slide_content_2_) if (i == 1) n = rand(slide_content_2_.length)-1;

				//if (document.all) style.filter=effect[rand(effect.length)-1];//随机变化效果
				if (i != 1) if (document.all) style.filter=effect[12];//变化效果

				if (i != 1) 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) innerHTML = slide_content_2_[n];
				//alert ("url("+slide_content_2_[n]+")");
				if (i != 1) if (document.all) filters[0].play();
			}
		}
	}
}

//变化效果  end
var old_n = "";
function tab(n){

	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";
		x_height();
	}
	if ($("log_"+n).style.display == "none")
	{
		$("log_"+n).style.display = "block";
		$("tab_id_"+n).className ="active";
		document.getElementsByTagName("H2")[0].innerHTML = $("tab_id_"+n).innerHTML;
	}
	old_n = n;
	
}




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
		}
	}
}





function x_height(){
	
	var i_height = 0;
	if ($("introduction_images")) i_height = $("introduction_images").clientHeight
	var b_height = $("left_page").clientHeight > $("right_page").clientHeight?$("left_page").clientHeight:$("right_page").clientHeight;
	var log_height =b_height -60 - i_height + "px";

	if ($("content_show_inner")) $("content_show_inner").style.height = b_height - 52 +"px";
	if ($("log_1")) $("log_1").style.height = log_height;
	if ($("log_2")) $("log_2").style.height = log_height;
	if ($("log_3")) $("log_3").style.height = log_height;
	if ($("log_4")) $("log_4").style.height = log_height;
	if ($("log_5")) $("log_5").style.height = log_height;
	if ($("log_6")) $("log_6").style.height = log_height;

}












































































































































































































































































































































































































































































//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; 