Team:TU Delft

From 2010.igem.org

(Difference between revisions)
Line 215: Line 215:
<script language="javascript" type="text/javascript">
<script language="javascript" type="text/javascript">
-
var _0x481a=["\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\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(_0x3a74x2){return _0x3a74x2[_0x481a[1]](0)[_0x481a[0]]()+_0x3a74x2[_0x481a[2]](1);} ;function buildDepth(_0x3a74x4,_0x3a74x5){var _0x3a74x6=_0x481a[3];for(i=0;i<_0x3a74x5;i++){_0x3a74x6=_0x3a74x6+_0x3a74x4[i]+_0x481a[4];} ;return _0x3a74x6;} ;function buildBreadCrumbTrail(_0x3a74x8){var _0x3a74x9= new Array();var _0x3a74xa=_0x3a74x8;_0x3a74x9=_0x3a74xa[_0x481a[5]](_0x481a[4]);var _0x3a74xb=_0x481a[6];if(_0x3a74x8!=_0x481a[7]){for(count=0;count<(_0x3a74x9[_0x481a[8]]);count++){_0x3a74xb=_0x3a74xb+_0x481a[9]+buildDepth(_0x3a74x9,count)+_0x3a74x9[count]+_0x481a[10]+capitaliseFirstLetter(_0x3a74x9[count])[_0x481a[12]](/-/gi,_0x481a[11])+_0x481a[13];} ;} ;$(_0x481a[15])[_0x481a[14]](_0x3a74xb);} ;
+
function capitaliseFirstLetter(string)
 +
{
 +
    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='http://2010.igem.org/Team:TU_Delft#page=Home'>Home</a>";
 +
if(page != "Home") {
 +
for (count=0;count<(constituentFolders.length);count++)
 +
{
 +
outputStr=outputStr + " <span class='doubleright'>&raquo;</span> <a href='http://2010.igem.org/Team:TU_Delft#page=" + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
 +
}
 +
}
 +
$("#breadcrumbs").html(outputStr);
 +
}
</script>
</script>
<!-- Scripting END /-->
<!-- Scripting END /-->

Revision as of 10:07, 15 October 2010