Template:Team:HKU-HKBU/script.js

From 2009.igem.org

(Difference between revisions)
Line 45: Line 45:
}
}
-
function LeftTab(topSpaceHeight, topLineHeight, bottomLineHeight, level, text, filename)
+
function LeftTab(topSpaceHeight, topLineHeight, bottomLineHeight, level, text, filename, jumpOut)
{
{
   this.topSpaceHeight = topSpaceHeight;
   this.topSpaceHeight = topSpaceHeight;
Line 53: Line 53:
   this.text = text;
   this.text = text;
   this.address = "https://2009.igem.org/Team:HKU-HKBU/" + filename;
   this.address = "https://2009.igem.org/Team:HKU-HKBU/" + filename;
 +
  this.jumpOut = jumpOut;
   this.isCurrentPage = isCurrentPage;
   this.isCurrentPage = isCurrentPage;
Line 90: Line 91:
     <div class=\"block\" style=\"background-color:black;height:" + this.topLineHeight + "px\"></div>\
     <div class=\"block\" style=\"background-color:black;height:" + this.topLineHeight + "px\"></div>\
     <div class=\"" + this.levelClass() + (this.isCurrentPage() ? "sel" : "") + "\">\
     <div class=\"" + this.levelClass() + (this.isCurrentPage() ? "sel" : "") + "\">\
-
       <a href=\"" + this.address + "\">" + this.indent() + this.text + "</a>\
+
       <a href=\"" + this.address + "\"" + (this.jumpOut ? " target=\"_blank\"" : "") + ">" + this.indent() + this.text + "</a>\
     </div>\
     </div>\
     <div class=\"block\" style=\"background-color:black;height:" + this.bottomLineHeight + "px\"></div>");
     <div class=\"block\" style=\"background-color:black;height:" + this.bottomLineHeight + "px\"></div>");
Line 99: Line 100:
   var tabs = new Array();
   var tabs = new Array();
-
   tabs[0] = new LeftTab(12, 0, 2, 0, "HOME", "Home");
+
   tabs[0] = new LeftTab(12, 0, 2, 0, "HOME", "Home", false);
-
   tabs[1] = new LeftTab(12, 0, 2, 0, "PROJECT", "Project");
+
   tabs[1] = new LeftTab(12, 0, 2, 0, "PROJECT", "Project", false);
-
   tabs[2] = new LeftTab(0, 0, 1, 1, "Parts", "Parts");
+
   tabs[2] = new LeftTab(0, 0, 1, 1, "Parts", "", true);
-
   tabs[3] = new LeftTab(0, 0, 1, 1, "Micro-Motor", "Motor_Overview");
+
   tabs[3] = new LeftTab(0, 0, 1, 1, "Micro-Motor", "Motor_Overview", false);
-
   tabs[4] = new LeftTab(0, 0, 0, 2, "Overview", "Motor_Overview");
+
   tabs[4] = new LeftTab(0, 0, 0, 2, "Overview", "Motor_Overview", false);
-
   tabs[5] = new LeftTab(0, 0, 0, 2, "Membrane Version", "Motor_Membrane_Version");
+
   tabs[5] = new LeftTab(0, 0, 0, 2, "Membrane Version", "Motor_Membrane_Version", false);
-
   tabs[6] = new LeftTab(0, 0, 0, 2, "Silicon Version", "Motor_Silicon_Version");
+
   tabs[6] = new LeftTab(0, 0, 0, 2, "Silicon Version", "Motor_Silicon_Version", false);
-
   tabs[7] = new LeftTab(0, 0, 1, 2, "Methodology", "Motor_Methodology");
+
   tabs[7] = new LeftTab(0, 0, 1, 2, "Methodology", "Motor_Methodology", false);
-
   tabs[8] = new LeftTab(0, 0, 1, 1, "Polar Expression", "Polar_Expression_Design");
+
   tabs[8] = new LeftTab(0, 0, 1, 1, "Polar Expression", "Polar_Expression_Design", false);
-
   tabs[9] = new LeftTab(0, 0, 0, 2, "Design", "Polar_Expression_Design");
+
   tabs[9] = new LeftTab(0, 0, 0, 2, "Design", "Polar_Expression_Design", false);
-
   tabs[10] = new LeftTab(0, 0, 0, 2, "Results", "Polar_Expression_Results");
+
   tabs[10] = new LeftTab(0, 0, 0, 2, "Results", "Polar_Expression_Results", false);
-
   tabs[11] = new LeftTab(0, 0, 1, 2, "Methodology", "Polar_Expression_Methodology");
+
   tabs[11] = new LeftTab(0, 0, 1, 2, "Methodology", "Polar_Expression_Methodology", false);
-
   tabs[12] = new LeftTab(0, 0, 1, 1, "Speed Control", "Speed_Control_Design");
+
   tabs[12] = new LeftTab(0, 0, 1, 1, "Speed Control", "Speed_Control_Design", false);
-
   tabs[13] = new LeftTab(0, 0, 0, 2, "Design", "Speed_Control_Design");
+
   tabs[13] = new LeftTab(0, 0, 0, 2, "Design", "Speed_Control_Design", false);
-
   tabs[14] = new LeftTab(0, 0, 0, 2, "Results", "Speed_Control_Results");
+
   tabs[14] = new LeftTab(0, 0, 0, 2, "Results", "Speed_Control_Results", false);
-
   tabs[15] = new LeftTab(0, 0, 1, 2, "Methodology", "Speed_Control_Methodology");
+
   tabs[15] = new LeftTab(0, 0, 1, 2, "Methodology", "Speed_Control_Methodology", false);
-
   tabs[16] = new LeftTab(0, 0, 1, 1, "Modeling", "Modeling");
+
   tabs[16] = new LeftTab(0, 0, 1, 1, "Modeling", "Modeling", false);
-
   tabs[17] = new LeftTab(0, 0, 0, 1, "Applications", "Applications");
+
   tabs[17] = new LeftTab(0, 0, 0, 1, "Applications", "Applications", false);
-
   tabs[18] = new LeftTab(12, 0, 2, 0, "HUMAN PRACTICE", "Human_Practice");
+
   tabs[18] = new LeftTab(12, 0, 2, 0, "HUMAN PRACTICE", "Human_Practice", false);
-
   tabs[19] = new LeftTab(0, 0, 1, 1, "Questionnaire", "Human_Practice_Questionnaire");
+
   tabs[19] = new LeftTab(0, 0, 1, 1, "Questionnaire", "Human_Practice_Questionnaire", false);
-
   tabs[20] = new LeftTab(0, 0, 1, 1, "Website", "Human_Practice_Website");
+
   tabs[20] = new LeftTab(0, 0, 1, 1, "Website", "Human_Practice_Website", false);
-
   tabs[21] = new LeftTab(0, 0, 1, 1, "Interview", "Human_Practice_Interview");
+
   tabs[21] = new LeftTab(0, 0, 1, 1, "Interview", "Human_Practice_Interview", false);
-
   tabs[22] = new LeftTab(0, 0, 0, 1, "Lecture", "Human_Practice_Lecture");
+
   tabs[22] = new LeftTab(0, 0, 0, 1, "Lecture", "Human_Practice_Lecture", false);
 +
  tabs[2].address = "http://partsregistry.org/cgi/partsdb/pgroup.cgi?pgroup=iGEM2009&group=HKU-HKBU";
   var i = 0;
   var i = 0;
   for (i in tabs)
   for (i in tabs)

Revision as of 09:39, 16 October 2009