function setVisibility(id, visibility) {
	document.getElementById(id).style.display = visibility;
}


var plant = null; // object

function doGrow() {
	if (parseInt(plant.style.top) < 0) {
		plant.style.top = parseInt(plant.style.top)+1+'px';
		setTimeout(doGrow,10); // call doGrow in 3msec
	}	
}

function doMove() {
	if (parseInt(pen.style.left) < 520) {
		pen.style.left = parseInt(pen.style.left)+7+'px';
		setTimeout(doMove,20); // call doMove in 3msec
	}		
}

function growth() {
	plant = document.getElementById('plantObject'); // get the "plant" object
	plant.style.top = '-129px'; // set its initial height to -129px
	doGrow(); // start animating
}	
function movement() {	
	pen = document.getElementById('pen1'); // get the "pen" object
	pen.style.left = '50px'; // set its initial left to 0px
	doMove(); // start animating		
}

function init() {
	growth();
	movement();
}


window.onload = init;