Template:Team:HKU-HKBU/script.js

From 2009.igem.org

(Difference between revisions)
YinanZhang (Talk | contribs)
(New page: function loadTopNav() { var tabNames = new Array() tabNames[0] = "Brainstorming"; tabNames[1] = "Team"; tabNames[2] = "Gallery"; tabNames[3] = "Calendar"; tabNames[4] = "Human ...)
Newer edit →

Revision as of 12:03, 8 October 2009

function loadTopNav() {

 var tabNames = new Array()
 tabNames[0] = "Brainstorming";
 tabNames[1] = "Team";
 tabNames[2] = "Gallery";
 tabNames[3] = "Calendar";
 tabNames[4] = "Human Practice";
 tabNames[5] = "Acknowledgements";
 tabNames[6] = "Contact";
 var tabWidths = new Array(112, 40, 64, 72, 120, 136, 64);
 var leftWidth = 325;
 var rightWidth = 6;
 var seperWidth = 2;
 var i = 0;
 document.write("\
\
");
 for (i in tabNames) {
   var pageName = tabNames[i].replace(/ /g, "_").toLowerCase();
   document.write("\
\
\
       <a href=\"" + pageName + ".html\">" + tabNames[i] + "</a>\
");
 }
document.write("
");

}

function loadLeftNav() {

 var majorTabNames = new Array()
 majorTabNames[0] = "Home";
 majorTabNames[1] = "Overview";
 majorTabNames[2] = "Parts";
 majorTabNames[3] = "Modeling";
 majorTabNames[4] = "Strain Selection";
 majorTabNames[5] = "Motor";
 majorTabNames[6] = "Polar Expression";
 majorTabNames[7] = "Speed Control";
 var minorTabNumbers = new Array(0, 0, 0, 0, 0, 3, 4, 4);
 var minorTabNames = new Array()
 minorTabNames[0] = "Design";
 minorTabNames[1] = "Experiments";
 minorTabNames[2] = "Protocols";
 minorTabNames[3] = "Design";
 minorTabNames[4] = "Parts";
 minorTabNames[5] = "Experiments";
 minorTabNames[6] = "Protocols";
 minorTabNames[7] = "Design";
 minorTabNames[8] = "Parts";
 minorTabNames[9] = "Experiments";
 minorTabNames[10] = "Protocols";
 var majorSeperHeight = 12;
 var minorSeperHeight = 2;
 var i = 0;
 var j = 0;
 var minorTabCount = 0;
 for (i in majorTabNames) {
document.write("
");
   if (minorTabNumbers[i] > 0) {
document.write("
" + majorTabNames[i].toUpperCase() + "
");
     for (minorTabCount = 0; minorTabCount < minorTabNumbers[i]; ++minorTabCount) {
       var pageName = (majorTabNames[i] + " " + minorTabNames[j]).replace(/ /g, "_").toLowerCase();
       document.write("\
\
\
           <a href=\"" + pageName + ".html\">" + minorTabNames[j] + "</a>\
");
       ++j;
     }
   } else {
     var pageName = majorTabNames[i].replace(/ /g, "_").toLowerCase();
     document.write("\
\
         <a href=\"" + pageName + ".html\">" + majorTabNames[i].toUpperCase() + "</a>\
");
   }
 }
document.write("
");

}

function loadLogos() {

 var pictureNames = new Array();
 pictureNames[0] = "HKU";
 pictureNames[1] = "HKU_medicine";
 pictureNames[2] = "HKU_biochem";
 pictureNames[3] = "HKU_science";
 pictureNames[4] = "HKBU";
 pictureNames[5] = "HKBU_science";
 pictureNames[6] = "HKBU_physics";
 pictureNames[7] = "biorad";
 pictureNames[8] = "delta";
 pictureNames[9] = "genetimes";
 pictureNames[10] = "invitrogen";
 var alts = new Array();
 alts[0] = "The University of Hong Kong";
 alts[1] = "The University of Hong Kong Li Ka Shing Faculty of Medicine";
 alts[2] = "Department of Biochemistry, The University of Hong Kong";
 alts[3] = "Faculty of Science, The University of Hong Kong";
 alts[4] = "Hong Kong Baptist University";
 alts[5] = "Faculty of Science, Hong Kong Baptist University";
 alts[6] = "Department of Physics, Hong Kong Baptist University";
 alts[7] = "Bio-Rad Laboratories";
 alts[8] = "Delta Air Lines - Airline Tickets and Airfare to Worldwide Destinations";
 alts[9] = "Genetimes Technology, Inc.";
 alts[10] = "Invitrogen.com a Provider of Essential Life Science Technologies";
 var URLs = new Array()
 URLs[0] = "http://www.hku.hk/";
 URLs[1] = "http://www.hku.hk/facmed/";
 URLs[2] = "http://www.hku.hk/biochem/";
 URLs[3] = "http://www.hku.hk/science/";
 URLs[4] = "http://www.hkbu.edu.hk/";
 URLs[5] = "http://www.sci.hkbu.edu.hk/";
 URLs[6] = "http://physics.hkbu.edu.hk/";
 URLs[7] = "http://www.bio-rad.com/";
 URLs[8] = "http://www.delta.com/";
 URLs[9] = "http://www.genetimes.com.cn/";
 URLs[10] = "http://www.invitrogen.com/";
 var i = 0;
 for (i in pictureNames)
   document.write("\
<a href=\"" + URLs[i] + "\">\
       <img class=\"sponsorlogo\" src=\"HKU-HKBU_" + pictureNames[i] + "_240_60.png\" alt=\"" + alts[i] + "\" />\
</a>
");

}