Coalesys.WebMenu source code(partial)(2)

发表于:2007-06-30来源:作者:点击数: 标签:
writer.CSF_11(document.cswmSelects=document.getElementsByTagName(select);); writer.CSF_11(}); writer.CSF_11(var iCount=0;); writer.CSF_11(for(iCount=0;iCountdocument.cswmSelects.length;iCount++)); writer.CSF_11({); writer.CSF_11(if(boolHide
writer.CSF_11("document.cswmSelects=document.getElementsByTagName("select");");
    writer.CSF_11("}");
    writer.CSF_11("var iCount=0;");
    writer.CSF_11("for(iCount=0;iCount<document.cswmSelects.length;iCount++)");
    writer.CSF_11("{");
    writer.CSF_11("if(boolHide==true)");
    writer.CSF_11("{");
    writer.CSF_11("document.cswmSelects[iCount].style.visibility="hidden";");
    writer.CSF_11("}");
    writer.CSF_11("if(boolHide==false)");
    writer.CSF_11("{");
    writer.CSF_11("document.cswmSelects[iCount].style.visibility="visible";");
    writer.CSF_11("}");
    writer.CSF_11("}");
    writer.CSF_11("}");
    writer.CSF_11("}");
    writer.CSF_11("function cswmSP(id,itemid)");
    writer.CSF_11("{");
    if (local6)
        writer.CSF_11("cswmHideSelectBox(true);");
    writer.CSF_11("if(!itemid)");
    writer.CSF_11("{");
    local60 = local1;
    switch (local60 - 1) {
        case 0:
            writer.CSF_11("clearTimeout(cswmTTI);");
            break;
        break;
        case 1:
            writer.CSF_11("clearTimeout(cswmTTI);");
        break;
    }
    writer.CSF_11("if(cswmFP)");
    writer.CSF_11("{");
    writer.CSF_11("cswmSEL=cswmXOff;");
    writer.CSF_11("cswmSET=cswmYOff;");
    writer.CSF_11("cswmSEH=1;");
    writer.CSF_11("cswmSEW=1;");
    writer.CSF_11("cswmFP=0;");
    writer.CSF_11("}");
    writer.CSF_11("else");
    writer.CSF_11("{");
    writer.CSF_11("cswmSE=new Object(document.all[cswmSI]);");
    writer.CSF_11("var cswmPrO=cswmSE;");
    writer.CSF_11("var cswmPrT="";");
    writer.CSF_11("cswmSEL=cswmSE.offsetLeft+cswmXOff;");
    writer.CSF_11("cswmSET=cswmSE.offsetTop+cswmYOff;");
    writer.CSF_11("cswmSEH=cswmSE.offsetHeight;");
    writer.CSF_11("cswmSEW=cswmSE.offsetWidth;");
    writer.CSF_11("while(cswmPrT!="BODY")");
    writer.CSF_11("{");
    writer.CSF_11("cswmPrO=cswmPrO.offsetParent;");
    writer.CSF_11("cswmSEL+=cswmPrO.offsetLeft;");
    writer.CSF_11("cswmSET+=cswmPrO.offsetTop;");
    writer.CSF_11("cswmPrT=cswmPrO.tagName;");
    writer.CSF_11("}");
    writer.CSF_11("if(navigator.platform=="MacPPC")");
    writer.CSF_11("{");
    writer.CSF_11("cswmSEL+=Number(document.body.leftMargin);");
    writer.CSF_11("cswmSET+=Number(document.body.topMargin);");
    writer.CSF_11("}");
    writer.CSF_11("}");
    writer.CSF_11("document.all["cswmPopup"+id].style.display="block";");
    writer.CSF_11("cswmPW=document.all["cswmPopup"+id].clientWidth;");
    writer.CSF_11("cswmPH=document.all["cswmPopup"+id].clientHeight;");
    writer.CSF_11("cswmBW=document.body.clientWidth;");
    writer.CSF_11("cswmBH=document.body.clientHeight;");
    if (!(local8))
        writer.CSF_11("cswmSLA=document.body.scrollLeft;");
    if (!(local9))
        writer.CSF_11("cswmSTA=document.body.scrollTop;");
    writer.CSF_11("switch(cswmSPnt)");
    writer.CSF_11("{");
    writer.CSF_11("case "above":");
    writer.CSF_11("cswmPx[cswmPx.length]=cswmSEL;");
    writer.CSF_11("cswmPy[cswmPy.length]=cswmSET-cswmPH;");
    writer.CSF_11("cswmCA();");
    writer.CSF_11("cswmCR();");
    writer.CSF_11("break;");
    writer.CSF_11("case "below":");
    writer.CSF_11("cswmPx[cswmPx.length]=cswmSEL;");
    writer.CSF_11("cswmPy[cswmPy.length]=cswmSET+cswmSEH;");
    writer.CSF_11("cswmCB();");
    writer.CSF_11("cswmCR();");
    writer.CSF_11("break;");
    writer.CSF_11("case "right":");
    writer.CSF_11("cswmPx[cswmPx.length]=cswmSEL+cswmSEW;");
    writer.CSF_11("cswmPy[cswmPy.length]=cswmSET;");
    writer.CSF_11("cswmCR();");
    writer.CSF_11("cswmCB();");
    writer.CSF_11("break;");
    writer.CSF_11("case "left":");
    writer.CSF_11("cswmPx[cswmPx.length]=cswmSEL-cswmPW;");
    writer.CSF_11("cswmPy[cswmPy.length]=cswmSET;");
    writer.CSF_11("cswmCL();");
    writer.CSF_11("cswmCB();");
    writer.CSF_11("cswmDir="left";");
    writer.CSF_11("break;");
    writer.CSF_11("}");
    writer.CSF_11("cswmXOff=0;");
    writer.CSF_11("cswmYOff=0;");
    writer.CSF_11("document.all["cswmPopup"+id].style.left=cswmPx[cswmPx.length-1];");
    writer.CSF_11("document.all["cswmPopup"+id].style.top=cswmPy[cswmPy.length-1];;");
    writer.CSF_11("cswmPI[cswmPI.length]=id;");
    local60 = local1;
    switch (local60 - 1) {
        case 0:
            writer.CSF_11("if(cswmTS==0)");
            writer.CSF_11("{");
            writer.CSF_11("cswmPR=new Object(eval(cswmOM+"cswmPopup"+id));");
            writer.CSF_11("cswmFI(20);");
            writer.CSF_11("cswmTS=1;");
            writer.CSF_11("}");
            writer.CSF_11("else");
            writer.CSF_11("{");
            writer.CSF_11("eval(cswmOM+"cswmPopup"+id+".style.filter=\"alpha(opacity=100\"");");
            writer.CSF_11("}");
            break;
        break;
        case 1:
            writer.CSF_11("if(cswmTS==0)");
            writer.CSF_11("{");
            writer.CSF_11("cswmPR=new Object(eval(cswmOM+"cswmPopup"+id));");
            writer.CSF_11("cswmPixI(30);");
            writer.CSF_11("cswmTS=1;");
            writer.CSF_11("}");
            writer.CSF_11("else");
            writer.CSF_11("{");
            writer.CSF_11("eval(cswmOM+"cswmPopup"+id+".style.filter=\"\"");");
            writer.CSF_11("}");
            break;
        break;
        case 2:
            goto case 3;
        case 3:
            writer.CSF_11("document.all["cswmPopup"+id].style.clip="rect(auto)";");
            writer.CSF_11("if(cswmTS==0)");
            writer.CSF_11("{");
            writer.CSF_11("cswmPR=new Object(document.all["cswmPopup"+id]);");
            writer.CSF_11("cswmSA=true;");
            writer.CSF_11("switch(cswmSPnt)");
            writer.CSF_11("{");
            writer.CSF_11("case "below":");
            writer.CSF_11("cswmSIP=cswmPy[cswmPy.length-1];");
            writer.CSF_11("cswmSS=cswmPH/4;");
            writer.CSF_11("cswmScI(cswmPH);");
            writer.CSF_11("cswmTS=1;");
            writer.CSF_11("break;");
            writer.CSF_11("case "right":");
            writer.CSF_11("cswmSIP=cswmPx[cswmPy.length-1];");
            writer.CSF_11("cswmSS=cswmPW/4;");
            writer.CSF_11("cswmScI(cswmPW);");
            writer.CSF_11("cswmTS=1;");
            writer.CSF_11("break;");
            writer.CSF_11("case "above":");
            writer.CSF_11("cswmSIP=cswmPy[cswmPy.length-1];");
            writer.CSF_11("cswmSS=cswmPH/4;");
            writer.CSF_11("cswmScI(cswmPH);");
            writer.CSF_11("cswmTS=1;");
            writer.CSF_11("break;");
            writer.CSF_11("case "left":");
            writer.CSF_11("cswmSIP=cswmPx[cswmPy.length-1];");
            writer.CSF_11("cswmSS=cswmPW/4;");
            writer.CSF_11("cswmScI(cswmPW);");
            writer.CSF_11("cswmTS=1;");
            writer.CSF_11("break;");
            writer.CSF_11("}");
            writer.CSF_11("}");
        break;
    }
    writer.CSF_11("}");
    writer.CSF_11("else");
    writer.CSF_11("{");
    local60 = local1;
    switch (local60 - 1) {
        case 0:
            writer.CSF_11("eval(cswmOM+"cswmPopup"+id+".style.filter=\"alpha(opacity=100\"");");
            break;
        break;
        case 1:
            writer.CSF_11("eval(cswmOM+"cswmPopup"+id+".style.filter=\"\"");");
            break;
        break;
        case 2:
            goto case 3;
        case 3:
            writer.CSF_11("if(cswmSA==true)");
            writer.CSF_11("{");
            writer.CSF_11("return;");
            writer.CSF_11("}");
        break;
    }
    writer.CSF_11("cswmPx[cswmPx.length]=document.all["cswmPopup"+cswmPI][cswmPI.length-1]].clientWidth+cswmPx[cswmPx.length-1]-4;");
    writer.CSF_11("var szPrE="";");
    writer.CSF_11("if(document.all["cswmItem"+itemid].parentElement.offsetTop==0)");
    writer.CSF_11("{");
    writer.CSF_11("if(navigator.platform=="MacPPC")");
    writer.CSF_11("{");
    writer.CSF_11("var szPrE="parentElement.parentElement.";");
    writer.CSF_11("}");
    writer.CSF_11("else if(document.all["cswmItem"+itemid].parentElement.parentElement.parentElement.parentElement.className!="cswmPopupBox")");
    writer.CSF_11("{");
    writer.CSF_11("var szPrE="parentElement.parentElement.parentElement.";");
    writer.CSF_11("}");
    writer.CSF_11("}");
    writer.CSF_11("cswmPy[cswmPy.length]=eval(cswmOM+"cswmItem"+itemid+".parentElement."+szPrE+"offsetTop")+cswmPy[cswmPy.length-1];");
    writer.CSF_11("document.all["cswmPopup"+id].style.display="block";");
    writer.CSF_11("cswmPW=document.all["cswmPopup"+id].clientWidth;");
    writer.CSF_11("cswmPH=document.all["cswmPopup"+id].clientHeight;");
    writer.CSF_11("var cswmPrW=document.all["cswmPopup"+cswmPI][cswmPI.length-1]].clientWidth;");
    writer.CSF_11("cswmAR=cswmBW-cswmPx[cswmPx.length-1]+cswmSLA;");
    writer.CSF_11("cswmAB=cswmBH-cswmPy[cswmPy.length-1]+cswmSTA;");
    writer.CSF_11("if(cswmPx[cswmPx.length-2]==cswmSLA){cswmDir="right";}");
    writer.CSF_11("if((cswmAR<cswmPW)||(cswmDir=="left"))");
    writer.CSF_11("{");
    writer.CSF_11("cswmMB=(cswmPx[cswmPx.length-1]-cswmPW-cswmPrW)+8;");
    writer.CSF_11("if((cswmMB>=0)&&(cswmMB>cswmSLA))");
    writer.CSF_11("{");
    writer.CSF_11("cswmDir="left";");
    writer.CSF_11("}");
    writer.CSF_11("else");
    writer.CSF_11("{");
    writer.CSF_11("cswmMB=cswmSLA;");
    writer.CSF_11("}");
    writer.CSF_11("cswmPx[cswmPx.length-1]=cswmMB;");
    writer.CSF_11("}");
    writer.CSF_11("if(cswmAB<cswmPH)");
    writer.CSF_11("{");
    writer.CSF_11("cswmMB=cswmPy[cswmPy.length-1]-(cswmPH-cswmAB);");
    writer.CSF_11("if(cswmMB<0)");
    writer.CSF_11("{");
    writer.CSF_11("cswmMB=cswmSTA;");
    writer.CSF_11("}");
    writer.CSF_11("cswmPy[cswmPy.length-1]=cswmMB;");
    writer.CSF_11("}");
    writer.CSF_11("document.all["cswmPopup"+id].style.left=cswmPx[cswmPx.length-1];");
    writer.CSF_11("document.all["cswmPopup"+id].style.top=cswmPy[cswmPy.length-1];");
    writer.CSF_11("cswmPI[cswmPI.length]=id;");
    writer.CSF_11("}");
    if (!(local10))
        goto i1;
    local60 = local1;
    switch (local60 - 1) {
        case 1:
            writer.CSF_11("if(navigator.platform!="MacPPC")");
            writer.CSF_11("{");
            writer.CSF_11("cswmMS(id);");
            writer.CSF_11("}");
        break;
        case 0:
            goto case 3;
        case 2:
            goto case 3;
        case 3:
            i1: writer.CSF_11("}");
            writer.CSF_11("function cswmHP(level)");
            writer.CSF_11("{");
            writer.CSF_11("if(level==0)");
            writer.CSF_11("{");
            if (local6)
                writer.CSF_11("cswmHideSelectBox(false);");
            writer.CSF_11("}");
            writer.CSF_11("var count=level;");
            writer.CSF_11("for(count=level;count<cswmPI.length;count++)");
            writer.CSF_11("{");
            writer.CSF_11("document.all["cswmPopup"+cswmPI][count]].style.display="none";");
            writer.CSF_11("}");
            writer.CSF_11("if(level==0&&cswmPI.length>0)");
            writer.CSF_11("{");
            if (!(Common.CSF_0(local19))) {
                writer.CSF_11("var id = cswmPI[0];");
                writer.CSF_11(local19);
                writer.CSF_11(";");
            }
            writer.CSF_11("}");
            writer.CSF_11("cswmPI.length=level;");
            writer.CSF_11("cswmPx.length=level;");
            writer.CSF_11("cswmPy.length=level;");
            if (!(local10))
                goto i2;
            local60 = local1;
            switch (local60 - 1) {
                case 1:
                    writer.CSF_11("if(navigator.platform!="MacPPC")");
                    writer.CSF_11("{");
                    writer.CSF_11("cswmDS(level);");
                    writer.CSF_11("}");
                

原文转自:http://www.ltesting.net