/*
+----------------------------------------------------------------------+
| Copyright (c) 2007 Coldwell Banker Funkhouser Realtors               |
+----------------------------------------------------------------------+
| Authors: Matthew Kirkpatrick <matt@cbfunkhouser.com>                 |
|          Scott Rogers <scott@cbfunkhouser.com>                       |
+----------------------------------------------------------------------+
 Created:      August 29, 2007
 Last Updated: August 29, 2007
*/

/* EXAMPLE FUNCTION
*/
myExampleFunction = function (divID, alertMsg) {
	$(divID).innerHTML = alertMsg;
	new Effect.Appear(divID, {queue: 'front'});
	new Effect.Puff(divID, {delay: 3.0, queue: 'end'});
}

commentsOn = function (entry_id) {
	new Effect.Appear(('comments_' + entry_id), {delay: .25, duration: 1});
	new Ajax.Updater(('comments_' + entry_id), '/blog/files_includes/modules/comments.inc.php', {parameters: 'entry_id=' + entry_id, method: 'post', evalScripts: true});
}

commentsOff = function (entry_id) {
	new Effect.BlindUp(('comments_' + entry_id), {delay: 0, duration: .75});
}

readMore = function (entry_id) {
	$('entry_' + entry_id).style.height = '100%';
	$('entry_' + entry_id).style.overflow = 'visible';
}

submitComment = function (entry_id) {
	if ('document.comments_form' + entry_id + '.name.value' == '') {
		return false;
	}
	submitComment2(entry_id);
}

submitComment2 = function (entry_id) {
	new Ajax.Updater(('comments_' + entry_id), '/blog/files_includes/modules/comments.inc.php', {parameters:Form.serialize('comments_form_' + entry_id), method: 'GET', evalScripts: true});
	new Ajax.Updater(('num_comments_' + entry_id), '/blog/files_includes/modules/comments_count.inc.php', {parameters: 'entry_id=' + entry_id, method: 'post', evalScripts: true});
	new Ajax.Updater(('blog_recent_comments'), '/blog/files_includes/modules/recent_comments.inc.php', {evalScripts: true});
}

showSubscribe = function () {
	new Ajax.Updater(('left'), '/blog/files_includes/modules/subscribe_options.inc.php', {evalScripts: true});
}

showTopProps = function () {
	new Ajax.Updater(('left'), '/blog/files_includes/modules/top_properties_all.inc.php', {evalScripts: true});
}
