Template:CSS/UT-Tokyo

From 2014.igem.org

(Difference between revisions)
Line 396: Line 396:
document.getElementById(str).style.paddingRight = "380px";
document.getElementById(str).style.paddingRight = "380px";
var rand2 = Math.floor(Math.random()*9)+1;
var rand2 = Math.floor(Math.random()*9)+1;
-
if(rand1 != rand2){
+
var str = "circle0" + rand2;
-
var str = "circle0" + rand2;
+
document.getElementById(str).style.visibility = "visible";
-
document.getElementById(str).style.visibility = "visible";
+
document.getElementById(str).style.top = "580px";
-
document.getElementById(str).style.top = "580px";
+
document.getElementById(str).style.right = "50%";
-
document.getElementById(str).style.right = "50%";
+
document.getElementById(str).style.paddingRight = "100px";
-
document.getElementById(str).style.paddingRight = "100px";
+
document.getElementById(str).style.zIndex = "100";
-
document.getElementById(str).style.zIndex = "100";
+
-
}
+
var rand3 = Math.floor(Math.random()*9)+1;
var rand3 = Math.floor(Math.random()*9)+1;
-
if(rand3 != rand1){
+
var str = "circle0" + rand3;
-
if(rand3 != rand2){
+
document.getElementById(str).style.visibility = "visible";
-
var str = "circle0" + rand3;
+
document.getElementById(str).style.top = "300px";
-
document.getElementById(str).style.visibility = "visible";
+
document.getElementById(str).style.right = "";
-
document.getElementById(str).style.top = "300px";
+
document.getElementById(str).style.paddingRight = "";
-
document.getElementById(str).style.left = "50%";
+
document.getElementById(str).style.left = "50%";
-
document.getElementById(str).style.marginLeft = "-30px";
+
document.getElementById(str).style.marginLeft = "-30px";
-
}}
+
var rand4 = Math.floor(Math.random()*9)+1;
var rand4 = Math.floor(Math.random()*9)+1;
-
if(rand4 != rand1){
+
var str = "circle0" + rand4;
-
if(rand4 != rand2){
+
document.getElementById(str).style.visibility = "visible";
-
if(rand4 != rand3){
+
document.getElementById(str).style.top = "270px";
-
var str = "circle0" + rand4;
+
document.getElementById(str).style.right = "";
-
document.getElementById(str).style.visibility = "visible";
+
document.getElementById(str).style.paddingRight = "";
-
document.getElementById(str).style.top = "270px";
+
document.getElementById(str).style.marginLeft = "";
-
document.getElementById(str).style.left = "50%";
+
document.getElementById(str).style.left = "50%";
-
document.getElementById(str).style.paddingLeft = "400px";
+
document.getElementById(str).style.paddingLeft = "400px";
-
}}}
+
var rand5 = Math.floor(Math.random()*9)+1;
var rand5 = Math.floor(Math.random()*9)+1;
-
if(rand5 != rand1){
+
var str = "circle0" + rand5;
-
if(rand5 != rand2){
+
document.getElementById(str).style.visibility = "visible";
-
if(rand5 != rand3){
+
document.getElementById(str).style.top = "50px";
-
if(rand5 != rand4){
+
document.getElementById(str).style.right = "";
-
var str = "circle0" + rand5;
+
document.getElementById(str).style.paddingRight = "";
-
document.getElementById(str).style.visibility = "visible";
+
document.getElementById(str).style.marginLeft = "";
-
document.getElementById(str).style.top = "50px";
+
document.getElementById(str).style.paddingLeft = "";
-
document.getElementById(str).style.left = "50%";
+
document.getElementById(str).style.left = "50%";
-
document.getElementById(str).style.paddingLeft = "350px";
+
document.getElementById(str).style.paddingLeft = "350px";
-
}}}}
+
var rand6 = Math.floor(Math.random()*9)+1;
var rand6 = Math.floor(Math.random()*9)+1;
-
if(rand6 != rand1){
+
var str = "circle0" + rand6;
-
if(rand6 != rand2){
+
document.getElementById(str).style.visibility = "visible";
-
if(rand6 != rand3){
+
document.getElementById(str).style.top = "440px";
-
if(rand6 != rand4){
+
document.getElementById(str).style.right = "";
-
if(rand6 != rand5){
+
document.getElementById(str).style.paddingRight = "";
-
var str = "circle0" + rand6;
+
document.getElementById(str).style.marginLeft = "";
-
document.getElementById(str).style.visibility = "visible";
+
document.getElementById(str).style.paddingLeft = "";
-
document.getElementById(str).style.top = "440px";
+
document.getElementById(str).style.left = "50%";
-
document.getElementById(str).style.left = "50%";
+
document.getElementById(str).style.marginLeft = "-120px";
-
document.getElementById(str).style.marginLeft = "-120px";
+
-
}}}}}
+
var rand7 = Math.floor(Math.random()*9)+1;
var rand7 = Math.floor(Math.random()*9)+1;
-
if(rand7 != rand1){
 
-
if(rand7 != rand2){
 
-
if(rand7 != rand3){
 
-
if(rand7 != rand4){
 
-
if(rand7 != rand5){
 
-
if(rand7 != rand6){
 
var str = "circle0" + rand7;
var str = "circle0" + rand7;
-
document.getElementById(str).style.visibility = "visible";
+
document.getElementById(str).style.visibility = "visible";
-
document.getElementById(str).style.top = "540px";
+
document.getElementById(str).style.top = "540px";
-
document.getElementById(str).style.right = "50%";
+
document.getElementById(str).style.left = "";
-
document.getElementById(str).style.paddingRight = "350px";
+
document.getElementById(str).style.paddingRight = "";
-
document.getElementById(str).style.zIndex = "100";
+
document.getElementById(str).style.marginLeft = "";
-
}}}}}}
+
document.getElementById(str).style.paddingLeft = "";
 +
document.getElementById(str).style.right = "50%";
 +
document.getElementById(str).style.paddingRight = "350px";
 +
document.getElementById(str).style.zIndex = "100";
}
}
</script>
</script>

Revision as of 14:53, 13 September 2014