	var scrnW;
	var scrnH;
	
	var mx = new Array(10);
	var my = new Array(10);
	var x = new Array(10);
	var y = new Array(10);
	var x1,y1;
	var xx, yy;
	var sx = new Array(10);
	var sy = new Array(10);
	
	var i;
	
	function initV() {
		scrnW =getInnerWidth() - 30;
		scrnH =getInnerHeight() - 30;
		for(i = 0;i < x.length;i++){
			x[i] = 500;
			y[i] = 500;
			mx[i] = rander(scrnW);
			my[i] = rander(scrnH);
		}
	}

	function getScrollY() {
		if(window.scrollY) {
			return window.scrollY;
		} else {
			return document.body.scrollTop;
		}
	}
	
	function soundAndMove(){
		for(i = 0; i< x.length;i++){
			if(document.getElementById){
    			if(document.getElementById("object" + i).style.visibility == "visible"){
			
			}
			}
		}
	}
	
	function move() {
		
		for(i = 0; i< x.length;i++){
			if (rander(100)<2) {
				mx[i] = rander(scrnW);
				my[i] = rander(scrnH)+getScrollY();
			}
			
			sx[i] = Math.round((mx[i]-x[i])/40.0);
			sy[i] = Math.round((my[i]-y[i])/40.0);
			
			x[i] = x[i] + sx[i];
			y[i] = y[i] + sy[i];
			
			x1 = x[i];
			y1 = y[i];
			
			
			ObjectMoveTo(document.getElementById("object" + i),x1,y1);
		}
	}
	
	
	function ObjectMoveTo(obj,x,y) {
			obj.style.left = x;
			obj.style.top = y;
	}
	
	function getInnerHeight(){
		if(window.opera)
			return window.innerHeight ;        //o6,o7用
		else if(document.all)
			return document.body.clientHeight ;//e4,e5,e6用
		else if(document.layers)
			return  window.innerHeight ;       //n4用
		else if(document.getElementById)
			return window.innerHeight;         //n6,n7,m1,s1用
		return null;
	}
	function getInnerWidth(){
		if(window.opera)
			return window.innerWidth ;        //o6,o7用
		else if(document.all)
			return document.body.clientWidth; //e4,e5,e6用
		else if(document.layers)
			return  window.innerWidth;       //n4用
		else if(document.getElementById)
			return window.innerWidth;         //n6,n7,m1,s1用
		return null;
	}
	
	function rander(r) {
		return Math.random()* r;
	}
	
