function addToCalendar(pid, mid) {
	jQuery.post('/ajax/addToCalendar.php', {perf_id: pid, user_id: mid }, function(data){
		if(data.response){
		//	jQuery('#perf_'+pid).hide(); //.html('Added to Calendar');
		//	alert("This event has been successfully added to your calendar.");
		}
		
	}, "json");
}
function showadv() {
	var t = jQuery("#advance")[0].checked;
	if(t)
		document.getElementById('advid').style.display="block";
	else
		document.getElementById('advid').style.display="none";
}
function deleteMyEvent(eventid){
	var $j = jQuery;
	if(confirm('Do you want to delete this event?')) {
		$j.post('/ajax/events.php', {func: 'deletemyevent', id: eventid}, function(data){
			if(data.val){
				$j('#perf_'+eventid).hide();
			}
		}, "json");
	}
}
function deleteMyPerf(eventid){
	var $j = jQuery;
	if(confirm('Do you want to delete this performance?')) {
		$j.post('/ajax/events.php', {func: 'deletemyperf', id: eventid}, function(data){
			if(data.val == true){
				$j('#myperf_'+eventid).hide();
			}
			else
			{
				alert("There was a problem deleting this performance...");
			}
		}, "json");
	}
}
function addFavoriteMp3(mp3_id){
	var $j = jQuery;
	$j.post('/ajax/events.php', {func: 'addMp3Favorite', mp3id: mp3_id}, function(data){
		//if(data.val){
			alert(data);
		//}
	//}, "json");
	});
}
function fr(action, uuid, muid, reqid){
	var $j = jQuery;
	switch(action) {
		case 'approve':
			$j.post('/ajax/events.php', {func: 'approveFriend', uid: uuid, mid: muid, rid: reqid}, function(data){
				if(data.val){
					$j('#req_'+reqid).hide();
					document.location.href="/mail/inbox/msg=Successfully+accepted+friend+request!";
				}
			}, "json")
			break;
		case 'deny':
			if(confirm('Are you sure?')) {
				$j.post('/ajax/events.php', {func: 'denyFriend', uid: uuid, mid: muid, rid: reqid}, function(data){
					if(data.val){
						document.location.href="/mail/inbox/msg=Successfully+denied+friend+request!";
					}
				}, "json");	
			}
	}
}	

//Added by Reid for the login scripts
function sjr_redirect_login(url)
{
	window.location = url;
}
function sjr_reload_login()
{
	window.location.reload();
}
