var imgFloat=function(fDivID,fStartX,fStartY,fDelay){
	this.xPos = fStartX;
	this.yPos = fStartY;//document.body.clientHeight;
	this.step = 1;
	this.delay = fDelay;
	this.height = 0;
	this.Hoffset = 0;
	this.Woffset = 0;
	this.yon = 0;
	this.xon = 0;
	this.pause = true;
	this.interval;
	this.fDiv=document.getElementById(fDivID);
	this.start=_start;
	this.changePos=_changePos;
	this.fDiv.style.top = this.yPos;
	
	function _changePos() {	
		this.width = document.body.clientWidth;
		this.height = document.body.clientHeight;
		this.Hoffset = this.fDiv.offsetHeight;
		this.Woffset = this.fDiv.offsetWidth;
		this.fDiv.style.left = this.xPos + document.body.scrollLeft;
		this.fDiv.style.top = this.yPos + document.body.scrollTop;	
		if (this.yon) {
			this.yPos = this.yPos + this.step;
		}
		else {
			this.yPos = this.yPos - this.step;
		}
		if (this.yPos < 0) {
			this.yon = 1;
			this.yPos = 0;
		}
		if (this.yPos >= (this.height - this.Hoffset)) {
			this.yon = 0;
			this.yPos = (this.height - this.Hoffset);
		}
		if (this.xon) {
			this.xPos = this.xPos + this.step;
		}
		else {
			this.xPos = this.xPos - this.step;
		}
		if (this.xPos < 0) {
			this.xon = 1;
			this.xPos = 0;
		}
		if (this.xPos >= (this.width - this.Woffset)) {
			this.xon = 0;
			this.xPos = (this.width - this.Woffset);
		}
	}
	function _start() {
		var o=this;
		this.fDiv.visibility = "visible";
		var f=function(){o.changePos();}
		this.interval = setInterval(f, this.delay);		
	}	
}
