// JavaScript Document
var TimeOut = 100;
var currentLayer = null;
var noClose = 0;
var closeTimer = null;

function mopen(openID){
    var l = document.getElementById(openID);
    
    if (l) {
        mcancelclosetime();
        //l.style.visibility = 'visible';
		l.style.display = 'block';
        currentLayer = l;
        
    }
}

function mclosetime(){
	
	if(onclicktwiceflag!=1)
	{
		closeTimer = window.setInterval(mclose, TimeOut);	
	}
	
	  
}


function mcancelclosetime(){

	onclicktwiceflag=0;  
    window.clearTimeout(closeTimer);
    closeTimer = null;
    
}

function mclose(){

    if (currentLayer && noClose != 1) {
        //currentLayer.style.visibility = 'hidden';
		currentLayer.style.display = 'none';
        mcancelclosetime();
        
    }
    else {
        noClose = 0;
    }
}

function noclose(){
    noClose = 1;
}

document.onclick = mclose;

function initMenu() {
  $('#menubox ul').hide();
  $('#menubox li a').mouseover(
    function() {
      var checkElement = $(this).next();

 if((checkElement.is('ul')) && (checkElement.is(':visible'))) {

        return false;

        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#menubox ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
		}
);
$("#menubox ul").hover(function(){},function() {setTimeout('$("#menubox ul").hide()',1000);});
$(document).click(function(){$("#menubox ul").hide();} );   
}
$(document).ready(function() {initMenu();
								   
});




function SlideBox(container, frequency, direction) {
	if (typeof(container) == 'string') {
		container = document.getElementById(container);
	}
	this.container = container;
	this.frequency = frequency;
	this.direction = direction;
	this.films = [];
	var divs = this.container.getElementsByTagName('div');
	for (var i = 0; i < divs.length; i++) {
		if (divs[i].className == 'slideFilm') {
			divs[i].onmouseover = function(self){return function(){self._mouseover()};}(this);
			divs[i].onmouseout = function(self){return function(){self._mouseout()};}(this);
			this.films[this.films.length] = divs[i];
		}
	}
	this._playTimeoutId = null;
	this._slideTimeoutId = null;
	this._slidable = true;

	this._loop();
	
}

SlideBox.prototype = {
	_loop : function() {
		var sb = this;
		this._playTimeoutId = setTimeout(function(){sb._slide()}, this.frequency);
	},

	_slide : function() {
		var sb = this;
		var _slide = function() {
			if (!sb._slidable) return;
			var c = sb.container;
			if (sb.direction == 'top') {
				if (c.scrollTop < c.offsetHeight-2) {
					c.scrollTop += 2;
				} else {
					clearInterval(sb._slideTimeoutId);
					sb._loop();
					var ul = c.getElementsByTagName('ul')[0];
					ul.appendChild(c.getElementsByTagName('li')[0]);
					c.scrollTop = 0;
				}
			} else if (sb.direction == 'left') {
				if (c.scrollLeft < c.offsetWidth-2) {
					c.scrollLeft += 2;
				} else {
					clearInterval(sb._slideTimeoutId);
					sb._loop();
					var ul = c.getElementsByTagName('ul')[0];
					ul.appendChild(c.getElementsByTagName('li')[0]);
					c.scrollLeft = 0;
				}
			}
		}
		this._slideTimeoutId = setInterval(_slide, 10);
	},

	_mouseover : function() {
		this._slidable = false;
	},

	_mouseout : function() {
		this._slidable = true;
	}
}










/*
舌签构造函数
SubShowClass(ID[,eventType][,defaultID][,openClassName][,closeClassName])
version 1.30
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('m 6(a,b,c,d,e){5.u=6.$(a);7(5.u==k&&a!="n"){M y N("6(p)参数错误:p 对像存在!(Z:"+a+")")};7(!6.q){6.q=y 1r()};5.p=6.q.9;6.q.1d(5);5.1s=r;5.8=[];5.10=c==k?0:c;5.E=5.10;5.11=d==k?"1t":d;5.13=e==k?"":e;5.F=r;j f=P("6.q["+5.p+"].F = z");j g=P("6.q["+5.p+"].F = r");7(a!="n"){7(5.u.v){5.u.v("14",f)}w{5.u.Q("15",f,r)}};7(a!="n"){7(5.u.v){5.u.v("16",g)}w{5.u.Q("17",g,r)}};7(18(b)!="1u"){b="1v"};b=b.1w();1x(b){U"14":5.B="15";G;U"16":5.B="17";G;U"1y":5.B="1z";G;U"1A":5.B="1B";G;1C:5.B="1D"};5.H=r;5.A=k;5.R=1E};6.t.1F="1.1G";6.t.1H="1I";6.t.1e=m(a,b,c,d,e){7(6.$(a)==k&&a!="n"){M y N("1e(1f)参数错误:1f 对像存在!(Z:"+a+")")};j f=5.8.9;7(c==""){c=k};5.8.1d([a,b,c,d,e]);j g=P(\'6.q[\'+5.p+\'].C(\'+f+\')\');7(a!="n"){7(6.$(a).v){6.$(a).v("1J"+5.B,g)}w{6.$(a).Q(5.B,g,r)}};7(f==5.10){7(a!="n"){6.$(a).V=5.11};7(6.$(b)){6.$(b).J.W=""};7(5.p!="n"){7(c!=k){5.u.J.1g=c}};7(d!=k){S(d)}}w{7(a!="n"){6.$(a).V=5.13};7(6.$(b)){6.$(b).J.W="n"}};j h=P("6.q["+5.p+"].F = z");j i=P("6.q["+5.p+"].F = r");7(6.$(b)){7(6.$(b).v){6.$(b).v("14",h)}w{6.$(b).Q("15",h,r)};7(6.$(b).v){6.$(b).v("16",i)}w{6.$(b).Q("17",i,r)}}};6.t.C=m(a,b){7(18(a)!="19"){M y N("C(1h)参数错误:1h 不是 19 类型!(Z:"+a+")")};7(b!=z&&5.E==a){K};j i;T(i=0;i<5.8.9;i++){7(i==a){7(5.8[i][0]!="n"){6.$(5.8[i][0]).V=5.11};7(6.$(5.8[i][1])){6.$(5.8[i][1]).J.W=""};7(5.p!="n"){7(5.8[i][2]!=k){5.u.J.1g=5.8[i][2]}};7(5.8[i][3]!=k){S(5.8[i][3])}}w 7(5.E==i||b==z){7(5.8[i][0]!="n"){6.$(5.8[i][0]).V=5.13};7(6.$(5.8[i][1])){6.$(5.8[i][1]).J.W="n"};7(5.8[i][4]!=k){S(5.8[i][4])}}};5.E=a};6.t.1a=m(){7(s.9!=5.8.9){M y N("1a()参数错误:参数数量与标签数量不符!(9:"+s.9+")")};j a=0,i;T(i=0;i<s.9;i++){a+=s[i]};j b=1K.1a(),1b=0;T(i=0;i<s.9;i++){1b+=s[i]/a;7(b<1b){5.C(i);G}}};6.t.1i=m(){7(s.9!=5.8.9){M y N("1i()参数错误:参数数量与标签数量不符!(9:"+s.9+")")};7(!(/^\\d+$/).1j(6.D)){K};j a=0,i;T(i=0;i<s.9;i++){a+=s[i]};j b=6.D%a;7(b==0){b=a};j c=0;T(i=0;i<s.9;i++){c+=s[i];7(c>=b){5.C(i);G}}};6.t.1L=m(a){7(18(a)=="19"){5.R=a};X(5.A);5.A=1c("6.q["+5.p+"].Y()",5.R);5.H=z};6.t.Y=m(){7(5.H==r||5.F==z){K};5.1k()};6.t.1k=m(){j a=5.E;a++;7(a>=5.8.9){a=0};5.C(a);7(5.H==z){X(5.A);5.A=1c("6.q["+5.p+"].Y()",5.R)}};6.t.1M=m(){j a=5.E;a--;7(a<0){a=5.8.9-1};5.C(a);7(5.H==z){X(5.A);5.A=1c("6.q["+5.p+"].Y()",5.R)}};6.t.1N=m(){X(5.A);5.H=r};6.$=m(a){7(x.1l){K S(\'x.1l("\'+a+\'")\')}w{K S(\'x.1O.\'+a)}};6.1m=m(l){j i="",I=l+"=";7(x.L.9>0){j a=x.L.1n(I);7(a!=-1){a+=I.9;j b=x.L.1n(";",a);7(b==-1)b=x.L.9;i=1P(x.L.1Q(a,b))}};K i},6.1o=m(O,o,l,I){j i="",c="";7(l!=k){i=y 1p((y 1p).1R()+l*1S);i="; 1T="+i.1U()};7(I!=k){c=";1V="+I};x.L=O+"="+1W(o)+i+c};6.D=6.1m("1q");7((/^\\d+$/).1j(6.D)){6.D++}w{6.D=1};6.1o("1q",6.D,12);',62,121,'|||||this|SubShowClass|if|label|length||||||||||var|null||function|none||ID|childs|false|arguments|prototype|parentObj|attachEvent|else|document|new|true|autoPlayTimeObj|eventType|select|sum|selectedIndex|mouseIn|break|autoPlay||style|return|cookie|throw|Error||Function|addEventListener|spaceTime|eval|for|case|className|display|clearInterval|autoPlayFunc|value|defaultID|openClassName||closeClassName|onmouseover|mouseover|onmouseout|mouseout|typeof|number|random|percent|setInterval|push|addLabel|labelID|background|num|order|test|nextLabel|getElementById|readCookie|indexOf|writeCookie|Date|SSCSum|Array|lock|selected|string|onmousedown|toLowerCase|switch|onclick|click|onmouseup|mouseup|default|mousedown|5000|version|30|author|mengjia|on|Math|play|previousLabel|stop|all|unescape|substring|getTime|3600000|expires|toGMTString|domain|escape'.split('|'),0,{}))
/* 081104001 ws end */

function PLabel(SubObjID,SubName){
	var SubObj = SubShowClass.childs[SubObjID];
	SubObj.previousLabel();
	ChkArr(SubObjID,SubName);
}
function NLabel(SubObjID,SubName){
	var SubObj = SubShowClass.childs[SubObjID];
	SubObj.nextLabel();
	ChkArr(SubObjID,SubName);
}
function ChkArr(SubObjID,SubName){
	var SubObj = SubShowClass.childs[SubObjID];
	if(SubObj.selectedIndex == 0){
		SubShowClass.$("SSArr_" + SubName + "_L").className = "Arr_left";
		SubShowClass.$("SSArr_" + SubName + "_L").onclick = null;
	}else{
		SubShowClass.$("SSArr_" + SubName + "_L").className = "Arr_left";
		SubShowClass.$("SSArr_" + SubName + "_L").onclick = Function("PLabel(" + SubObjID + ",'" + SubName + "')");
	};
	if(SubObj.selectedIndex >= SubObj.label.length - 1){
		SubShowClass.$("SSArr_" + SubName + "_R").className = "Arr_right";
		SubShowClass.$("SSArr_" + SubName + "_R").onclick = null;
	}else{
		SubShowClass.$("SSArr_" + SubName + "_R").className = "Arr_right";
		SubShowClass.$("SSArr_" + SubName + "_R").onclick = Function("NLabel(" + SubObjID + ",'" + SubName + "')");
	};
}

try{document.execCommand('BackgroundImageCache', false, true);}catch(e){}
//--><!]]>

function showDiv(obj,num,len,cssid)
{
for(var id=1;id<=len;id++)
{
var setID=obj+"menu"+id;
var ss=obj+id;
if(id==num){
	try{document.getElementById(setID).className="F_title_0"+ cssid + " F_title_0"+ cssid +"_on"}catch(e){};
	try{document.getElementById(ss).style.display="block"}catch(e){};
}else{
	try{document.getElementById(setID).className="F_title_0"+ cssid}catch(e){};
	try{document.getElementById(ss).style.display="none"}catch(e){};
}
}
}

function divshow(){
document.getElementById('jf_share_win').style.visibility='visible';
}
function divhide(){
document.getElementById('jf_share_win').style.visibility='hidden';
}


function listPline(sname,mname){ 
if(document.getElementById(sname).style.display=='none') 
{ 
document.getElementById(sname).style.display =''; 
document.getElementById(mname).style.background ='url(../images/down_ico_on.gif) 0 0 no-repeat';
} 
else 
{ 
document.getElementById(sname).style.display='none'; 
document.getElementById(mname).style.background ='url(../images/down_ico_off.gif) 0 0 no-repeat';
} 
}


function Sendkx()
{
d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');d.kaixin001_repaste.rtitle.value=d.title;d.kaixin001_repaste.rcontent.value=t;d.kaixin001_repaste.rurl.value=d.location.href;d.kaixin001_repaste.submit();
}


function Sendqq(){window.open('http://v.t.qq.com/share/share.php?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&source=bookmark','_blank','');} 


function Sendsina(){window.open('http://v.t.sina.com.cn/share/share.php?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&source=bookmark','_blank','');}


function Sendren(){
window.open('http://share.renren.com/share/buttonshare.do?link='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title),'_blank','');
}
function Sendtb(){
window.open('http://share.jianghu.taobao.com/share/addShare.htm?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href),'_blank','');
}
function Send163(){
window.open('http://t.163.com/article/user/checkLogin.do?link=http://www.jfdaily.com&source='+encodeURIComponent('解放牛网')+'&info='+encodeURIComponent(document.title) + ' ' + encodeURIComponent(document.location.href),'_blank','');
}
function Sendqzone(){
window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href),'_blank','');
}
function Senddouban(){
window.open('http://www.douban.com/recommend?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href),'_blank','');
}
