Coalesys.WebMenu source code(partial)(10)
发表于:2007-06-30来源:作者:点击数:
标签:
writer.CSF_11(}); writer.CSF_11(}); writer.CSF_11(function cswmDiI(id,bgco)); writer.CSF_11({); writer.CSF_11(if(document.getElementById(cswmIcoOn+id))); writer.CSF_11({); writer.CSF_11(document.getElementById(cswmIco+id).style.display=inli
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("function cswmDiI(id,bgco)");
writer.CSF_11("{");
writer.CSF_11("if(document.getElementById("cswmIcoOn"+id))");
writer.CSF_11("{");
writer.CSF_11("document.getElementById("cswmIco"+id).style.display="inline";");
writer.CSF_11("document.getElementById("cswmIcoOn"+id).style.display="none";");
writer.CSF_11("}");
writer.CSF_11("document.getElementById("cswmItem"+id).style.color="");
writer.CSF_11(local57);
writer.CSF_11("";");
writer.CSF_11("document.getElementById("cswmExpand"+id).style.color="");
writer.CSF_11(local57);
writer.CSF_11("";");
writer.CSF_11("if(bgco!=null)");
writer.CSF_11("{");
writer.CSF_11("document.getElementById("cswmItem"+id).style.backgroundColor=bgco;");
writer.CSF_11("document.getElementById("cswmExpand"+id).style.backgroundColor=bgco;");
writer.CSF_11("}");
writer.CSF_11("else");
writer.CSF_11("{");
writer.CSF_11("document.getElementById("cswmItem"+id).style.backgroundColor="");
writer.CSF_11(local52);
writer.CSF_11("";");
writer.CSF_11("document.getElementById("cswmExpand"+id).style.backgroundColor="");
writer.CSF_11(local52);
writer.CSF_11("";");
writer.CSF_11("}");
writer.CSF_11("if(document.getElementById("cswmExpandIc"+id))");
writer.CSF_11("{");
writer.CSF_11("document.getElementById("cswmExpandIc"+id).src=cswmExIS;");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("function cswmSP(id,itemid)");
writer.CSF_11("{");
writer.CSF_11("if(!itemid)");
writer.CSF_11("{");
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.getElementById(cswmSI));");
writer.CSF_11("cswmSEL=new Number(cswmSE.offsetLeft+cswmXOff+document.getElementsByTagName("body").item(0).offsetLeft);");
writer.CSF_11("cswmSET=new Number(cswmSE.offsetTop+cswmYOff+document.getElementsByTagName("body").item(0).offsetTop);");
writer.CSF_11("cswmSEH=cswmSE.height;");
writer.CSF_11("cswmSEW=cswmSE.width;");
writer.CSF_11("}");
writer.CSF_11("document.getElementById("cswmPopup"+id).style.display="inline";");
writer.CSF_11("cswmPW=document.getElementById("cswmPopup"+id).offsetWidth;");
writer.CSF_11("cswmPH=document.getElementById("cswmPopup"+id).offsetHeight;");
writer.CSF_11("cswmBW=document.width;");
writer.CSF_11("cswmBH=window.innerHeight-15;");
if (!(local50))
writer.CSF_11("cswmSLA=window.pageXOffset;");
if (!(local51))
writer.CSF_11("cswmSTA=window.pageYOffset;");
writer.CSF_11("switch(cswmSPnt)");
writer.CSF_11("{");
writer.CSF_11("case "above":");
writer.CSF_11("cswmPL[cswmPL.length]=cswmSEL;");
writer.CSF_11("cswmPT[cswmPT.length]=cswmSET-cswmPH;");
writer.CSF_11("cswmCA();");
writer.CSF_11("cswmCR();");
writer.CSF_11("break;");
writer.CSF_11("case "below":");
writer.CSF_11("cswmPL[cswmPL.length]=cswmSEL;");
writer.CSF_11("cswmPT[cswmPT.length]=cswmSET+cswmSEH;");
writer.CSF_11("cswmCB();");
writer.CSF_11("cswmCR();");
writer.CSF_11("break;");
writer.CSF_11("case "right":");
writer.CSF_11("cswmPL[cswmPL.length]=cswmSEL+cswmSEW;");
writer.CSF_11("cswmPT[cswmPT.length]=cswmSET;");
writer.CSF_11("cswmCR();");
writer.CSF_11("cswmCB();");
writer.CSF_11("break;");
writer.CSF_11("case "left":");
writer.CSF_11("cswmPL[cswmPL.length]=cswmSEL-cswmPW;");
writer.CSF_11("cswmPT[cswmPT.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.getElementById("cswmPopup"+id).style.left=cswmPL[cswmPL.length-1];");
writer.CSF_11("document.getElementById("cswmPopup"+id).style.top=cswmPT[cswmPT.length-1];");
writer.CSF_11("cswmPI[cswmPI.length]=id;");
writer.CSF_11("}");
writer.CSF_11("else");
writer.CSF_11("{");
writer.CSF_11("cswmPL[cswmPL.length]=document.getElementById("cswmPopup"+cswmPI[cswmPI.length-1]).offsetWidth+cswmPL[cswmPL.length-1]-4;");
writer.CSF_11("cswmPT[cswmPT.length]=document.getElementById("cswmItem"+itemid).offsetTop;");
writer.CSF_11("if(navigator.vendorSub>=6.1)");
writer.CSF_11("{");
writer.CSF_11("cswmPT[cswmPT.length-1]+=document.getElementById("cswmItem"+itemid).offsetParent.offsetTop;");
writer.CSF_11("}");
writer.CSF_11("document.getElementById("cswmPopup"+id).style.display="inline";");
writer.CSF_11("cswmPW=document.getElementById("cswmPopup"+id).offsetWidth;");
writer.CSF_11("cswmPH=document.getElementById("cswmPopup"+id).offsetHeight;");
writer.CSF_11("var cswmPrW=document.getElementById("cswmPopup"+cswmPI[cswmPI.length-1]).offsetWidth;");
writer.CSF_11("cswmAR=cswmBW-cswmPL[cswmPL.length-1]+cswmSLA;");
writer.CSF_11("cswmAB=cswmBH-cswmPT[cswmPT.length - 1]+cswmSTA;");
writer.CSF_11("if(cswmPL[cswmPL.length-2]==cswmSLA){cswmDir="right";}");
writer.CSF_11("if((cswmAR<cswmPW)||(cswmDir=="left"))");
writer.CSF_11("{");
writer.CSF_11("cswmMB=(cswmPL[cswmPL.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("cswmPL[cswmPL.length-1]=cswmMB;");
writer.CSF_11("}");
writer.CSF_11("if(cswmAB<cswmPH)");
writer.CSF_11("{");
writer.CSF_11("cswmMB=cswmPT[cswmPT.length-1]-(cswmPH-cswmAB);");
writer.CSF_11("if(cswmMB<0)");
writer.CSF_11("{");
writer.CSF_11("cswmMB=cswmSTA;");
writer.CSF_11("}");
writer.CSF_11("cswmPT[cswmPT.length-1]=cswmMB;");
writer.CSF_11("}");
writer.CSF_11("document.getElementById("cswmPopup"+id).style.left=cswmPL[cswmPL.length-1];");
writer.CSF_11("document.getElementById("cswmPopup"+id).style.top=cswmPT[cswmPT.length-1];");
writer.CSF_11("cswmPI[cswmPI.length]=id;");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("function cswmHP(level)");
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.getElementById("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(local59))) {
writer.CSF_11("var id = cswmPI[0];");
writer.CSF_11(local59);
writer.CSF_11(";");
}
writer.CSF_11("}");
writer.CSF_11("cswmPI.length=level;");
writer.CSF_11("cswmPL.length=level;");
writer.CSF_11("cswmPT.length=level;");
writer.CSF_11("}");
writer.CSF_11("function cswmCR()");
writer.CSF_11("{");
writer.CSF_11("cswmAR=(cswmBW+cswmSLA)-cswmPL[cswmPL.length-1];");
writer.CSF_11("if(cswmAR<cswmPW)");
writer.CSF_11("{");
writer.CSF_11("if(cswmSPnt=="below"||cswmSPnt=="above")");
writer.CSF_11("{");
writer.CSF_11("cswmMB=cswmPL[cswmPL.length-1]-(cswmPW-cswmAR);");
writer.CSF_11("if(cswmMB<0||cswmMB<cswmSLA)");
writer.CSF_11("{");
writer.CSF_11("cswmMB=cswmSLA;");
writer.CSF_11("}");
writer.CSF_11("cswmPL[cswmPL.length-1]=cswmMB;");
writer.CSF_11("}");
writer.CSF_11("else");
writer.CSF_11("{");
writer.CSF_11("cswmMB=cswmSEL-cswmPW;");
writer.CSF_11("if(cswmMB>=0)");
writer.CSF_11("{");
writer.CSF_11("cswmPL[cswmPL.length-1]=cswmMB;");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("function cswmCL()");
writer.CSF_11("{");
writer.CSF_11("if(cswmPL[cswmPL.length-1]<(cswmSLA))");
writer.CSF_11("{");
writer.CSF_11("cswmPL[cswmPL.length-1]=cswmSEL+cswmSEW;");
writer.CSF_11("cswmCR();");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("function cswmCB()");
writer.CSF_11("{");
writer.CSF_11("cswmAB=(cswmBH+cswmSTA)-cswmPT[cswmPT.length-1];");
writer.CSF_11("if(cswmAB<cswmPH)");
writer.CSF_11("{");
writer.CSF_11("if(cswmSPnt=="below")");
writer.CSF_11("{");
writer.CSF_11("cswmMB=cswmPT[cswmPT.length-1]-cswmPH-cswmSEH;");
writer.CSF_11("if(cswmMB>=0)");
writer.CSF_11("{");
writer.CSF_11("cswmPT[cswmPT.length-1]=cswmMB;");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("else");
writer.CSF_11("{");
writer.CSF_11("cswmMB=cswmPT[cswmPT.length-1]-(cswmPH-cswmAB);");
writer.CSF_11("if(cswmMB<0||cswmMB<cswmSTA)");
writer.CSF_11("{");
writer.CSF_11("cswmMB=cswmSTA;");
writer.CSF_11("}");
writer.CSF_11("cswmPT[cswmPT.length-1]=cswmMB;");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("function cswmCA()");
writer.CSF_11("{");
writer.CSF_11("if(cswmPT[cswmPT.length-1]<(cswmSTA))");
writer.CSF_11("{");
writer.CSF_11("cswmPT[cswmPT.length-1]=cswmSET+cswmSEH;");
writer.CSF_11("cswmCB();");
writer.CSF_11("}");
writer.CSF_11("}");
writer.CSF_11("function cswmShowInFrame(MenuID,x,y)");
writer.CSF_11("{");
writer.CSF_11("x+=window.pageXOffset;");
writer.CSF_11("y+=window.pageYOffset;");
writer.CSF_11("cswmShow(MenuID,@#@#,@#below@#,x,y,1);");
writer.CSF_11("}");
writer.CSF_11("function cswmHideSelectBox()");
writer.CSF_11("{");
writer.CSF_11("}");
writer.CSF_11("function cswmRefresh()");
writer.CSF_11("{");
writer.CSF_11("}
");
writer.CSF_11("//-->
");
}
return;
break;
}
break;
}
}
原文转自:http://www.ltesting.net