    var d = document;
    
    function $(id, f){
    	return eval('d.getElementById(id)' + (f? '.style' : ''));
    }
    

    function swapInt(num){
      num = (num < max-1)?num+1:0; 
      swapCont(num);
    }
      
      
    function swapCont(num){
      i = $("topImg");
      c = $("nCont");
      i.style.background = "url(" + img_src[num] + ")";
      i.title = img_alt[num];
      i.href = img_url[num];
      c.innerHTML = d_html[num];
      $("a" + selN).className = "";
      selN = num;
      $("a" + selN).className = "sel";
    }
    



    function tabObj (){
      this.aSelObj = "";
      this.moveTab = moveTab;
    }
    
    function moveTab (aObj){      
      if (this.aSelObj){
        this.cSelObj = $(this.aSelObj.id + "Cont");
        this.aSelObj.className = "";
        this.cSelObj.style.display = "none";
      }
      this.aObj = aObj;
      this.cObj = $(this.aObj.id + "Cont");
      this.aObj.className = "sel";
      this.cObj.style.display = "block";
      
      this.aSelObj = this.aObj;
    }
    
    
    function show_hide (aObj, divObjId){
      divObj = $(divObjId);
      if (divObj.style.display=="none"){
        divObj.style.display="block";
        aObj.className = "sel";
      } else {
        divObj.style.display="none";
        aObj.className = "";
      }
    }
    
    
    
    
