// JavaScript Document

function showTool(toolid) {
	var url, height, width;
	var contentid;
	contentid = 0;
	height = 400;
	width = 550;
	url = "http://www.townplanning.gov.bb/toolwin.aspx?c=";
	switch(toolid) {
		case 1: { //Water Zone Tool
			contentid = 31; //content value
			break;
		}
		case 2:{//Decision Process
			contentid = 46;
			break;
		}
		case 3:{//Building Process
			contentid = 47;
			break;
		}
		case 4:{//TCDPO Video presentation
			contentid = 52;
			break;
		}
	}
	
	if(contentid!=0) {
		url += contentid;
		openwindow(url,"toolwin", height, width);
	}
	
	return;
	
}

function openwindow(url, name, height, width) {
	var newwindow;
	newwindow = window.open(url,name,"left=0,top=0,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,height="+ height +", width="+ width);
}