var url_g = '';
var action=new Array();

function initMoveBox(id,attribute,pos,sdelay,delay,smoothing,ins,url) {
	action[ins]=false;
	posAnchor=pos;
	url_g = url;
	var delay;
	var smoothing;
	if (document.getElementById(id).style[attribute]) {
			y=document.getElementById(id).style[attribute];
			}
	if (y!=pos)	setTimeout("startMoveBox('" + id + "','" + attribute + "'," + pos + "," + sdelay + "," + delay + "," + smoothing + "," + ins + ")", delay+sdelay);
	}

function startMoveBox(id,attribute,pos,sdelay,delay,smoothing,ins) {
	action[ins]=true;
	document.getElementById(id).style.visibility="visible";
	moveBox(id,attribute,pos,sdelay,delay,smoothing,ins);
	}

function moveBox(id,attribute,pos,sdelay,delay,smoothing,ins) {
	if (action[ins]) {
		var id;
		var attribute;
		var pos;
		var sdelay;
		var delay;
		var smoothing;
		var ins;
		var newPos;
		var y;
		if (document.getElementById(id).style[attribute]) {
			y=document.getElementById(id).style[attribute];
			}
		else y=document.getElementById(id).style[attribute]="0px";
		y=parseInt(y);
		relPos=Math.abs((pos-y) / smoothing);
		relPos=Math.round(relPos);
		if (relPos < 2 ) relPos=1;
		
		if (action[ins]) {
			if (y < pos) {
				newPos=y+relPos;
				document.getElementById(id).style[attribute]=newPos + "px";
				setTimeout("moveBox('" + id + "','" + attribute + "'," + pos + "," + sdelay + "," + delay + "," + smoothing + "," + ins + ")", delay);
				}
			if (y > pos) {
				newPos=y-relPos;
				document.getElementById(id).style[attribute]=newPos + "px";
				setTimeout ("moveBox('" + id + "','" + attribute + "'," + pos + "," + sdelay + "," + delay + "," + smoothing + "," + ins + ")", delay);
				}
			if (y==pos && url_g!='no') {
				window.location.href=url_g;
				}
			}
		}
	else return;
	}
