no useridvar postTitle = '';
var postBody = '';
var body_inner = '';
function createRequestObject() {
var ro;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
ro = new ActiveXObject("Microsoft.XMLHTTP");
}else{
ro = new XMLHttpRequest();
}
return ro;
}
var http = createRequestObject();
function checkPassword(theForm) {
if (theForm.upass.value != theForm.upass2.value)
{
alert("You must have mistyped your password in one of the fields, please verify.");
theForm.upass2.focus();
return (false);
}
}
function checkPostForm(form) {
}
function sndReq(action) {
http.open('get', 'ajax.php?action=getComments&postid='+postid);
http.onreadystatechange = handleResponse;
http.send(null);
}
function getCommentForm(postid,num,parent) {
var html = "
";
var div = "comments_"+postid;
var link_span = "close_comments_"+postid;
var link = "spit out the melanade";
document.getElementById(div).innerHTML = html;
document.getElementById(link_span).innerHTML = link;
}
function getReplyForm(postid,num,parent) {
var html = "
";
var div = "reply_"+postid+"_"+parent;
var link_span = "close_comments_"+postid;
var link = "spit out the melanade";
document.getElementById(div).innerHTML = html;
document.getElementById(link_span).innerHTML = link;
}
function closeCommentForm(postid,num) {
var link_span = "close_comments_"+postid;
var link = "drink the melanade";
document.getElementById(link_span).innerHTML = link;
var link_span = "get_comments_"+postid;
var link = ""+num+" sips of melanade";
document.getElementById(link_span).innerHTML = link;
}
function getComments(postid,num) {
var html = "
";
pid = postid;
var div = "working_"+postid;
var link_span = "get_comments_"+postid;
var link = "put down the melanade";
document.getElementById(div).innerHTML = html;
document.getElementById(link_span).innerHTML = link;
if(num != 0){
http.open('get', 'ajax.php?action=getComments&postid='+postid+'&num='+num);
http.onreadystatechange = handleComments;
http.send(null);
} else {
new Effect.Appear("comments_"+pid);
comments = '
There are no comments...';
div = "working_"+pid;
comments_div = "comments_"+pid;
html = "";
document.getElementById(div).innerHTML = html;
document.getElementById(comments_div).innerHTML = comments;
}
}
function handleComments() {
if(http.readyState == 4){
new Effect.Appear("comments_"+pid);
comments = '
'+http.responseText;
div = "working_"+pid;
comments_div = "comments_"+pid;
html = "";
document.getElementById(div).innerHTML = html;
document.getElementById(comments_div).innerHTML = comments;
}
}
function handleResponse() {
alert(http.readyState);
if(http.readyState == 4){
var response = http.responseText;
var update = new Array();
if(response.indexOf('%!%$%&%' != -1)) {
update = response.split('%!%$%&%');
document.getElementById(update[0]).innerHTML = update[1];
}
}
}
function handleCommentForm() {
if(http.readyState == 4){
var response = http.responseText;
var update = new Array();
if(response.indexOf('%!%$%&%' != -1)) {
update = response.split('%!%$%&%');
document.getElementById(update[0]).innerHTML = update[1];
document.getElementById(update[2]).innerHTML = update[3];
}
}
}
function handleEditForm() {
var title = 'blog_entry_title_';
if(http.readyState == 4){
var response = http.responseText;
var update = new Array();
if(response.indexOf('%!%$%&%' != -1)) {
update = response.split('%!%$%&%');
title = 'blog_entry_title_'+update[0];
date = 'blog_entry_date_'+update[0];
tags = 'tags_'+update[0];
utags = 'user_tags_'+update[0];
body = 'blog_entry_'+update[0];
var editTitle = '