﻿

function $() {
  var elements = new Array();

  for (var i = 0; i < arguments.length; i++) {
    var element = arguments[i];
    if (typeof element == 'string')
      element = document.getElementById(element);

    if (arguments.length == 1) 
      return element;

    elements.push(element);
  }

  return elements;
}

function RankList(index){
    var tab1 = $("tab1");
    var tab2 = $("tab2");
    var tab3 = $("tab3");
    var tab4 = $("tab4");
    var tab5 = $("tab5");
    var tab6 = $("tab6");
    if(index==1){
        if(tab1.className != "currenttab1") tab1.className = "activetab1";
    }else if(index==2){
        if(tab2.className != "currenttab2") tab2.className = "activetab2";
    }else if(index==3){
        if(tab3.className != "currenttab3") tab3.className = "activetab3";
    }else if(index==4){ 
        if(tab4.className != "currenttab4") tab4.className = "activetab4";
    }else if(index==5){
        if(tab5.className != "currenttab5") tab5.className = "activetab5";
    }else if(index==6){
        if(tab6.className != "currenttab6") tab6.className = "activetab6";
    }
}
function RankListClick(index) {
    if(index==1) self.location.href="default.aspx";
    if(index==2) self.location.href="go530.aspx";
    if(index==3) self.location.href="personneldetail.aspx?id=91";
    if(index==4) self.location.href="workparkdetail.aspx?id=107";
    if(index==5) self.location.href="workstation.aspx?id=1";
    if(index==6) self.location.href="dvnews.aspx";
}
function RankList2(index){
    var tab1 = $("tab1");
    var tab2 = $("tab2");
    var tab3 = $("tab3");
    var tab4 = $("tab4");
    var tab5 = $("tab5");
    var tab6 = $("tab6");
    if(index==1){
        tab1.className = "currenttab1";
        tab2.className = "noactivetab";
        tab3.className = "noactivetab";
        tab4.className = "noactivetab";
        tab5.className = "noactivetab";
        tab6.className = "noactivetab";
    }
    else if(index==2){
        tab1.className = "noactivetab";
        tab2.className = "currenttab2";
        tab3.className = "noactivetab";
        tab4.className = "noactivetab";
        tab5.className = "noactivetab";
        tab6.className = "noactivetab";
    }
    else if(index==3){
        tab1.className = "noactivetab";
        tab2.className = "noactivetab";
        tab3.className = "currenttab3";
        tab4.className = "noactivetab";
        tab5.className = "noactivetab";
        tab6.className = "noactivetab";
    }
    else if(index==4){
        tab1.className = "noactivetab";
        tab2.className = "noactivetab";
        tab3.className = "noactivetab";
        tab4.className = "currenttab4";
        tab5.className = "noactivetab";
        tab6.className = "noactivetab";
    }
    else if(index==5){
        tab1.className = "noactivetab";
        tab2.className = "noactivetab";
        tab3.className = "noactivetab";
        tab4.className = "noactivetab";
        tab5.className = "currenttab5";
        tab6.className = "noactivetab";
    }else if(index==6){
        tab1.className = "noactivetab";
        tab2.className = "noactivetab";
        tab3.className = "noactivetab";
        tab4.className = "noactivetab";
        tab5.className = "noactivetab";
        tab6.className = "currenttab6";
    }
}
function RankList3(index){
    var tab1 = $("tab1");
    var tab2 = $("tab2");
    var tab3 = $("tab3");
    var tab4 = $("tab4");
    var tab5 = $("tab5");
    var tab6 = $("tab6");
    if(index==1){
        if(tab1.className != "currenttab1") tab1.className = "noactivetab";
    }else if(index==2){
        if(tab2.className != "currenttab2") tab2.className = "noactivetab";
    }else if(index==3){
        if(tab3.className != "currenttab3") tab3.className = "noactivetab";
    }else if(index==4){
        if(tab4.className != "currenttab4") tab4.className = "noactivetab";
    }else if(index==5){
        if(tab5.className != "currenttab5") tab5.className = "noactivetab";
    }else if(index==6){
        if(tab6.className != "currenttab6") tab6.className = "noactivetab";
    }
}
