Team:Tsinghua/leftbar

From 2010.igem.org

(Difference between revisions)
Line 28: Line 28:
<p id="firstline">Until the Jamboree</p>
<p id="firstline">Until the Jamboree</p>
<p><span id="pretimes" class="countdown"></span></p>
<p><span id="pretimes" class="countdown"></span></p>
-
<span id="times" class="countdown">...</span>
+
<span id="times" class="countdown"></span>
<script type="text/javascript">
<script type="text/javascript">
var now = new Date();
var now = new Date();
Line 51: Line 51:
if(grt>=now)
if(grt>=now)
{
{
-
if(dnum>0)
+
    if(dnum>0)
-
{
+
    {
-
    showtext = dnum+" Days ";
+
        showtext = dnum+" Days ";
-
}
+
    }
-
if(hnum>0)
+
    if(hnum>0)
-
{
+
    {
-
    showtext = showtext + String(hnum) + " Hours ";
+
        showtext = showtext + String(hnum) + " Hours ";
-
}
+
    }
-
if(showtext.length > 15)
+
    if(showtext.length > 15)
-
{
+
    {
-
    document.getElementById("pretimes").style.display = "block";
+
        document.getElementById("pretimes").style.display = "block";
-
     document.getElementById("pretimes").innerHTML = showtext;     
+
        document.getElementById("pretimes").innerHTML = showtext;   
-
     showtext = "";
+
        showtext = "";
 +
     }
 +
    else
 +
    {
 +
        document.getElementById("pretimes").style.display = "none";
 +
    }
 +
    if(mnum>0)
 +
    {
 +
        showtext = showtext + String(mnum) + " Minutes ";
 +
    }
 +
    if(showtext.length > 25)
 +
    {
 +
        document.getElementById("pretimes").style.display = "block";
 +
        document.getElementById("pretimes").innerHTML = showtext;     
 +
        showtext = "";
 +
     }
 +
 
 +
    if(snum>0)
 +
    {
 +
        showtext = showtext + String(snum) + " Seconds ";
 +
    }
 +
    document.getElementById("times").innerHTML = showtext;
}
}
else
else
{
{
-
    document.getElementById("pretimes").style.display = "none";
+
        document.getElementById("firstline").innerHTML = "Jamboree!";
-
}
+
        document.getElementById("firstline").style.color = "#F33";
-
if(mnum>0)
+
-
{
+
-
    showtext = showtext + String(mnum) + " Minutes ";
+
-
}
+
-
if(showtext.length > 25)
+
-
{
+
-
    document.getElementById("pretimes").style.display = "block";
+
-
    document.getElementById("pretimes").innerHTML = showtext;   
+
-
    showtext = "";
+
}
}
-
if(snum>0)
 
-
{
 
-
    showtext = showtext + String(snum) + " Seconds ";
 
-
}
 
-
document.getElementById("times").innerHTML = showtext;
 
-
}
 
-
else
 
-
{
 
-
    document.getElementById("firstline").innerHTML = "Jamboree!";
 
-
    document.getElementById("firstline").style.color = "#F33";
 
-
}
 
}
}

Revision as of 05:54, 19 July 2010

Visitor Locations

Locations of visitors to this page

Follow us on


Until the Jamboree