function toolButton(lnk){
	switch(lnk){
		case "calendar":
			popCalendar();
			break;
		case "clock":
			cWidth = 170;
			cHeight = 220;
			cLeft = (screen.width/2)-(cWidth/2);
			cTop = (screen.height/2)-(cHeight/2);
			cDims = cWidth+","+cHeight+","+cLeft+","+cTop
			bbtlink('N','links/clock/RoundClock.html',cDims);
			break;
		case "colourpick":
			cWidth = 215;
			cHeight = 90;
			cLeft = (screen.width/2)-(cWidth/2);
			cTop = (screen.height/2)-(cHeight/2);
			cDims = cWidth+","+cHeight+","+cLeft+","+cTop
			bbtlink('N','links/notepad/colourpicker.html',cDims);
			break;
		case "calculator":
			showCalculator();
			break;
		case "notepad":
			cWidth = 316;
			cHeight = 460;
			cLeft = (screen.width/2)-(cWidth/2);
			cTop = (screen.height/2)-(cHeight/2);
			cDims = cWidth+","+cHeight+","+cLeft+","+cTop
			bbtlink('N','links/notepad/Notepad.html',cDims);
			break;
		case "refresh":
			document.location.reload();
			break;
	}
}

tb=0;
toolButs = new Array();
toolButs[tb++] = "calendar";
toolButs[tb++] = "clock";
toolButs[tb++] = "colourpick";
toolButs[tb++] = "calculator";
toolButs[tb++] = "notepad";

tButs = "";
for(but=0;but<toolButs.length;but++){
	tButs += "<a onmouseover=\"javascript:movermessage('','Show "+toolButs[but]+"');return true\" onmouseout=\"javascript:moutmessage()\" title=\"Show "+toolButs[but]+"\" class=\"toolbutton\" id=\""+toolButs[but]+"but\" href=\"javascript:toolButton('"+toolButs[but]+"')\">&nbsp;&nbsp;&nbsp;</a>";
}

document.write('<div id="toolbuttonsbar" class="toolbuttonsbar" style="top:'+(contentHeight-30)+'px;">');
document.write("<div id=dynPopup></div>"+tButs);
document.write("</div>");