function Creeping_line(elemName, elemID, elemCont,startX, startY, endX, endY, speed){
	document.all.marq_id.style.display="none";
	document.all.cr_lineW.style.display="inline";
	this.elemName = elemName;
	this.elemID = elemID;
	this.elemCont = elemCont;
	this.xStart = startX;
	this.yStart = startY;
	this.xCurr = startX;
	this.yCurr = startY;
	this.xTarg = endX;
	this.yTarg = endY;
	this.xDelta = Math.abs(endX - startX);
	this.yDelta = Math.abs(endY - startY);
	this.vel = (speed) ? speed : 1;
	this.start = start;
	this.stop = stop;
	
	document.getElementById(elemID).style.left = startX + "px";
	document.getElementById(elemID).style.top = startY + "px";
	this.pathLen = Math.sqrt((Math.pow((startX - endX), 2))+(Math.pow((startY - endY), 2)));
	
	this.xStep = Math.floor(((this.xTarg - this.xCurr)/this.pathLen)*this.vel);
	this.yStep = Math.floor(((this.yTarg - this.yCurr)/this.pathLen)*this.vel);

	this.div = document.getElementById(elemID);
	this.cont_div = document.getElementById(elemCont);
  
  	var node = this.div.firstChild;
	var next;
	while (node){
    	next = node.nextSibling;
    	if (node.nodeType == 3){
	    	this.div.removeChild(node);
	    }
		node = next;
	}

	this.shiftLeftAt = this.div.firstChild.offsetWidth;
 	this.div.style.visibility = 'visible';
	this.cont_div.style.width = this.xStart+ 'px';
	this.interval = setInterval(this.elemName + '.start()', 10);
}


function start() {
	this.stop();
	var x = this.xCurr + this.xStep;
	var y = this.yCurr + this.yStep;
	if( this.shiftLeftAt == 0){
		this.shiftLeftAt = this.div.firstChild.offsetWidth;
	}
	if (this.xCurr <= -this.shiftLeftAt && this.shiftLeftAt!=0){
		 x = this.xStart;
	}
	document.getElementById(this.elemID).style.left = x + "px";
	document.getElementById(this.elemID).style.top = y + "px";
	this.xCurr = x;
	this.yCurr = y;
	this.interval = setInterval(this.elemName + '.start()', 10)
}

function stop(){
	if (this.interval){
	    clearInterval(this.interval);
	}
	this.interval = null;
}
