function increaseNotesHeight(thisTextarea, add) {
	if (thisTextarea) {
		newHeight = parseInt(thisTextarea.style.height) + add;
		thisTextarea.style.height = newHeight + "px";
	}
	if (document.getElementById('notes_height')) {
		document.getElementById('notes_height').value = newHeight;
	}
}

function decreaseNotesHeight(thisTextarea, subtract) {
	if (thisTextarea) {
		if ((parseInt(thisTextarea.style.height) - subtract) > 30) {
			newHeight = parseInt(thisTextarea.style.height) - subtract;
			thisTextarea.style.height = newHeight + "px";
		}
		else {
			newHeight = 30;
			thisTextarea.style.height = "30px";
		}			
	}
	if (document.getElementById('notes_height')) {
		document.getElementById('notes_height').value = newHeight;
	}
}

function annotate() {
	var today = new Date();
	var month = today.getMonth()+1;
	var year = today.getYear();
	var day = today.getDate();
	if(day<10) {day = "0" + day;}
	if(month<10) {month= "0" + month;}
	if(year<1000) {year+=1900;}

	var dateFormat = month + "/" + day + "/" + year;

	var curDateTime = new Date();
	var curHour = curDateTime.getHours();
	var curMin = curDateTime.getMinutes();
	var curSec = curDateTime.getSeconds();
	var curTime = 
    ((curHour < 10) ? "0" : "") + curHour + ":"
    + ((curMin < 10) ? "0" : "") + curMin + ":"
    + ((curSec < 10) ? "0" : "") + curSec;
  
	now = new Date;
	if (now.getMinutes() < 10) { 
		var minutes = "0" + now.getMinutes();
	}
	else {
		var minutes = now.getMinutes();
	}
	if (now.getHours() < 10) { 
		var hours = "0" + now.getHours();
	}
	else {
		var hours = now.getHours();
	}
	var add = "-----  " + dateFormat + " @ " + curTime + 
	          "  ---------------------\n\n";
	document.editclient.comments.value = add + document.editclient.comments.value;
}

function annotate2() {
	var today = new Date();
	var month = today.getMonth()+1;
	var year = today.getYear();
	var day = today.getDate();
	if(day<10) {day = "0" + day;}
	if(month<10) {month= "0" + month;}
	if(year<1000) {year+=1900;}

	var dateFormat = month + "/" + day + "/" + year;

	var curDateTime = new Date();
	var curHour = curDateTime.getHours();
	var curMin = curDateTime.getMinutes();
	var curSec = curDateTime.getSeconds();
	var curTime = 
    ((curHour < 10) ? "0" : "") + curHour + ":"
    + ((curMin < 10) ? "0" : "") + curMin + ":"
    + ((curSec < 10) ? "0" : "") + curSec;
  
	now = new Date;
	if (now.getMinutes() < 10) { 
		var minutes = "0" + now.getMinutes();
	}
	else {
		var minutes = now.getMinutes();
	}
	if (now.getHours() < 10) { 
		var hours = "0" + now.getHours();
	}
	else {
		var hours = now.getHours();
	}
	var add = "-----  " + dateFormat + " @ " + curTime + 
	          "  ---------------------\n\n";
	document.newclient.comments.value = add + document.newclient.comments.value;
}

function annotate3() {
	var today = new Date();
	var month = today.getMonth()+1;
	var year = today.getYear();
	var day = today.getDate();
	if(day<10) {day = "0" + day;}
	if(month<10) {month= "0" + month;}
	if(year<1000) {year+=1900;}

	var dateFormat = month + "/" + day + "/" + year;

	var curDateTime = new Date();
	var curHour = curDateTime.getHours();
	var curMin = curDateTime.getMinutes();
	var curSec = curDateTime.getSeconds();
	var curTime = 
    ((curHour < 10) ? "0" : "") + curHour + ":"
    + ((curMin < 10) ? "0" : "") + curMin + ":"
    + ((curSec < 10) ? "0" : "") + curSec;
  
	now = new Date;
	if (now.getMinutes() < 10) { 
		var minutes = "0" + now.getMinutes();
	}
	else {
		var minutes = now.getMinutes();
	}
	if (now.getHours() < 10) { 
		var hours = "0" + now.getHours();
	}
	else {
		var hours = now.getHours();
	}
	var add = "-----  " + dateFormat + " @ " + curTime + 
	          "  ---------------------\n\n";
	document.form1.comments.value = add + document.form1.comments.value;
}