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

function setTab(id0, visibility0, id1, visibility1, id2, visibility2) {
	document.getElementById(id0).style.display = visibility0;
	document.getElementById(id1).style.display = visibility1;
	document.getElementById(id2).style.display = visibility2;
}

		
function getTabName() {
	var url = window.location.search;
	var locofequal = url.indexOf('=');
	var tab = url.substring((locofequal + 1),url.length);
	var tools = document.getElementById('tools'); // get the "tools" object
	var projects = document.getElementById('projects'); // get the "projects" object
	var clients = document.getElementById('clients'); // get the "clients" object
	if (tab == 'tools') {
		tools.style.display = 'inline';
		projects.style.display = 'none';
		clients.style.display = 'none';
	}
	else if (tab == 'projects') {
		projects.style.display = 'inline';
		clients.style.display = 'none';
		tools.style.display = 'none';
	}
	else {
		clients.style.display = 'inline';
		projects.style.display = 'none';
		tools.style.display = 'none';
	}
}

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

function grow() {
	
	plant = document.getElementById('plantObject'); // get the "plant" object
	plant.style.top = '-129px'; // set its initial height to -129px
	doGrow(); // start animating		
}

function init() {
	grow();	
	getTabName();
}

window.onload = init;
