function Pro(){
 var obj = this;
 this.o = document.getElementById("Proccess");
 this.i = new Array(30);
 this.p = null;
 this.bar = 0;
 this.curP = 0;
 this.curColor = 0;
 this.color = new Array("lightskyblue","white");
 this.speed = 4;

 for(var i=0;i<30;i++){
	this.i[i] = document.createElement("input");
	this.o.appendChild(this.i[i]);}
 this.p = document.createElement("p");
 this.p.innerHTML = "0%";
 this.o.appendChild(this.p);

 this.a = function(){
	obj.bar = obj.bar + RandomNumber(9);
	if(obj.bar >= 99)
		obj.p.innerHTML = "正在整理数据......";
	else
		obj.p.innerHTML = obj.bar + "%";
	obj.i[obj.curP].style.background = obj.color[obj.curColor];
	obj.curP ++;
	if(obj.curP == 30){
		obj.curP = 0;
		obj.curColor = 1 - obj.curColor;}}
}
function RandomNumber(max){
 var today = new Date();
 var num = Math.round((Math.abs(Math.sin(today.getTime()))*10))%max+1;
 return num;
}
