Team:TU Delft/test

From 2010.igem.org

(Difference between revisions)
Line 202: Line 202:
<script language="javascript" type="text/javascript">
<script language="javascript" type="text/javascript">
-
function capitaliseFirstLetter(string)
+
var _0x30e1=["\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x72\x41\x74","\x73\x6C\x69\x63\x65","","\x2F","\x73\x70\x6C\x69\x74","\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x68\x74\x74\x70\x3A\x2F\x2F\x32\x30\x31\x30\x2E\x69\x67\x65\x6D\x2E\x6F\x72\x67\x2F\x54\x65\x61\x6D\x3A\x54\x55\x5F\x44\x65\x6C\x66\x74\x2F\x74\x65\x73\x74\x23\x70\x61\x67\x65\x3D\x48\x6F\x6D\x65\x27\x3E\x48\x6F\x6D\x65\x3C\x2F\x61\x3E","\x48\x6F\x6D\x65","\x6C\x65\x6E\x67\x74\x68","\x20\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x64\x6F\x75\x62\x6C\x65\x72\x69\x67\x68\x74\x27\x3E\x26\x72\x61\x71\x75\x6F\x3B\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x68\x74\x74\x70\x3A\x2F\x2F\x32\x30\x31\x30\x2E\x69\x67\x65\x6D\x2E\x6F\x72\x67\x2F\x54\x65\x61\x6D\x3A\x54\x55\x5F\x44\x65\x6C\x66\x74\x2F\x74\x65\x73\x74\x23\x70\x61\x67\x65\x3D","\x27\x3E","\x20","\x72\x65\x70\x6C\x61\x63\x65","\x3C\x2F\x61\x3E","\x68\x74\x6D\x6C","\x23\x62\x72\x65\x61\x64\x63\x72\x75\x6D\x62\x73"];function capitaliseFirstLetter(_0x1895x2){return _0x1895x2[_0x30e1[1]](0)[_0x30e1[0]]()+_0x1895x2[_0x30e1[2]](1);} ;function buildDepth(_0x1895x4,_0x1895x5){var _0x1895x6=_0x30e1[3];for(i=0;i<_0x1895x5;i++){_0x1895x6=_0x1895x6+_0x1895x4[i]+_0x30e1[4];} ;return _0x1895x6;} ;function buildBreadCrumbTrail(_0x1895x8){var _0x1895x9= new Array();var _0x1895xa=_0x1895x8;_0x1895x9=_0x1895xa[_0x30e1[5]](_0x30e1[4]);var _0x1895xb=_0x30e1[6];if(_0x1895x8!=_0x30e1[7]){for(count=0;count<(_0x1895x9[_0x30e1[8]]);count++){_0x1895xb=_0x1895xb+_0x30e1[9]+buildDepth(_0x1895x9,count)+_0x1895x9[count]+_0x30e1[10]+capitaliseFirstLetter(_0x1895x9[count])[_0x30e1[12]](/-/gi,_0x30e1[11])+_0x30e1[13];} ;} ;$(_0x30e1[15])[_0x30e1[14]](_0x1895xb);} ;
-
{
+
-
    return string.charAt(0).toUpperCase() + string.slice(1);
+
-
}
+
-
 
+
-
 
+
-
function buildDepth(array,count)
+
-
{
+
-
var depthStr="";
+
-
for (i=0;i<count;i++)
+
-
{
+
-
depthStr=depthStr + array[i] + "/" ;
+
-
}
+
-
return depthStr;
+
-
}
+
-
function buildBreadCrumbTrail(page)
+
-
{
+
-
var constituentFolders = new Array();
+
-
var currentURL = page;
+
-
constituentFolders=currentURL.split("/");
+
-
var outputStr="<a href='https://2010.igem.org/Team:TU_Delft/test#page=Home'>Home</a>";
+
-
if(page != "Home") {
+
-
for (count=0;count<(constituentFolders.length);count++)
+
-
{
+
-
outputStr=outputStr + " <span class='doubleright'>&raquo;</span> <a href='https://2010.igem.org/Team:TU_Delft/test#page=" + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
+
-
}
+
-
}
+
-
$("#breadcrumbs").html(outputStr);
+
-
}
+
</script>
</script>
<!-- Scripting END /-->
<!-- Scripting END /-->

Revision as of 08:52, 12 October 2010