<!--
function setFrRate(mvspeed,frrate){//!!!!!!!!!THIS MUST BE CALLED BEFORE TRYING TO USE MoveDivs()!!!!!!!!!!!!!
	//alert("setFrRate");
	movespeed = mvspeed;//the higher the slower, try between 5 and 30 (ish)
	framerate = frrate;//I usually set 20 frames per second (slow tv!)
	milliframe = 1000/framerate;
	timeout = new Array();//make the array to hold the timeout variables returned from a timeout call
}

//example call moveDivs('layername|target x|target y|boolean visibility','layername2|target x|target y|boolean visibility')
//e.g moveDivs('bluelayer|500|200|true','redlayer|120|80|set','redlayer|120|80|false','redlayer|120|80');
function moveDivs(){
	object = null;//refresh the object for the latest loop(could be in a set up somewhere?).
	object = new Array();
	//set up the 'object' database
	for(i=0;i<arguments.length;i++){//split up the call strings passed from the arguments array
		var argsplitstr = String(arguments[i]);
		argsplit = argsplitstr.split("|");//e.g. of argsplitstr: 'bluelayer|200|150'
		object[i] = new Array();
		object[i][0] = String(argsplit[0]);//layer name string
		object[i][1] = parseInt(argsplit[1]);//target x position
		object[i][2] = parseInt(argsplit[2]);//target y position
		if(argsplit.length == 3 || argsplit[3] == "trans"){
			object[i][3] = "trans";//show only while moving
		}else if(argsplit[3] == "set"){
			object[i][3] = "set";//used for set up, keep them hidden, just position for future
		}else{
			object[i][3] = eval(argsplit[3]);//boolean visibility
		}
	}
	if (IE || IE5){//---------------------------------------------------------------------------------------------------------
		for(i=0;i<=object.length-1;i++){//loop through database of arguments
			if(tmp){
				tmp = undefined;
			}
			var tmp = getMyElement(object[i][0]);
			//alert("moveDivs tmp.style.visibility: "+tmp.id+" : "+tmp.style.visibility);
			if(object[i][3] == true && tmp.style.visibility == "hidden" && object[i][3] != "set"){
				tmp.style.visibility = "visible";//last argument of each is type of visibility, this is true(show whilst moving and stationary)
			}else if(!object[i][3] && tmp.style.visibility == "visible"){
				tmp.style.visibility = "hidden";//this is last argument of false(hide whilst moving, then show)
			}else if(object[i][3] == "trans" && tmp.style.visibility == "hidden"){
				tmp.style.visibility = "visible";//this is last argument missed off or set to 'trans'(show whilst moving, then hide)
			}else if(object[i][3] == "set" && tmp.style.visibility == "visible"){
				tmp.style.visibility = "hidden";//last argument of 'set' used for set up positioning (hide whilst moving, then hide)
			}
			if(IE){
				var yy = document.body.scrollTop;
				var xtarget = object[i][1];
				var dx = xtarget - tmp.style.pixelLeft;//current distance from target x position
				var ytarget = object[i][2]+yy;
				var dy = ytarget - tmp.style.pixelTop;//current ditance from target y position
				if(dx > 3){//not almost there from the left
					var xshift = (dx+movespeed)/movespeed;//remember to remove the top: property of the divs style position settings.
				}else if(dx < -3){//not almost there from the right
					var xshift = (dx-movespeed)/movespeed;
				}else{//almost there
					xshift = 0;
				    tmp.style.pixelLeft = xtarget;//place on target x position
				}
				if(dy > 3){//not almost there from top
					var yshift = (dy+movespeed)/movespeed;//remember to remove the left: property of the divs style position settings.
				}else if(dy < -3){//not almost there from bottom
					var yshift = (dy-movespeed)/movespeed;
				}else{//almost there
					yshift = 0;
				    tmp.style.pixelTop = ytarget;//place on target y position
				}
				tmp.style.pixelLeft += xshift;//move layer horizontally
				tmp.style.pixelTop += yshift;//move layer vertically
			}else if(IE5){//changes to fix for Mozilla in here---------------------------------------------------------------------------------------------------------
				var yy = window.pageYOffset;
				//alert("yy: "+yy);
				var xtarget = object[i][1];
				var dx = xtarget - parseInt(tmp.style.left, 10);//current distance from target x position
				//alert("dx: "+dx);
				var ytarget = object[i][2]+yy;
				var dy = ytarget - parseInt(tmp.style.top, 10);//current ditance from target y position
				if(dx > 3){//not almost there from the left
					var xshift = (dx+movespeed)/movespeed;//remember to remove the top: property of the divs style position settings.
				}else if(dx < -3){//not almost there from the right
					var xshift = (dx-movespeed)/movespeed;
				}else{//almost there
					xshift = 0;
					tmp.style.left = xtarget + "px";//place on target x position
				}
				if(dy > 3){//not almost there from top
					var yshift = (dy+movespeed)/movespeed;//remember to remove the left: property of the divs style position settings.
				}else if(dy < -3){//not almost there from bottom
					var yshift = (dy-movespeed)/movespeed;
				}else{//almost there
					yshift = 0;
				    tmp.style.top = ytarget +"px";//place on target y position
				}
				tmp.style.left = (parseInt(tmp.style.left, 10) + xshift + "px");//move layer horizontally
				tmp.style.top = (parseInt(tmp.style.top, 10) + yshift + "px");//move layer vertically
			}
			if(xshift == 0 && yshift == 0){//layer has been positioned on end point
				if(object[i][3] == "trans" && tmp.style.visibility == "visible"){//last argument: 'trans' the move is over so now hide the layer
					tmp.style.visibility = "hidden";
				}else if(object[i][3] == false){//last argument: false the move is over so now show the layer
					tmp.style.visibility = "visible";
				}
				clearTimeout(timeout[object[i][0]]);//passing the layer name as the array index. leave it!!
				//object.splice(i,1);//get rid of the layer and move from the pseudo database
			}else{
				clearTimeout(timeout[object[i][0]]);//clean up timeouts
				var argstr = object[i].join("|");//put the argument string back together
				var timecall= "moveDivs(\""+argstr+"\")";//make the appropriate call string
				timeout[object[i][0]] = setTimeout(timecall,milliframe);//set up timeout object for this call; milliframe is milliseconds according to the frame rate set
			}
		}
		
	}else if(NS){//Netscape code (see comments from IE script above) -------------------------------------------------------
		var yy = window.pageYOffset;
		for(i=0;i<object.length;i++){
			var tmp = getMyElement(object[i][0]);
			//var tmp = document[object[i][0]];
			if(object[i][3] && tmp.visibility == "hide" && object[i][3] != "set"){
				tmp.visibility = "show";
			}else if(!object[i][3] && tmp.visibility == "show"){
				tmp.visibility = "hide";
			}else if(object[i][3] == "trans" && tmp.visibility == "hide"){
				tmp.visibility = "show";
			}else if(object[i][3] == "set" && tmp.visibility == "show"){
				tmp.visibility = "hide";
			}
			var xtarget = object[i][1];
			var dx = xtarget - tmp.left;
			//var ytarget = object[i][2];
			var ytarget = object[i][2]+yy;
			var dy = ytarget - tmp.top;
			if(dx > 3){
				var xshift = (dx+movespeed)/movespeed;
			}else if(dx < -3){
				var xshift = (dx-movespeed)/movespeed;
			}else{
				xshift = 0;
			    tmp.left = xtarget;
			}
			if(dy > 1){
				var yshift = (dy+movespeed)/movespeed;
			}else if(dy < -1){
				var yshift = (dy-movespeed)/movespeed;
			}else{
				yshift = 0;
			    tmp.top = ytarget;
			}			
			tmp.left += xshift;
			tmp.top += yshift;
			if(xshift == 0 && yshift == 0){
				if(object[i][3] == "trans" && tmp.visibility == "show"){
					tmp.visibility = "hide";
				}else if(object[i][3] == false){
					tmp.visibility = "show";
				}
				clearTimeout(timeout[object[i][0]]);
			}else{
				clearTimeout(timeout[object[i][0]]);
				var argstr = object[i].join("|");
				var timecall= "moveDivs(\""+argstr+"\")";
				timeout[object[i][0]] = setTimeout(timecall,milliframe);
			}
		}
	}
}
//-->