﻿/* Events scripting
--------------------------  */
var emonth, eyear
function eventspaging(year, month, type) {
    // Call ajax function
    emonth = month;
    eyear = year;
    TheSniffa.Events_Paging(year, month, type, eventscallback);
    return false;
}

function eventscallback (response)
{
    // Check for errors
    if(response.error != null) {
    	alert("An error occurred and your results could not be displayed.");
		return;
	}
    // Get the response value
    document.getElementById("dogevents").innerHTML = response.value;
    // Analytics
    if (window.pageTracker != undefined) {
        pageTracker._trackPageview("Dog Events - " + emonth + "/" + eyear); 
    }
}

