var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ns4)
crossobj=document.layers.hotnote
else if (ie4||ns6)
crossobj=ns6? document.getElementById("hotnote") : document.all.hotnote

var original_length;
var has_changed = false;

function close_hot_note(){
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
crossobj.visibility="hide"
}

function show_hot_note(note_name, note_text){
frm=document.note;
var saved_note = readCookie(note_name);
if (saved_note != note_text && saved_note != null) {
	frm.elements['notearea'].value = saved_note;
}
else {
	frm.elements['notearea'].value = note_text;
}

original_length = document.note.elements['notearea'].value.length;
if (ie4||ns6)
crossobj.style.visibility="visible"
else if (ns4)
crossobj.visibility="show"
document.note.notearea.focus();
}

function save_note(note_name) {
  frm=document.note;
  new_length = frm.elements['notearea'].value.length;
  if (new_length != original_length) {
		createCookie(note_name,frm.elements['notearea'].value,365);
		}
  close_hot_note();
}
