﻿if(typeof parkside == "undefined") var parkside = new Object();

// Constructor
parkside.reporting = function() {
}

/// Static variables
parkside.reporting.link_button = null;

/// Static methods

parkside.reporting.reportBlogEntry = function( p_link_button, p_blog_entry_id, alert_message ) {
	
	parkside.reporting.link_button = p_link_button;
	
	if (!alert_message || confirm(alert_message)) {
		$.post("custom/modules/reporting/reporting.cfc?method=reportBlogEntry", { blog_entry_id: p_blog_entry_id }, function(cfc_result, status) {parkside.reporting.reportBlogEntryResponse(cfc_result);}, "json");
	}
}

parkside.reporting.reportBlogEntryResponse = function ( cfc_result ) {
	if (cfc_result.length != 0 && parkside.reporting.link_button) {
		parkside.reporting.link_button.parentNode.innerHTML = cfc_result;
	}
	initPageSettingsOnAJAXCall();
}

parkside.reporting.reportBlogComment = function( p_link_button, p_blog_comment_id, alert_message ) {
	
	parkside.reporting.link_button = p_link_button;
	
	if (!alert_message || confirm(alert_message)) {
		$.get("custom/modules/reporting/reporting.cfc?method=reportBlogComment", { blog_comment_id: p_blog_comment_id }, function(cfc_result, status) {parkside.reporting.reportBlogEntryResponse(cfc_result);}, "json");
	}
}

/// Class members
parkside.reporting.prototype = {
	/// class variables
	
	/// class methods
	
}

