Template:Sifuentes04

From 2014.igem.org

(Difference between revisions)
Line 283: Line 283:
</style>
</style>
<!-- end of css -->
<!-- end of css -->
 +
 +
 +
 +
<script type="text/javascript">
 +
<!--
 +
var galimgn = 0;
 +
var i = 0;
 +
var st1 = 100;
 +
var st2 = 0;
 +
var speed = 10;
 +
 +
var imgname = new Array();
 +
imgname[0] = "http://2011.igem.org/wiki/images/c/cb/Img022.png";
 +
imgname[1] = "http://2011.igem.org/wiki/images/b/b1/Img021.png";
 +
imgname[2] = "http://2011.igem.org/wiki/images/b/b1/Img021.png";
 +
imgname[3] = "http://2011.igem.org/wiki/images/c/cf/Img020.png";
 +
imgname[4] = "http://2011.igem.org/wiki/images/e/ee/Img019.png";
 +
imgname[5] = "http://2011.igem.org/wiki/images/5/5c/Img018.png";
 +
    imgname[6] = "http://2011.igem.org/wiki/images/b/b6/Img017.png";
 +
    imgname[7] = "http://2011.igem.org/wiki/images/8/84/Img016.png";
 +
    imgname[8] = "http://2011.igem.org/wiki/images/4/4f/Img015.png";
 +
  imgname[9] = "http://2011.igem.org/wiki/images/4/4a/Img014.png";
 +
  imgname[10] = "http://2011.igem.org/wiki/images/a/aa/Img023.png";
 +
imgname[11] = "http://2011.igem.org/wiki/images/e/e4/Img013.png";
 +
imgname[12] = "http://2011.igem.org/wiki/images/5/5a/Img012.png";
 +
imgname[13] = "http://2011.igem.org/wiki/images/b/be/Indiana001.jpg";
 +
imgname[14] = "http://2011.igem.org/wiki/images/e/ec/Indiana002.jpg";
 +
imgname[15] = "http://2011.igem.org/wiki/images/4/4d/Indiana003.jpg";
 +
imgname[16] = "http://2011.igem.org/wiki/images/1/16/Indiana004.jpg";
 +
imgname[17] = "http://2011.igem.org/wiki/images/a/a0/Indiana005.jpg";
 +
imgname[18] = "http://2011.igem.org/wiki/images/d/d8/Indiana006.jpg";
 +
imgname[19] = "http://2011.igem.org/wiki/images/8/8e/Indiana007.jpg";
 +
imgname[20] = "http://2011.igem.org/wiki/images/6/6f/Indiana008.jpg";
 +
imgname[21] = "http://2011.igem.org/wiki/images/6/68/Indiana009.jpg";
 +
imgname[22] = "http://2011.igem.org/wiki/images/6/69/Indiana010.jpg";
 +
imgname[23] ="http://2011.igem.org/wiki/images/5/52/Indiana011.jpg";
 +
 +
function changeImg(n) {
 +
var name = imgname[n];
 +
var imgobj = document.getElementById('galImg');
 +
animTransA();
 +
imgobj.src = name;
 +
animTransB();
 +
}
 +
 +
function moveLeft()
 +
{
 +
galimgn -= 1;
 +
 +
if (galimgn < 0)
 +
galimgn = imgname.length - 1;
 +
changeImg(galimgn);
 +
}
 +
 +
function moveRight()
 +
{
 +
galimgn += 1;
 +
 +
if (galimgn >= imgname.length)
 +
galimgn = 0;
 +
 +
changeImg(galimgn);
 +
}
 +
 +
function scrollRt() {
 +
i = i + speed;
 +
var div = document.getElementById("cont1");
 +
div.scrollLeft = i;
 +
if (i > div.scrollLeft) {i = 500;}
 +
t1=setTimeout("scrollRt()",100);
 +
}
 +
 +
function scrollLf() {
 +
i = i - speed;
 +
var div = document.getElementById("cont1");
 +
div.scrollLeft = i;
 +
if (i < 0) {i = 0;}
 +
t1=setTimeout("scrollLf()",100);
 +
}
 +
 +
function animTransA() {
 +
st1 -= speed;
 +
img = document.getElementById('galImg');
 +
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('galImg');
 +
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('galImg');
 +
img.style.opacity = 1;
 +
st1 = 100; st2 = 0;
 +
img.style.filter = 'alpha(opacity=' + 100 + ')';
 +
}
 +
 +
</script>
 +
 +
 +
 +
 +
Line 328: Line 440:
//$this.find("a").trigger("click")
//$this.find("a").trigger("click")
 +
 +
 +
</script>
</script>
Line 488: Line 603:
</div> <!-- this closes the menu div -->
</div> <!-- this closes the menu div -->
 +
 +
<div id="rightColumn">
 +
 +
  <div class="gallery" id="gallery">
 +
    <p><a href="#" onClick="moveLeft()"><img src="http://2011.igem.org/wiki/images/c/c8/Botonleft01.png" width="50" height="71"> </a>
 +
<img src="http://2011.igem.org/wiki/images/a/aa/Img023.png" alt="dasdfa" name="galImg" width="400" height="300" id="galImg" longdesc="http://imgs">
 +
<a href="#" onClick="moveRight()"><img src="http://2011.igem.org/wiki/images/7/74/Botonright01.png" width="50" height="71"></a>
 +
    </p>
 +
   
 +
    </div> 
 +
 +
 +
</div>
</div> <!-- this closes the content wrap div -->
</div> <!-- this closes the content wrap div -->
        
        

Revision as of 22:24, 12 January 2015