function setbgpos (id,to){
	foo = document.getElementById(id);
	foo.style.backgroundPosition = to;
}

function settop (id,to){
	foo = document.getElementById(id);
	foo.style.top = to;
}


function stepbystep(){
	if(parseInt(foo.style.top) < limit){
		foo.style.top = parseInt(foo.style.top)+1;
		setTimeout(stepbystep,10);
	}
	if(parseInt(foo.style.top) > limit){
		foo.style.top = parseInt(foo.style.top)-1;
		setTimeout(stepbystep,10);
	}

}

function move(id,from,to){
	foo = document.getElementById(id);
	foo.style.top=from;
	limit=to;
		stepbystep();
}

var popupwindow;
function popup(picture,popupname)
{
	popupwindow = window.open(picture,popupname,'width=1024,height=768,resizable=yes,dependent=yes,scrollbars=yes,screenx=20,screeny=0');
}


function count(){
	var textlength=document.form.message.value.length;
	if (textlength > 200)
	{
	document.form.message.value=document.form.message.value.substring(0,200);
	}
	else document.form.wordcounter.value=200-textlength;
}
