<!-- Begin
var arrNotes = new Array();
var arrCookie = new Array();
var recCount = 0;
var strNote="";
expireDate = new Date;
expireDate.setDate(expireDate.getDate()+365);
function stoperror(){
return true
}
window.onerror=stoperror
function cookieVal(cookieName) {
thisCookie = document.cookie.split("; ")
for (i = 0; i < thisCookie.length; i++) {
if (cookieName == thisCookie[i].split("=")[0]) {
return thisCookie[i].split("=")[1];
   }
}
return 0;
}
function loadCookie() {
if(document.cookie != "") {
arrNotes = cookieVal("Notes").split(",");
currentNote();
   }
}
function setRec() {
strNote = "";
strNote = strNote + document.frm1.notes.value + ":";

arrNotes[recCount] = strNote;
document.frm2.add.value = "  NEW  ";
document.cookie = "Notes="+arrNotes+";expires=" + expireDate.toGMTString();
}
function newRec() {
switch (document.frm2.add.value) {
case "  NEW  " :
   varTemp = recCount;
   document.frm1.notes.value = ""
   recCount = arrNotes.length;
   document.frm2.add.value = "CANCEL";
   break;
case "CANCEL" :
   recCount = varTemp;
   document.frm2.add.value = "  NEW  ";
   currentNote();
   break;
   }
}
function countNotes() {
document.frm2.actual.value = "Note " + (recCount+1)+" of  "+arrNotes.length+" saved Notes";
}
function delRec() {
arrNotes.splice(recCount,1);
navigate("previous");
setRec();
}
function currentNote() {
if (arrNotes.length != "") {
strNote = arrNotes[recCount];
currNote = strNote.split(":");
document.frm1.notes.value = currNote;
}
}
function navigate(control) {
switch (control) {
case "first" :
   recCount = 0;
   currentNote();
   document.frm2.add.value = "  NEW  ";
   break;
case "last" :
   recCount = arrNotes.length - 1;
   currentNote();
   document.frm2.add.value = "  NEW  ";
   break;
case "next" :
   if (recCount < arrNotes.length - 1) {
   recCount = recCount + 1;
   currentNote();
   document.frm2.add.value = "  NEW  ";
   }
   break;
case "previous" :
   if (recCount > 0) {
   recCount = recCount - 1;
   currentNote();
   }
   document.frm2.add.value = "  NEW  ";
   break;
   default:
   }
}
if (!Array.prototype.splice) {
function array_splice(ind,cnt) {
if (arguments.length == 0) return ind;
if (typeof ind != "number") ind = 0;
if (ind < 0) ind = Math.max(0,this.length + ind);
if (ind > this.length) {
if (arguments.length > 2) ind = this.length;
else return [];
}
if (arguments.length < 2) cnt = this.length-ind;
cnt = (typeof cnt == "number") ? Math.max(0,cnt) : 0;
removeArray = this.slice(ind,ind+cnt);
endArray = this.slice(ind+cnt);
this.length = ind;
for (var i = 2; i < arguments.length; i++) {
this[this.length] = arguments[i];
}
for(var i = 0; i < endArray.length; i++) {
this[this.length] = endArray[i];
}
return removeArray;
}
Array.prototype.splice = array_splice;
}
recCount = 0;
loadCookie();
countNotes();
//  End -->