第2个文件(上半部分):fav2.js
OB_Top=70;
OB_Left=150;
OB_Margin=10; //top and bottom margins between icons and borders
OB_Width=80; //bar width
OB_Height=250; //bar height
OB_SlideSpeed=2.3;
OB_BackgroundColor="ffffff";
OB_ItemsSpacing=0;
OB_BorderWidth=1;
OB_BorderStyle="ridge";
OB_BorderColor="#3366CC";
OB_IconsWidth=20;
OB_IconsHeight=10;
OB_ButtonFontFamily="穝灿砰";
OB_ButtonFontSize=10;
OB_ButtonFontColor="ffffff";
OB_ButtonHeight=20;
OB_LabelFontFamily="穝灿砰";
OB_LabelFontSize=10;
OB_LabelFontColor="white";
OB_LabelMargin=0;
OB_UpArrow="down.gif";
OB_DownArrow="up.gif";
OB_ArrowWidth=12;
OB_ArrowHeight=12;
OB_ArrowSlideSpeed=10;function MakeItems(Folder,zorder,top)
{
var items=0;
var folderWidth=(OB_Width-OB_BorderWidth*2);
while(Folder[items+1])
items+=4;
items/=4;
document.write("<DIV id='OB_Folder"+zorder+"' style='position:absolute;left:0;top:"+top+";width:"+folderWidth+";height:"+(OB_Margin*2+items*(OB_IconsHeight+OB_LabelFontSize+OB_LabelMargin)+(items-1)*OB_ItemsSpacing)+";z-index:"+zorder+";clip:rect(0 0 0 0);'>");
for(var i=1;i<items*4;i+=4)
{
//document.write("<div targetFrame='"+Folder[i+3]+"' link='"+Folder[i+2]+"' onMouseDown='OutlookLikeBar.ItemClicked(this)' onMouseUp='OutlookLikeBar.ItemSelected(this)' onMouseOver='OutlookLikeBar.OverItems(this)' onMouseOut='OutlookLikeBar.OutItems(this)' style='position:absolute;left:"+(Math.ceil((OB_Width-OB_BorderWidth*2-OB_IconsHeight)/2)-1)+";top:"+(OB_Margin+Math.ceil((i-1)/4)*(OB_ItemsSpacing+OB_LabelFontSize+OB_IconsHeight))+";cursor:hand;clip:rect(0 "+OB_IconsWidth+" "+OB_IconsHeight+" 0;width:"+OB_IconsWidth+";height:"+OB_IconsHeight+"'>");
  //document.write("<img src='"+Folder[i]+"'>");
//document.write("</div>");         document.write("<div align='center' style='position:absolute;left:10;top:"+(OB_Margin+Math.ceil((i-1)/4)*(OB_ItemsSpacing+OB_LabelFontSize+OB_IconsHeight))+";font-family:"+OB_LabelFontFamily+";font-size:"+OB_LabelFontSize+"pt;color:"+OB_LabelFontColor+"'>");
document.write("<a  href="+Folder[i+2]+"  target="+Folder[i+3]+">"+Folder[i+1]+"</a>");
document.write(Folder[i]);
document.write("</div>");
}
document.write("</DIV>");
}function OutBar(width,height,items,buttonHeight,borderWidth,slideSpeed,slideArrowValue,ArrowSlideSpeed,buttonwidth)
{
this.=1;
this.currentItem=null;
this.slideCount=0;
this.slideStep=1;
this.slideArrowValue=slideArrowValue;
this.slideSpeed=slideSpeed;
this.borderWidth=borderWidth;
this.width=width;
this.visibleAreaHeight=height-2*borderWidth-items*buttonHeight;
this.visibleAreaWidth=width;
this.FolderClicked=FolderClicked;
this.SlideFolders=SlideFolders;
this.ItemClicked=ItemClicked;
this.ItemSelected=ItemSelected;
this.OverItems=OverItems;
this.OutItems=OutItems;
this.OverArrow=OverArrow;
this.OutArrow=OutArrow;
this.ArrowClicked=ArrowClicked;
this.ArrowSelected=ArrowSelected;
this.ArrowSlideSpeed=ArrowSlideSpeed;
this.SlideItems=SlideItems;
this.SlideItemsAction=SlideItemsAction;
this.Start=Start;
this.ClipFolder=ClipFolder;
this.SetArrows=SetArrows;
this.HideArrows=HideArrows;
this.sliding=false;
this.items=items;
this.started=false;
this.Start();
}function FolderClicked(folder)
{
if(this.sliding)
return;
if(folder==this.currentFolder)
return;
this.sliding=true;
this.slideCount=this.visibleAreaHeight;
this.slideStep=1;
this.countStep=0;
this.HideArrows();
this.SlideFolders(folder,document.all["OB_Button"+folder].position=="DOWN");
}function SlideFolders(folder,down)
{
var step;
if(down)
{
this.slideCount-=Math.floor(this.slideStep);
if(this.slideCount<0)
this.slideStep+=this.slideCount;
step=Math.floor(this.slideStep);
for(var i=2;i<=folder;i++)
if(document.all["OB_Button"+i].position=="DOWN")
{
document.all["OB_Button"+i].style.pixelTop-=step;
document.all["OB_Folder"+i].style.pixelTop-=step;
}     filter = /rect\((\d*)px (\d*)px (\d*)px (\d*)px\)/; var clipString=document.all["OB_Folder"+folder].style.clip;
var clip=clipString.match(filter);
this.ClipFolder(folder,parseInt(clip[1]),this.visibleAreaWidth,(parseInt(clip[3])+step),0); var clipString=document.all["OB_Folder"+this.currentFolder].style.clip;
var clip=clipString.match(filter);
this.ClipFolder(this.currentFolder,parseInt(clip[1]),this.visibleAreaWidth,(parseInt(clip[3])-step),0); this.slideStep*=this.slideSpeed;
if(this.slideCount>0)
setTimeout("OutlookLikeBar.SlideFolders("+folder+",true)",20);
else
{
for(var k=2;k<=folder;k++)
document.all["OB_Button"+k].position="UP";
this.currentFolder=folder;
this.SetArrows();
this.sliding=false;
}
}
else
{
this.slideCount-=Math.floor(this.slideStep);
if(this.slideCount<0)
this.slideStep+=this.slideCount;
step=Math.floor(this.slideStep);
for(var i=folder+1;i<=this.items;i++)
if(document.all["OB_Button"+i].position=="UP")
{
document.all["OB_Button"+i].style.pixelTop+=step;
document.all["OB_Folder"+i].style.pixelTop+=step;
}     filter = /rect\((\d*)px (\d*)px (\d*)px (\d*)px\)/; var clipString=document.all["OB_Folder"+folder].style.clip;
var clip=clipString.match(filter);
this.ClipFolder(folder,parseInt(clip[1]),this.visibleAreaWidth,(parseInt(clip[3])+step),0); var clipString=document.all["OB_Folder"+this.currentFolder].style.clip;
var clip=clipString.match(filter);
this.ClipFolder(this.currentFolder,parseInt(clip[1]),this.visibleAreaWidth,(parseInt(clip[3])-step),0); this.slideStep*=this.slideSpeed;
if(this.slideCount>0)
setTimeout("OutlookLikeBar.SlideFolders("+folder+",false)",20);
else
{
for(var k=folder+1;k<=this.items;k++)
document.all["OB_Button"+k].position="DOWN";
this.currentFolder=folder;
this.SetArrows();
this.sliding=false;
}
}
}

解决方案 »

  1.   

    第2个文件(下半部分):fav2.js
    function ItemClicked(item)
    {
    if(this.sliding)
    return;
    item.style.border="2 inset #ffffff";
    }function ItemSelected(item)
    {
    if(this.sliding)
    return;
    item.style.border="1 outset #ffffff";
    if(item.link.indexOf("javascript")!=-1)
    eval(item.link)
    else
    eval(item.targetFrame+".location='"+item.link+"'");
    }function OverItems(item)
    {
    if(this.sliding)
    return;
    item.style.border="1 outset #ffffff";
    }function OutItems(item)
    {
    if(this.sliding)
    return;
    item.style.border="0 none black";
    }function ArrowClicked(arrow)
    {
    if(this.sliding)
    return;
    arrow.style.border="1 inset #ffffff";
    }function ArrowSelected(arrow)
    {
    if(this.sliding)
    return;
    arrow.style.border="0 none black";
    this.SlideItems(arrow.id=="OB_SlideUp");
    }function OverArrow(arrow)
    {
    if(this.sliding)
    return;
    arrow.style.border="1 outset #ffffff";
    }function OutArrow(arrow)
    {
    if(this.sliding)
    return;
    arrow.style.border="0 none black";
    }function ClipFolder(folder,top,right,bottom,left)
    {
    document.all["OB_Folder"+folder].style.clip=clip='rect('+top+' '+right+' '+bottom+' '+left+')';
    }function Start()
    {
    if(!this.started)
    {
    this.ClipFolder(1,0,this.visibleAreaWidth,this.visibleAreaHeight,0);
    this.SetArrows();
    }
    }function SetArrows()
    {
    document.all["OB_SlideUp"].style.pixelTop=document.all["OB_Button"+this.currentFolder].style.pixelTop+document.all["OB_Button"+this.currentFolder].style.pixelHeight+20;
    document.all["OB_SlideUp"].style.pixelLeft=this.width-document.all["OB_SlideUp"].width-this.borderWidth-10;
    document.all["OB_SlideDown"].style.pixelTop=document.all["OB_Button"+this.currentFolder].style.pixelTop+document.all["OB_Button"+this.currentFolder].style.pixelHeight+this.visibleAreaHeight-document.all["OB_SlideDown"].height-20;
    document.all["OB_SlideDown"].style.pixelLeft=this.width-document.all["OB_SlideDown"].width-this.borderWidth-10; var folder=document.all["OB_Folder"+this.currentFolder].style;
    var startTop=document.all["OB_Button"+this.currentFolder].style.pixelTop+document.all["OB_Button"+this.currentFolder].style.pixelHeight; if(folder.pixelTop<startTop)
    document.all["OB_SlideDown"].style.visibility="visible";
    else
    document.all["OB_SlideDown"].style.visibility="hidden"; if(folder.pixelHeight-(startTop-folder.pixelTop)>this.visibleAreaHeight)
    document.all["OB_SlideUp"].style.visibility="visible";
    else
    document.all["OB_SlideUp"].style.visibility="hidden";
    }function HideArrows()
    {
    document.all["OB_SlideUp"].style.visibility="hidden";
    document.all["OB_SlideDown"].style.visibility="hidden";
    }function SlideItems(up)
    {
    this.sliding=true;
    this.slideCount=Math.floor(this.slideArrowValue/this.ArrowSlideSpeed);
    up ? this.SlideItemsAction(-this.ArrowSlideSpeed) : this.SlideItemsAction(this.ArrowSlideSpeed);
    }function SlideItemsAction(value)
    {
    document.all["OB_Folder"+this.currentFolder].style.pixelTop+=value;
        filter = /rect\((\d*)px (\d*)px (\d*)px (\d*)px\)/;
        var clipString=document.all["OB_Folder"+this.currentFolder].style.clip;
        var clip=clipString.match(filter);
        this.ClipFolder(this.currentFolder,(parseInt(clip[1])-value),parseInt(clip[2]),(parseInt(clip[3])-value),parseInt(clip[4]));
    this.slideCount--;
    if(this.slideCount>0)
    setTimeout("OutlookLikeBar.SlideItemsAction("+value+")",20);
    else
    {
    if(Math.abs(value)*this.ArrowSlideSpeed!=this.slideArrowValue)
    {
    document.all["OB_Folder"+this.currentFolder].style.pixelTop+=(value/Math.abs(value)*(this.slideArrowValue%this.ArrowSlideSpeed));
        filter = /rect\((\d*)px (\d*)px (\d*)px (\d*)px\)/;
    var clipString=document.all["OB_Folder"+this.currentFolder].style.clip;
    var clip=clipString.match(filter);
        this.ClipFolder(this.currentFolder,(parseInt(clip[1])-(value/Math.abs(value)*(this.slideArrowValue%this.ArrowSlideSpeed))),parseInt(clip[2]),(parseInt(clip[3])-(value/Math.abs(value)*(this.slideArrowValue%this.ArrowSlideSpeed))),parseInt(clip[4]));
    }
    this.SetArrows();
    this.sliding=false;
    }
    }
      

  2.   

    第3个文件(上):var selectedItem = null;var targetWin;document.onclick = handleClick;
    document.onmouseover = handleOver;
    document.onmouseout = handleOut;
    document.onmousedown = handleDown;
    document.onmouseup = handleUp;document.write(writeSubPadding(10));  //write the stylesheet for the sub. Getting the indention rightfunction handleClick() {
    el = getReal(window.event.srcElement, "tagName", "DIV"); if ((el.className == "topFolder") || (el.className == "subFolder")) {
    el.sub = eval(el.id + "Sub");
    if (el.sub.style.display == null) el.sub.style.display = "none";
    if (el.sub.style.display != "block") {
    if (el.parentElement.openedSub != null) {
    var opener = eval(el.parentElement.openedSub + ".opener");
    hide(el.parentElement.openedSub);
    if (opener.className == "topFolder")
    outTopItem(opener);
    }
    el.sub.style.display = "block";
    el.sub.parentElement.openedSub = el.sub.id;
    el.sub.opener = el;
    }
    else {
    if (el.sub.openedSub != null) hide(el.sub.openedSub);
    else hide(el.sub.id);
    }
    } if ((el.className == "subItem") || (el.className == "subFolder")) {
    if (selectedItem != null)
    restoreSubItem(selectedItem);
    highlightSubItem(el);
    } if ((el.className == "topItem") || (el.className == "topFolder")) {
    if (selectedItem != null)
    restoreSubItem(selectedItem);
    } if ((el.className == "topItem") || (el.className == "subItem")) {
    if ((el.href != null) && (el.href != "")) {
    if ((el.target == null) || (el.target == "")) {
    if (window.opener == null) {
    // alert(document.all.tags("BASE").item(0));
    if (document.all.tags("BASE").item(0) != null)
    // eval(document.all.tags("BASE").item(0).target + ".location = el.href");
    window.open(el.href, document.all.tags("BASE").item(0).target);
    else
    window.location = el.href; // HERE IS THE LOADING!!!
    }
    else {
    window.opener.location =  el.href;
    }
    }
    else {
    window.open(el.href, el.target);
    // eval(el.target + ".location = el.href");
    }
    }
    } var tmp  = getReal(el, "className", "favMenu");
    if (tmp.className == "favMenu") fixScroll(tmp);}function handleOver() {
    var fromEl = getReal(window.event.fromElement, "tagName", "DIV");
    var toEl = getReal(window.event.toElement, "tagName", "DIV");
    if (fromEl == toEl) return; el = toEl; if ((el.className == "topFolder") || (el.className == "topItem")) overTopItem(el);
    if ((el.className == "subFolder") || (el.className == "subItem")) overSubItem(el); if ((el.className == "topItem") || (el.className == "subItem")) {
    if (el.href != null) {
    if (el.oldtitle == null) el.oldtitle = el.title;
    if (el.oldtitle != "")
    el.title = el.oldtitle + "\n" + el.href;
    else
    el.title = el.oldtitle + el.href;
    }
    } if (el.className == "scrollButton") overscrollButton(el);
    }function handleOut() {
    var fromEl = getReal(window.event.fromElement, "tagName", "DIV");
    var toEl = getReal(window.event.toElement, "tagName", "DIV");
    if (fromEl == toEl) return; el = fromEl; if ((el.className == "topFolder") || (el.className == "topItem")) outTopItem(el);
    if ((el.className == "subFolder") || (el.className == "subItem")) outSubItem(el);
    if (el.className == "scrollButton") outscrollButton(el);
    }function handleDown() {
    el = getReal(window.event.srcElement, "tagName", "DIV"); if (el.className == "scrollButton") {
    downscrollButton(el);
    var  = Math.max(el.id.indexOf("Up"), el.id.indexOf("Down"));
    var type = el.id.substr();
    var menuID = el.id.substring(0,);
    eval("scroll" + type + "(" + menuID + ")");
    }
    }function handleUp() {
    el = getReal(window.event.srcElement, "tagName", "DIV"); if (el.className == "scrollButton") {
    upscrollButton(el);
    window.clearTimeout(scrolltimer);
    }
    }////////////////////// EVERYTHING IS HANDLED ////////////////////////////function hide(elID) {
    var el = eval(elID);
    el.style.display = "none";
    el.parentElement.openedSub = null;
    if (el.openedSub != null) hide(el.openedSub);
    }function writeSubPadding(depth) {
    var str, str2, val; var str = "<style type='text/css'>\n"; for (var i=0; i < depth; i++) {
    str2 = "";
    val  = 0;
    for (var j=0; j < i; j++) {
    str2 += ".sub "
    val += 22;
    }
    str += str2 + ".subFolder {padding-left: " + val + "px;}\n";
    str += str2 + ".subItem   {padding-left: " + val + "px;}\n";
    } str += "</style>\n";
    return str;
    }
    function overTopItem(el) {
    with (el.style) {
    background   = "buttonface";
    borderLeft   = "1px solid buttonhighlight";
    borderRight  = "1px solid buttonshadow";
    borderTop    = "1px solid buttonhighlight";
    borderBottom = "1px solid buttonshadow";
    paddingBottom = "2px";
    }
    }
      

  3.   

    [email protected]
    已经发出,请收信
      

  4.   

    注释代码已经在Email里发出,请接收