var timer; function mv(i,place,speed,way){ var obj="toplinkspan2_"; //alert("way"+way); if(document.getElementById(obj).offsetLeftplace){ document.getElementById(obj).style.left = document.getElementById(obj).offsetLeft - speed + "px"; var a=document.getElementById(obj).offsetLeft; //alert("left"+document.getElementById(obj).offsetLeft); }else{ document.getElementById(obj).style.left=place+"px";clearInterval(timer); } } function topmov(i,obj){ var speed=50; var place; switch (i){ case 0:place=1;break; case 1:place=101;break; case 2:place=201;break; } timer = setInterval("mv("+i+","+place+","+speed+")",1); } function layshow(layname,relativename){ document.getElementById(layname).style.display="block"; if(relativename){ document.getElementById(relativename).style.position="relative"; } } function layhidden(layname,relativename){ document.getElementById(layname).style.display="none"; if(relativename) {document.getElementById(relativename).style.position=""; } } function csschange(id,classname){ document.getElementById(id).className=classname; } function csschange2(id,classname1,classname2,no,sum){ for(i=0;i 0){ if(iScroll >= (iList * 2 - iScroller)){ iScroll -= iList; } } else { if(iScroll <= 0){ iScroll += iList; } } this.speed = this.options.Speed; if(iPause > 0){ if(Math.abs(this.pause) >= iPause){ this.speed = this.options.PauseStep; this.pause = iStep = 0; this.Turn(); } else { this.pause += iStep; } } return (iScroll + iStep); }, //开始 Start: function() { //方向设置 switch (this.Side[0].toLowerCase()) { case "right" : if(this.widthList < this.widthScroller) return; this.side = -1; this.ScrollLeftRight(); break; case "left" : if(this.widthList < this.widthScroller) return; this.side = 1; this.ScrollLeftRight(); break; case "down" : if(this.heightList < this.heightScroller) return; this.side = -1; this.ScrollUpDown(); break; case "up" : default : if(this.heightList < this.heightScroller) return; this.side = 1; this.ScrollUpDown(); } }, //停止 Stop: function() { clearTimeout(this.timer); } }; /************news js********************************/ function rolinTab(obj) { var list = $(obj).getElementsByTagName("LI"); var state = { show: false, hidden: false, showObj: false }; for (var i = 0; i < list.length; i++) { var tmp = new rolinItem(list[i], state); if (i == 0) tmp.pShow(); } } function rolinItem(obj, state) { var speed = 0.9; var range = 1; var interval; var tarH; var tar = this; var head = getFirstChild(obj); var content = getNextChild(head); var isOpen = false; this.pHidden = function() { if (isOpen) hidden(); } this.pShow = show; var baseH = content.offsetHeight; content.style.display = "none"; var isOpen = false; head.onmouseover = function() { //this.style.background = "url(images/star9Prefecture/paint/hidden.gif) 5px 10px no-repeat"; } head.onmouseout = mouseout; head.onclick = function() { //this.style.background = "url(images/star9Prefecture/paint/hidden.gif) 5px 10px no-repeat"; if (!state.show && !state.hidden) { if (!isOpen) { head.onmouseout = null; show(); } else { //hidden(); } } } function mouseout() { //this.style.background = "url(images/star9Prefecture/paint/hidden.gif) 5px 10px no-repeat"; } function show() { head.style.borderBottom = "1px solid #DADADA"; state.show = true; if (state.openObj && state.openObj != tar) { state.openObj.pHidden(); } content.style.height = "0px"; content.style.display = "block"; content.style.overflow = "hidden"; state.openObj = tar; tarH = baseH; interval = setInterval(move, 10); } function showS() { isOpen = true; state.show = false; } function hidden() { state.hidden = true; tarH = 0; interval = setInterval(move, 10); } function hiddenS() { head.style.borderBottom = "none"; head.onmouseout = mouseout; head.onmouseout(); content.style.display = "none"; isOpen = false; state.hidden = false; } function move() { var dist = (tarH - content.style.height.pxToNum()) * speed; if (Math.abs(dist) < 1) dist = dist > 0 ? 1 : -1; content.style.height = (content.style.height.pxToNum() + dist) + "px"; if (Math.abs(content.style.height.pxToNum() - tarH) <= range) { clearInterval(interval); content.style.height = tarH + "px"; if (tarH != 0) { showS() } else { hiddenS(); } } } } var $ = function($) { return document.getElementById($) }; String.prototype.pxToNum = function() { return Number(this.replace("px", "")) } function getFirstChild(obj) { var result = obj.firstChild; while (!result.tagName) { result = result.nextSibling; } return result; } function getNextChild(obj) { var result = obj.nextSibling; while (!result.tagName) { result = result.nextSibling; } return result; } /***********************************************/ /*********time**************************************/ var target=[] var time_id=[] function show_date_time_0(){ setTimeout("show_date_time_0()", 1000); for (var i=0,j=target.length;i"; } else { document.getElementById(time_id[i]).innerHTML=daysold+"天"+hrsold+"小时"+minsold+"分"+seconds+"秒"; } } } } setTimeout("show_date_time_0()", 100); function THINPIGServerTime1(id,i){ today1.setTime(today1.getTime()+250); timeold1=(today1.getTime()-BirthDay1.getTime()); sectimeold1=timeold1/1000; secondsold1=Math.floor(sectimeold1); msPerDay1=24*60*60*1000; e_daysold1=timeold1/msPerDay1; daysold1=Math.floor(e_daysold1); e_hrsold1=(e_daysold1-daysold1)*24; hrsold1=Math.floor(e_hrsold1); e_minsold1=(e_hrsold1-hrsold1)*60; minsold1=Math.floor((e_hrsold1-hrsold1)*60); seconds1=Math.floor((e_minsold1-minsold1)*60); if(i==1){ document.getElementById(id+i).innerHTML =(daysold1*2+3); }else{ var aaa=daysold1*2; document.getElementById(id+i).innerHTML =aaa; } } /*********time end*************************************/