function view() {
  document.getElementById('hidelink').className = "viewable";
  document.getElementById('viewlink').className = "hidden";
  document.getElementById('notespace').className = "viewable";
  document.noteform.notetext.enabled = 'true';
  document.noteform.notetext.focus();
  return false;
}

function position() {
  window.location.hash="top_notes"; 
  return false;
}

function hide() {
  document.getElementById('hidelink').className = "hidden";
  document.getElementById('viewlink').className = "viewable";
  document.getElementById('notespace').className = "hidden";
  document.noteform.notetext.enabled = 'false';
  return false;
}

function deleteConfirm(){
  var txt2="Are you sure you want to delete this entry?"
  if (!confirm (txt2)){return false;}
  else window.location="entrydel.asp?entrycode=<% =entryCode %>";
}

function reportEntry(){
  var txt2="Are you sure you want to report this entry for a Rules violation? Please note that the diary owner will not be informed of who filed this report."
  if (!confirm (txt2)){return false;}
}

function spamConfirm(){
var txt2=prompt ("Please confirm you want to spam delete this diary?","");
if (txt2 != "spam"){return false;}
else window.location="useradminspam.asp?authorcodex=<% =authorCode %>";
}

function makeFOConfirm(){
var txt2=prompt ("Please confirm you want to make this entry FO?","");
if (txt2 != "fo"){return false;}
else window.location="useradminmakefo.asp?authorcodex=<% =authorCode %>&entrycode=<% =entryCode %>";
}

function makePrivConfirm(){
var txt2=prompt ("Please confirm you want to make this entry private?","");
if (txt2 != "private"){return false;}
else window.location="useradminmakefo.asp?privateflag=Y&authorcodex=<% =authorCode %>&entrycode=<% =entryCode %>";
}

function deleteNoteConfirm(jsNoteCode){
  var txt3="Are you sure you want to delete this note?"		
  if (!confirm (txt3)){return false;}
  else window.location='deletenote.asp?entrycode=<% =entryCode %>&notecode=' + jsNoteCode;
}

function privateNoteConfirm(jsNoteCode){
  var txt4="Are you sure you want to make this note private?"		
  if (!confirm (txt4)){return false;}
  else window.location='privatenote.asp?entrycode=<% =entryCode %>&notecode=' + jsNoteCode;
}

function deleteAuthorNoteConfirm(jsNoteCode){
  var txt5="Are you sure you want to delete this note?"		
  if (!confirm (txt5)){return false;}
  else window.location='deleteauthornote.asp?authorcode=<% =authorCode %>&entrycode=<% =entryCode %>&notecode=' + jsNoteCode;
}

function rcConfirm(){
  var txt6="Are you sure you want to vote for this entry for Reader's Choice?"
  if (!confirm (txt6)){return false;}
  else window.location='readerschoicevote.asp?authorcode=<% =authorCode %>&entrycode=<% =entryCode %>';
}


function blockAuthorConfirm(jsNoteCode){
	var txt7="Are you sure you want to block this user?";
    if (!confirm (txt7)){return false;}
	else window.location='blockuser.asp?authorcode=' + jsNoteCode;
}

function textCounter(field, countfield, maxlimit) {
  if (field.value.length > maxlimit)
    field.value = field.value.substring(0, maxlimit);
  else 
    countfield.value = maxlimit - field.value.length;
}

function checkchars(cur, noteMax){
  if (cur.notetext.value.length>noteMax) {
    alert('Your note is longer than the ' + noteMax + ' character limit.  Please shorten it before saving.');
    return false;
	}
  else
    {return true;}
}






