window.onscroll = function () {
	var top = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
	if(top>0){
		$(".to_top").show();
	}else{
		$(".to_top").hide();
	}
}


$(function(){

	$(".jump").live('click',function(){
		var cobj = $(this);
		var sid = cobj.attr("sid");
		//		alert(sid);
		var pobj = $("#menu_"+sid);
		$(".collins_content").addClass("hidden");
		pobj.removeClass("hidden");

		$("h3").attr("class","open menu_switch");

		var h3bj = $("#h3_"+sid);
		h3bj.attr("class","close menu_switch");
	});


	$(".st").mouseover(function(){
		var tid = $(this).attr("tid");
		//		alert(tid);
		$("#tips_posp_"+tid).show();
	});

	$(".st").mouseout(function(){
		var tid = $(this).attr("tid");
		$("#tips_posp_"+tid).hide();
	});
	$(".ee_mean_switch").click(function(){
		var cobj = $(this);
		var sid = cobj.attr("sid");
		var cls = cobj.attr("class");
		var pobj = $("#ee_example_"+sid);
		if(cls.indexOf("bg_down")==-1){
			cobj.addClass("bg_down");
			pobj.show();
		}else{
			cobj.removeClass("bg_down");
			pobj.hide();
		}
	});

	/*	$(".ee_mean_switch").toggle(function(){
	var cobj = $(this);
	var sid = cobj.attr("sid");
	var cls = cobj.attr("class");
	var pobj = $("#ee_example_"+sid);
	if(cls.indexOf("bg_down")==-1){
	cobj.addClass("bg_down");
	pobj.show();
	}else{
	cobj.removeClass("bg_down");
	pobj.hide();
	}
	},function(){
	var cobj = $(this);
	var sid = cobj.attr("sid");
	var cls = cobj.attr("class");
	var pobj = $("#ee_example_"+sid);
	if(cls.indexOf("bg_down")==-1){
	cobj.addClass("bg_down");
	pobj.show();
	}else{
	cobj.removeClass("bg_down");
	pobj.hide();
	}
	});
	$(".yinghan_mean_switch").toggle(function(){
	var cobj = $(this);
	var id1 = cobj.attr("sid");
	var pobj = $("#yinghan_example_"+id1);
	cobj.addClass("bg_down");
	pobj.show();
	},function(){
	var cobj = $(this);
	var id1 = cobj.attr("sid");
	var pobj = $("#yinghan_example_"+id1);
	cobj.removeClass("bg_down");
	pobj.hide();
	});
	$(".cxbh_switch").toggle(function(){
	var cobj = $(this);
	var id1 = cobj.attr("sid");
	var pobj = $("#cxbh_example_"+id1);
	cobj.addClass("bg_down");
	pobj.show();
	},function(){
	var cobj = $(this);
	var id1 = cobj.attr("sid");
	var pobj = $("#cxbh_example_"+id1);
	cobj.removeClass("bg_down");
	pobj.hide();
	});
	*/
	$(".yinghan_mean_switch").click(function(){
		var cobj = $(this);
		var id1 = cobj.attr("sid");
		var cls = cobj.attr("class");
		var pobj = $("#yinghan_example_"+id1);
		if(cls.indexOf("bg_down")==-1){
			cobj.addClass("bg_down");
			pobj.show();
		}else{
			cobj.removeClass("bg_down");
			pobj.hide();
		}
	});
	$(".cxbh_switch").click(function(){
		var cobj = $(this);
		var id1 = cobj.attr("sid");
		var cls = cobj.attr("class");
		var pobj = $("#cxbh_example_"+id1);
		if(cls.indexOf("bg_down")==-1){
			cobj.addClass("bg_down");
			pobj.show();
		}else{
			cobj.removeClass("bg_down");
			pobj.hide();
		}
	});
});
var timer = null;
function callback(mp3) {
	asplay(mp3);
}
function onSecondDelay(mp3) {
	clearTimeout(timer);
	var mp3_1 = "callback('"+mp3+"')";
	timer = setTimeout(mp3_1, 100);
}
/*×ó²àµ¼º½*/
function vNav(){
	var L=document.getElementById("leftBox");
	var R=document.getElementById("main_box");
	if (L.className=="leftBox_no") {
        L.className="";
		R.style.paddingLeft="103px";
		setCookie('icibavnav',1,365);
	}else{
      L.className="leftBox_no";
	  R.style.paddingLeft="17px";
	  setCookie('icibavnav',2,365)
  	}
}
function setHeight(){
	var leftBoxH=$(window).height();
	$("#leftBox").css("height",leftBoxH);
	$(".leftBox3").css("border-right","1px solid #ddd")
}
window.onload=function(){setHeight();checkCookie();}
window.onresize=setHeight;
/*cookie*/
function getCookie(icibavnav)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(icibavnav)
  if (c_start!=-1)
    { 
    c_start=c_start + icibavnav.length+1 
    c_end=document.cookie.indexOf(";",c_start)
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end))
    } 
  }
return ""
}
function setCookie(icibavnav,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=icibavnav+ "=" +escape(value)+
((expiredays==null) ? "" : "; expires="+exdate.toGMTString())
}
function checkCookie()
{
var icibavnav=getCookie('icibavnav');
var L=document.getElementById("leftBox");
var R=document.getElementById("main_box");
if (icibavnav==1)
  {
	L.className="";
	R.style.paddingLeft="103px";
  }
else if(icibavnav==2)
  {
	L.className="leftBox_no";
 	R.style.paddingLeft="17px";
  if (icibavnav!=null && icibavnav!="")
    {
    setCookie('icibavnav',icibavnav,365)
    }
  }
}