アットウィキロゴ

sk

var x;
var page;
var imx = new Array();
var z1 = new Array();
var z2 = new Array();
var z3 = new Array();
 
function sample(){
 
for(s=1;s<137;s++){
imx[s] ="http://ce00582.esy.es/may/24/ex01/gdata/"+s+".png";
}
 
for(s=1;s<101;s++){
n1=100*Math.random();
n2=Math.floor(n1)+1;
z1[s]=n2;  
n1=6*Math.random();
n2=Math.floor(n1)+1;
z2[s]=n2;  
n1=6*Math.random();
n2=Math.floor(n1)+1;
z3[s]=n2;    
}   
 
 
 
    page = 1;
    x=100;
 
    $("#bt").click(function(){
        x=200;   
        });
 $("#bt2").click(function(){
        x=100;   
        });
 
 
var timer;
var delay = 100;
 
 
var loop = function () {
 
 
    if (x < 150) page = page + 1;
    if (page > 100) page = 1;
 
    paint();
 
 
 
    clearTimeout(timer);
    timer = setTimeout(loop, delay);
}
 
loop();
 
 
}
 
 
 
function paint(){
 
    var str;
    str = "<table>";
    for (s = 1; s < 4; s++) {
    str = str+"<tr>";
    str = str+"<td>";
    p1 = page+s-1;
    if (p1 > 100) p1 = p1 - 100;
    sx = z1[p1];
    str = str + pic(imx[sx]);
    str =str+ "</td>";
    str = str+"<td>";
    p1 = page+s-1;
    if (p1 > 100) p1 = p1 - 100;
    sx = z2[p1];
    str = str + pic(imx[sx]);
    str =str+ "</td>";
    str = str+"<td>";
    p1 = page+s-1;
    if (p1 > 100) p1 = p1 - 100;
    sx = z3[p1];
    str = str + pic(imx[sx]);
    str =str+ "</td>";
    str =str+ "</tr>";
    }
    str = str + "</table>";
 
 
    $("#memo").html(str);
 
    h = 0;
    if (z1[page] == z2[page]) h = h + 1;
    if (z3[page] == z2[page]) h = h + 1;
    if (x > 150) h = h + 1;
    if (h == 3) $("#point").html("おめでとうございます");
 
    if(x<150)$("#point").html("稼働中");
    if(x>150)$("#point").html("停止中");
 
 
}
 
function pic(pp){
 
    var str = "<img src=\""
    str = str + pp; 
    str=str+ "\" width=\"100\" height=\"100\">";
 
    return str;
}
最終更新:2015年05月24日 05:00