// JavaScript Document
// used by several of the js functions to write things into the document

function docuPrint(message, error, divID){
	try{
		if(error == 0){ //default case, print in B&W
			divID.innerHTML = message;
			divID.htmlContent = message;
			return true;
		}else if(error == 1){ //1 means the error is true, print in bold red.
			/* print the message in green */
			divID.innerHTML = "<strong><font color=\"red\">"+message+"</font></strong>";
			divID.htmlContent = "<strong><font color=\"red\">"+message+"</font></strong>";
			return true;
		}else{ // means the error is false, field accepted, use the green print
			divID.innerHTML = "<font color=\"green\">"+message+"</font>";
			divID.htmlContent = "<font color=\"green\">"+message+"</font>";
			return true;
		}
	}catch(e){
		alert("docuPrint.js error: " + e);
	}
	return false;
}
