function ZventsSTLIndex(stltype,stlcat,stllimit,stloffset,stlradius,stlwhat,stlwhen,stlwhere)
{
	var stlargs = {};
    switch(stltype)
    {
        case 'p':    // Featured Events
			 stlargs.p =ZventsMini.partner;
			 break;
        case 'ppe':  // Popular Events
			 stlargs.ppe =ZventsMini.partner;
			 break;
        case 'pucc': // Recent User Created Content
			 stlargs.pucc =ZventsMini.partner;
			 break;
        default:
            document.write("<div>You need to include one of the following for event types:<ul><li>p - Featured Events</li><li>ppe - Popular Events</li><li>pucc - Recent User Created Content</li></ul></div>");
            return;
    }
    // Figure out stlargs
	if (stlcat !='')	stlargs.cat = stlcat;        // Category ID
	if (stllimit !='')	stlargs.limit = stllimit;    // Limit
	if (stloffset !='')	stlargs.offset = stloffset;  // Number - Starting index in result list (usually omitted)
	if (stlradius !='')	stlargs.radius = stlradius;	 // radius,
	if (stlwhat != '')	stlargs.what = stlwhat;   	 // String - "What" search string
	if (stlwhen != '')	stlargs.when = stlwhen;    	 // Timeframe - "When" search string
	if (stlwhere != '')	stlargs.where = stlwhere;    // String - "Where" search string
    
    (function( Z ) {
        var ZventsLoadDay = function(stlargs) {
            Z.widget.eventList({
                load: stlargs,
                // Custom render function for event list
                events: function( events ) {
                    var Url = Z.site + '/search?cat='+stlargs.cat;
                    if(events.count == 0)
                    {
                        return['<div class="ZventsNoEvent">More Events Coming Soon</div>\n<div style="clear:both"></div>'];
                    }
                    return [
                        '<div>',
                        events.map(this.event,this).join(''),
                        '</div>\n<div style="clear:both"></div>'
                        ].join('');
                },
                // Custom Event Layout
                date: function( event ) {
                    if( this.showDate === false ) return '';
                        return Z.Date(event.date).format( '{January} {D}' ).toUpperCase();
                },
                event: function( event ) {
                    var d = this.date( event ); var x = false;
                    if (typeof this.CurrentDay  == 'undefined') this.CurrentDay = '';
                    if (this.CurrentDay != d) {
                      x = true;
                      this.CurrentDay = d;
                    }
                    return [
                        (x?'<div class="ZventsEventDate">'+d+'</div>':''),
                        '<div class="ZventsEvent">',
                        '<a class="ZventsEventName" href="',  event.zurl, '">',
                        Z.String.truncate( event.name, this.maxTitle || 40 ),
                        '</a>',
                        ' <br /> ',
                        '<a class="ZventsVenueName" href="',  event.venue.zurl, '">',
                        event.venue.name,
                        '</a>',
                        '</div>'
                    ].join('');
                }
            });
            return false;
        };
        ZventsLoadDay(stlargs);
    })( ZventsMini );
}
