window.showCurrentPage = function(){

  /* start: is there a class already defined in the style sheet? */
  var cssRuleExists = false
  css = document.styleSheets[0] || document.styleSheets
  if(css){
    cssobj = css.cssRules || css.rules
    if(cssobj){
      for(var i=0; i<cssobj.length; i++){
        o1 = cssobj[i]; if(o1 && o1.selectorText && o1.selectorText.match){
          if(o1.selectorText.match(/ivCP/)){ i=cssobj.length; cssRuleExists = 1; }
        }
      }
    }
  }
  if(!cssRuleExists){
    var s = ''
    +'#linksarea a.ivCP,#linksarea a:link.ivCP,#linksarea a:visited.ivCP,#linksarea a:active.ivCP,#linksarea a:hover.ivCP'
    +'.ivCP{ background: #000; color: #fff; text-decoration: none; }'
    if(css.insertRule){ css.insertRule(s,css.length); }
    else{ css.cssText = css.cssText + s; }
  }
  /* end: is there a class already defined in the style sheet? */


  obj = document.getElementById('linksarea')
  if(obj && obj.innerHTML){
    arr = obj.getElementsByTagName('a')
    if(arr){
      var current = top.current_file || (window.opener ? window.opener.top.current_file : '');
      if (current) {
        for(var i=0; i<arr.length; i++){
          var o = arr[i];
          if (o.href.indexOf("'"+current+"'") != -1
              || o.href.indexOf("/"+current) != -1) {
            o.className = 'ivCP'
            o.href='javascript:void(0);'
          }
        }
      } else {
        var tmp = '';
        if(location && location.href && location.href.replace){
          tmp = location.href.replace(location.search,'')
        }
        for(var i=0; i<arr.length; i++){
          o = arr[i];
          if(o.href == tmp){
            o.className = 'ivCP'
            o.href='javascript:void(0);'
          }
        }
      }
    }
  }
}

setTimeout('window.showCurrentPage()',1000)
