|
本帖最后由 倾角度 于 2011-9-21 11:45 编辑
<!-- 专家列表 -->
</div>
</div>
<script type="text/javascript">
// JavaScript Document
//左滚动
var doctMoveItem={
"院内专家":"<table cellpadding='0' cellspace='0' border='0' id='sDoctor_0'><tr><td id='Roll200935306979111' valign='top'><ul id='doctLst'>{dede:arclist typeid='181' type='image.' row='30' title='30'}<li><a href='[field:arcurl/]' target='_blank'><img src='[field:picname/]' border='0' class='xdoc' /></a><p>[field:title/]</p></li>{/dede:arclist}</ul></td><td id='Roll200935306979112' valign='top'></td></tr></table>",
//////////////特约专家
"特约专家":"<table cellpadding='0' cellspace='0' border='0' id='sDoctor_1'><tr><td id='Roll200935306979111' valign='top'><ul id='doctLst'>{dede:arclist typeid='182' type='image.' row='30' title='30'}<li><a href='[field:arcurl/]' target='_blank'><img src='[field:picname/]' border='0' class='xdoc' title='[field:title/]' /></a><p>[field:title/]</p></li>{/dede:arclist}</ul></td><td id='Roll200935306979112' valign='top'></td></tr></table>"
}
var MyMarleft20093530697911;
var tts11=document.getElementById("tts11");
tts11.innerHTML=doctMoveItem["院内专家"];
var selDoctitm=document.getElementById("chgDoctor_").getElementsByTagName("a"); //选择项
var doctUL = document.getElementById("doctLst"); //专家容器
var itmWidth=102;
var result=itmWidth*doctUL.getElementsByTagName("li").length;
document.all?doctUL.style.width=result:doctUL.setAttribute("style","width:"+result+"px;");
var speed = 30;
var one = document.getElementById("Roll200935306979112");
var two = document.getElementById("Roll200935306979111");
one.innerHTML = two.innerHTML;
function MarqueeLeft(){
if(one.offsetWidth-tts11.scrollLeft<=0)
tts11.scrollLeft-=two.offsetWidth;
else{
tts11.scrollLeft++;
}
}
MyMarleft20093530697911 = setInterval(MarqueeLeft, speed);
tts11.onmouseover=function() {clearInterval(MyMarleft20093530697911);}
tts11.onmouseout=function() {MyMarleft20093530697911=setInterval(MarqueeLeft,speed);}
for(var s=0;s<selDoctitm.length; s++){
selDoctitm.item(s).onmouseover=function(){
tts11.innerHTML=doctMoveItem[this.innerHTML];
for(var q=0;q<selDoctitm.length; q++){
selDoctitm[q].className="selDoctor_1";
}
this.className="selDoctor_0";
doctUL = document.getElementById("doctLst");
result=itmWidth*doctUL.getElementsByTagName("li").length;
document.all?doctUL.style.width=result:doctUL.setAttribute("style","width:"+result+"px;"); //设置宽度
one = document.getElementById("Roll200935306979112");
two = document.getElementById("Roll200935306979111");
one.innerHTML = two.innerHTML;
//MyMarleft20093530697911 = setInterval(MarqueeLeft, speed);
}
}
//左右滚动
var Pro_0 = document.getElementById("rol_x");
var twos = document.getElementById("sf_x");
var sls_6=document.getElementById("sls_6");
Pro_0.innerHTML = twos.innerHTML;
MarqueeLeft0=function(){
if(Pro_0.offsetWidth-sls_6.scrollLeft<=0)
sls_6.scrollLeft-=twos.offsetWidth;
else{
sls_6.scrollLeft++;
}
}
var MyMar1 = setInterval(MarqueeLeft0, speed);
sls_6.onmouseover=function() {clearInterval(MyMar1);}
sls_6.onmouseout=function() {MyMar1=setInterval(MarqueeLeft0,speed);}
function rightMove(){
clearInterval(MyMar1);
MarqueeLeft0=function(){
if(sls_6.scrollLeft<=0)
sls_6.scrollLeft+=twos.offsetWidth;
else{
sls_6.scrollLeft--;
}
}
MyMar1=setInterval(MarqueeLeft0,speed);
}
function leftMove(){
clearInterval(MyMar1);
MarqueeLeft0=function(){
if(Pro_0.offsetWidth-sls_6.scrollLeft<=0)
sls_6.scrollLeft-=twos.offsetWidth;
else{
sls_6.scrollLeft++;
}
}
MyMar1=setInterval(MarqueeLeft0,speed);
}
//上下滚动
var sebaiRl;
if(document.getElementById('cutRoll0')){
var upspeed20093388144475 = 30;
var crl0_ = document.getElementById('cutRoll0');
var crl1_ = document.getElementById('cutRoll');
var crl2_ = document.getElementById('npreRoll2');
crl2_.innerHTML = crl0_.innerHTML;
function MarqueeUP20093388144475(){
if(crl2_.offsetTop-crl1_.scrollTop<=0)
crl1_.scrollTop-=crl0_.offsetHeight;
else{
crl1_.scrollTop++;
} }
sebaiRl = setInterval(MarqueeUP20093388144475, upspeed20093388144475);
crl1_.onmouseover=function() {clearInterval(sebaiRl)}
crl1_.onmouseout=function() {sebaiRl=setInterval(MarqueeUP20093388144475,upspeed20093388144475)}
}
var nimg_,udRoll;
function showDetailBest(){
var udRoll=document.getElementById("cutRoll");
var udImgs = udRoll.getElementsByTagName("img");
var udlen = udImgs.length;
nimg_=document.createElement("img");
nimg_.style.display="none";
document.all?document.body.appendChild(nimg_):document.getElementById("pageIndex").appendChild(nimg_);
for(var k=0;k<udlen;k++){
udImgs.item(k).onmouseover=function(){
nimg_.src=this.src;
document.all?nimg_.style.display="block":nimg_.setAttribute("style","display:none;");
var pos=getAbsposition(udRoll);
if(document.all){
nimg_.style.display="block";
nimg_.style.position="absolute";
nimg_.style.top=pos.h;
nimg_.style.left=pos.w;
nimg_.style.zIndex=20;
}else
nimg_.setAttribute("style","position:absolute; top:"+pos.h+"; left:"+pos.w+"; z-index:20; display:block;");
}
udImgs.item(k).onmouseout=function(){
document.all?nimg_.style.display="none":nimg_.setAttribute("style","display:none;");
}
}
}
if(document.getElementById("cutRoll"))
showDetailBest();
</script>
>>>>>>>>调用不出,滚动<<<<<<<
|
|