Team:Freiburg Bioware/Modeling/Structure Modeling
From 2010.igem.org
(Difference between revisions)
Line 3: | Line 3: | ||
{{:Team:Freiburg_Bioware/menu_home}} | {{:Team:Freiburg_Bioware/menu_home}} | ||
<html> | <html> | ||
- | <script> | + | <script language="JavaScript1.1"> |
- | + | <!-- | |
- | + | var locationAfterPreload = "nichtvorhanden.htm" | |
- | + | var lengthOfPreloadBar = 300 | |
- | + | var heightOfPreloadBar = 20 | |
- | + | var yourImages = new Array("https://static.igem.org/mediawiki/2010/0/03/Freiburg10_AAVassem500-100.gif") | |
- | + | ||
- | + | if (document.images) { | |
- | + | var dots = new Array() | |
- | + | dots[0] = new Image(1,1) | |
- | + | dots[0].src = "https://static.igem.org/mediawiki/2010/c/c1/Freiburg10_vorladeng.gif" | |
- | + | dots[1] = new Image(1,1) | |
- | + | dots[1].src = "https://static.igem.org/mediawiki/2010/7/7c/Freiburg10_vorladenr.gif" | |
- | + | var preImages = new Array(),coverage = Math.floor(lengthOfPreloadBar/yourImages.length),currCount = 0 | |
- | + | var loaded = new Array(),i,covered,timerID | |
- | + | var leftOverWidth = lengthOfPreloadBar%coverage | |
- | + | } | |
- | + | function loadImages() { | |
- | + | for (i = 0; i < yourImages.length; i++) { | |
- | + | preImages[i] = new Image() | |
+ | preImages[i].src = yourImages[i] | ||
+ | } | ||
+ | for (i = 0; i < preImages.length; i++) { | ||
+ | loaded[i] = false | ||
+ | } | ||
+ | checkLoad() | ||
+ | } | ||
+ | function checkLoad() { | ||
+ | if (currCount == preImages.length) { | ||
+ | location.replace(locationAfterPreload) | ||
+ | return | ||
+ | } | ||
+ | for (i = 0; i <= preImages.length; i++) { | ||
+ | if (loaded[i] == false && preImages[i].complete) { | ||
+ | loaded[i] = true | ||
+ | eval("document.img" + currCount + ".src=dots[1].src") | ||
+ | currCount++ | ||
+ | } | ||
+ | } | ||
+ | timerID = setTimeout("checkLoad()",10) | ||
+ | } | ||
+ | // --> | ||
+ | </script> | ||
+ | |||
Line 49: | Line 73: | ||
- | + | <script language="JavaScript1.1"> | |
+ | <!-- | ||
+ | if (document.images) { | ||
+ | var preloadBar = '' | ||
+ | for (i = 0; i < yourImages.length-1; i++) { | ||
+ | preloadBar += '<img src="' + dots[0].src + '" width="' + coverage + '" height="' + heightOfPreloadBar + '" name="img' + i + '" align="absmiddle">' | ||
+ | } | ||
+ | preloadBar += '<img src="' + dots[0].src + '" width="' + (leftOverWidth+coverage) + '" height="' + heightOfPreloadBar + '" name="img' + (yourImages.length-1) + '" align="absmiddle">' | ||
+ | document.write(preloadBar) | ||
+ | loadImages() | ||
+ | } | ||
+ | document.write('<p><div align="center"><a href="javascript:window.location=locationAfterPreload">vorladen überspringen</a></div></p>') | ||
+ | // --> | ||
+ | </script> | ||
</html> | </html> | ||
{{:Team:Freiburg_Bioware/Footer}} | {{:Team:Freiburg_Bioware/Footer}} |
Revision as of 01:31, 27 October 2010
Structure Modeling
|
|