tvkcl.js 621 B

1234567891011121314151617181920
  1. 
  2. function openShutManager(oSourceObj,oTargetObj,shutAble,oOpenTip,oShutTip){
  3. var sourceObj = typeof oSourceObj == "string" ? document.getElementById(oSourceObj) : oSourceObj;
  4. var targetObj = typeof oTargetObj == "string" ? document.getElementById(oTargetObj) : oTargetObj;
  5. var openTip = oOpenTip || "";
  6. var shutTip = oShutTip || "";
  7. if(targetObj.style.display!="none"){
  8. if(shutAble) return;
  9. targetObj.style.display="none";
  10. if(openTip && shutTip){
  11. sourceObj.innerHTML = shutTip;
  12. }
  13. } else {
  14. targetObj.style.display="block";
  15. if(openTip && shutTip){
  16. sourceObj.innerHTML = openTip;
  17. }
  18. }
  19. }