function EventsFunctions(){this.get_data=function(loc_id){if(this.TIMEOUT){window.clearTimeout(this.TIMEOUT);
this.TIMEOUT=null;}var parameters="auth_token="+escape(global_auth_token)+";total=5;location="+loc_id;
var request=YAHOO.util.Connect.asyncRequest("POST","/api/events/location_events",{success:function(o){var response=eval("("+o.responseText+")");
if(response.system_error){}else{if(response.length){var eventshtml="";for(var i=0;i<response.length;i++){eventshtml+='<br /><a href="'+response[i].event_url+'">'+response[i].name+"</a> - "+response[i].start_date;
if(response[i].start_time){eventshtml+=" "+response[i].start_time;}if(response[i].description){eventshtml+="<br />"+response[i].description;
}eventshtml+="<br /><br />";}var le=document.createElement("DIV");le.id="location_events";le.innerHTML=eventshtml;
document.body.appendChild(le);tab_lookups.events_tab=new YAHOO.widget.Tab({label:"Events",contentEl:document.getElementById("location_events")});
profileTabs.addTab(tab_lookups.events_tab);}}try{YP.TrackPage("/api/events/location_events");}catch(err){}},failure:function(o){}},parameters);
};}
