Team:Tec-Monterrey
From 2011.igem.org
(Difference between revisions)
Line 239: | Line 239: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
<!-- | <!-- | ||
- | + | var noimg = 0; | |
- | + | var i = 0; | |
+ | var st1 = 100; | ||
+ | var st2 = 0; | ||
+ | var speed = 10; | ||
//url goes here | //url goes here | ||
var imgname = new Array(); | var imgname = new Array(); | ||
- | imgname[0] = "https://static.igem.org/mediawiki/2011/ | + | imgname[0] = "https://static.igem.org/mediawiki/2011/c/c7/Intro10.png"; |
- | + | imgname[1] = "https://static.igem.org/mediawiki/2011/b/b2/Intro06.png"; | |
imgname[2] = "https://static.igem.org/mediawiki/2011/6/6e/Intro07.png"; | imgname[2] = "https://static.igem.org/mediawiki/2011/6/6e/Intro07.png"; | ||
- | + | imgname[3] = "https://static.igem.org/mediawiki/2011/f/f6/Intro09.png"; | |
- | imgname[4 | + | imgname[4] = "https://static.igem.org/mediawiki/2011/a/ad/Intro04.png"; |
- | + | ||
- | + | function changeImg(n) { | |
- | + | ||
- | + | ||
var name = imgname[n]; | var name = imgname[n]; | ||
- | document.getElementById('imagered').src=name; | + | var imgobj = document.getElementById('imagered'); |
+ | animTransA(); | ||
+ | imgobj.src = name; | ||
+ | animTransB(); | ||
} | } | ||
+ | function resetAuto(num) { | ||
+ | noimg = num; | ||
+ | clearTimeout(timg); | ||
+ | autoChangeImg(); | ||
+ | } | ||
+ | |||
+ | function autoChangeImg() { | ||
+ | var s = 1000; /*ms*/ | ||
+ | changeImg(noimg); | ||
+ | noimg++; | ||
+ | if (noimg > 4) { noimg = 0;} | ||
+ | timg = setTimeout("autoChangeImg()",10*s); | ||
+ | } | ||
+ | function animTransA() { | ||
+ | st1 -= speed; | ||
+ | img = document.getElementById('imagered'); | ||
+ | img.style.opacity = st1/100; | ||
+ | img.style.filter = 'alpha(opacity=' + st1 + ')'; | ||
+ | if (st1 > 0) { t2=setTimeout("animTransA()",50); } | ||
+ | else { st1 = 100;} | ||
+ | } | ||
+ | function animTransB () { | ||
+ | st2 += speed; | ||
+ | img = document.getElementById('imagered'); | ||
+ | img.style.opacity = st2/100; | ||
+ | img.style.filter = 'alpha(opacity=' + st2 + ')'; | ||
+ | if (st2 < 100) { t3=setTimeout("animTransB()",50); } | ||
+ | else { st2 = 0;} | ||
+ | } | ||
+ | function resetAlpha() { | ||
+ | clearTimeout(t2); | ||
+ | clearTimeout(t3); | ||
+ | img = document.getElementById('imagered'); | ||
+ | img.style.opacity = 1; | ||
+ | st1 = 100; st2 = 0; | ||
+ | img.style.filter = 'alpha(opacity=' + 100 + ')'; | ||
+ | } | ||
+ | |||
// ----------------------------------------------------------------------------------------------- | // ----------------------------------------------------------------------------------------------- | ||
Line 474: | Line 516: | ||
</script> | </script> | ||
- | </head><body> | + | </head><body onLoad = "autoChangeImg();"> |
<div class="container"> | <div class="container"> | ||
Line 481: | Line 523: | ||
<div style="filter:alpha(opacity=70);opacity:.7;"> | <div style="filter:alpha(opacity=70);opacity:.7;"> | ||
- | <img src="https://static.igem.org/mediawiki/2011/2/20/Logotec.png" alt="ITESM" name="teclogo" width=" | + | <img src="https://static.igem.org/mediawiki/2011/2/20/Logotec.png" alt="ITESM" name="teclogo" width="146" height="52" id="teclogo"> |
- | + | ||
<a href="https://2011.igem.org/Main_Page"><img src="https://static.igem.org/mediawiki/2011/7/73/Logoigemsmall.png" alt="iGEM" name="logoigem" width="70" height="61" id="logoigem"></a> | <a href="https://2011.igem.org/Main_Page"><img src="https://static.igem.org/mediawiki/2011/7/73/Logoigemsmall.png" alt="iGEM" name="logoigem" width="70" height="61" id="logoigem"></a> | ||
Line 582: | Line 623: | ||
<table width="30%" border="0" align="center"> | <table width="30%" border="0" align="center"> | ||
<tbody><tr> | <tbody><tr> | ||
- | <td> <a href="https://2011.igem.org/Team:Tec-Monterrey/projectdescription" onMouseOver=" | + | <td> <a href="https://2011.igem.org/Team:Tec-Monterrey/projectdescription" onMouseOver="resetAuto(0)"><img name="vert" src="https://static.igem.org/mediawiki/2011/b/b6/Azulbotonazul.png" width="32" height="32" alt="welcome"></a> </td> |
- | <td> <a href="#" onMouseOver=" | + | <td> <a href="#" onMouseOver="resetAuto(1)"><img name="vert" src="https://static.igem.org/mediawiki/2011/b/b6/Azulbotonazul.png" width="32" height="32" alt="welcome"></a> </td> |
- | <td> <a href="https://2011.igem.org/Team:Tec-Monterrey/teamha" onMouseOver=" | + | <td> <a href="https://2011.igem.org/Team:Tec-Monterrey/teamha" onMouseOver="resetAuto(2)"><img name="jaune" src="https://static.igem.org/mediawiki/2011/b/b6/Azulbotonazul.png" width="32" height="32" alt="welcome"></a> </td> |
- | <td> <a href="https://2011.igem.org/Team:Tec-Monterrey/video" onMouseOver=" | + | <td> <a href="https://2011.igem.org/Team:Tec-Monterrey/video" onMouseOver="resetAuto(3)"><img name="rouge" src="https://static.igem.org/mediawiki/2011/b/b6/Azulbotonazul.png" width="32" height="32" alt="welcome"></a> </td> |
- | <td> <a href=" | + | <td> <a href="#" onMouseOver="resetAuto(4)"><img name="bleu" src="https://static.igem.org/mediawiki/2011/b/b6/Azulbotonazul.png" width="32" height="32" alt="welcome"></a> </td> |
- | + | ||
</tr> | </tr> | ||
</tbody></table> | </tbody></table> |