t').on('click', function(){
				if (project == "openfile" || project == "openproject") { // if curfile selected
					window.location.assign("./" + layout);
				} else if (project !== "" && layout !== "") {
					r2.cmd("P " + project, function(x) {});
					window.location.assign("./" + layout);
				} else if (filename !== "" && layout !== "") {
					window.location.assign("./" + layout);
				} else {
					alert("Choose file and layout");
				}
			});
		});
	</script>
</body>
</html>
