function printNotes() {
	notes_value = document.notes.notes;
	notes_value = escapeVal(notes_value,'<br>');
	title = document.notes.title.value;
	page = "../print.php?notes=" + notes_value + "&title=" + escape(title);
	//alert(page);
	window.open(page,'','width=475,height=420, scrollbars=yes');
}

function pop(url, name, props) {
	window.open(url, name, props);
}

function escapeVal(textarea,replaceWith){ 
	textarea.value = escape(textarea.value)

	for(i=0; i<textarea.value.length; i++) {
		if(textarea.value.indexOf("%0D%0A") > -1) { 
			textarea.value=textarea.value.replace("%0D%0A",replaceWith)
		}
		else if(textarea.value.indexOf("%0A") > -1) {
			textarea.value=textarea.value.replace("%0A",replaceWith)
		}
		else if(textarea.value.indexOf("%0D") > -1) {
			textarea.value=textarea.value.replace("%0D",replaceWith)
		}
	}
	textarea.value=unescape(textarea.value)
	return textarea.value;
}