function toggleLayer(layer,x)
{
    layer = (typeof layer == 'string') ? window.document.getElementById(layer) : layer;
	
	if (x == 1){
		layer.style.visibility = 'visible';
	}else{
		layer.style.visibility = 'hidden';	
	}
}
