var m;
var height;
var width;

function applyValues()
{
	width = document.forms[0].elements[0].value;
	height = document.forms[0].elements[1].value;
	
	// Take the user entered width+weight and remove the shapes size from it
	// this will stop it scrolling of the edge of the screen
	width -= 113;
	height -= 113;
	
	start();
}

function init() {
  m = new Motion("LRUDHV", true, 3);
  if(document.layers) document.all = document.layers;
}

function start() {
	// apply transition or motion
  	m.applyMovement(document.all.testLayer, width, height);
	m.applyMovement(document.all.testLayer, 0, 0);
}


