Team:Paris Liliane Bettencourt/Template:paris2010 2
From 2010.igem.org
//PLF-http://www.jejavascript.net/
var coeff=2;
var speed=60;
var coeffinit=coeff;
function i_change() {
if (document.image.width < i_width) {
coeff = coeff-0.2;
document.image.width = Math.round(i_width/coeff);
document.image.height = Math.round(i_height/coeff);
chang=window.setTimeout('i_change();',speed);
}
else {window.clearTimeout(chang);}
}
function initial() {
if (document.image.width > i_width/coeffinit) {
window.clearTimeout(chang);
coeff = coeff+0.2;
document.image.width = Math.round(i_width/coeff);
document.image.height = Math.round(i_height/coeff);
initi=window.setTimeout('initial();',speed);
}
else {window.clearTimeout(initi);}
}