function CButton (targetID, caption, width, height, templateName, className, clickFunc) {
	midWidth = width - 8;
	var htmlStr = "<table width=\"" + width + "\" cellspacing=0 cellpadding=0>";
	htmlStr += "<tr class=\"" + className + "\" onClick=\"" + clickFunc + "\">";
	htmlStr += "<td style=\"width:4px; background-image:url(images/buttons/" + templateName + "/butt_left.gif);\">";
	htmlStr += "</td>";
	htmlStr += "<td style=\"width:" + midWidth + "px; height:" + height + "px; background-image:url(images/buttons/" + templateName + "/butt_mid.gif);\">";
	htmlStr += caption;
	htmlStr += "</td>";
	htmlStr += "<td style=\"width:4px; background-image:url(images/buttons/" + templateName + "/butt_right.gif);\">";
	htmlStr += "</td>";
	htmlStr += "</tr>";
	htmlStr += "</table>";
	document.getElementById (targetID).innerHTML = htmlStr;
}
