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

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

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

/// Static methods

gzoe.reporting.reportBlogEntry = function( p_link_button, p_blog_entry_id, alert_message ) {
	
	gzoe.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) {gzoe.reporting.reportBlogEntryResponse(cfc_result);}, "json");
	}
}

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

gzoe.reporting.reportBlogComment = function( p_link_button, p_blog_comment_id, alert_message ) {
	
	gzoe.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) {gzoe.reporting.reportBlogEntryResponse(cfc_result);}, "json");
	}
}

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


