function doReportEpisode(id){
  if (id){
		var problem = $('#problem').val();
		if (problem){
			$('#reportcontent').html("<center>Please wait...</center>");
			$.get(baseurl+"/ajax/reportepisode.php",{   
					episode: id,
					problem: problem
				}, function(resp) {
					$('#reportcontent').html("<center>Thank you! Our administrators will review and fix this episode shortly<br /><br /></center>");
				}
			); 
		}
  }
}

function reportEpisode(){
	$('object').hide();
	$('iframe').hide();
	var windowWidth = $(window).width();
	var windowHeight = $(window).height();
	var scrollpos = $(window).scrollTop();
	
	var popupHeight = $("#modal").height();
	var popupWidth = $("#modal").width();
	
	
	$("#modal").css({
		"position": "fixed",
		"top": ((windowHeight/2)-(popupHeight/2)),
		"left": (windowWidth/2)-(popupWidth/2)
	});

	$("#backgroundPopup").css({	"height": windowHeight});
	$("#backgroundPopup").css({"opacity": "0.7"});
	$('#backgroundPopup').show();
	$('#modal').show();
}

function doReportMovie(id){
	if (id){
		var problem = $('#problem').val();
		if (problem){
			$('#reportcontent').html("<center>Please wait...</center>");
			$.get(baseurl+"/ajax/reportmovie.php",{   
					movie: id,
					problem: problem
				}, function(resp) {
					$('#reportcontent').html("<center>Thank you! Our administrators will review and fix this movie shortly<br /><br /></center>");
				}
			); 
		}
	}
}

function reportMovie(){
	$('object').hide();
	$('iframe').hide();
	var windowWidth = $(window).width();
	var windowHeight = $(window).height();
	var scrollpos = $(window).scrollTop();
	
	var popupHeight = $("#modal").height();
	var popupWidth = $("#modal").width();
	
	
	$("#modal").css({
		"position": "fixed",
		"top": ((windowHeight/2)-(popupHeight/2)),
		"left": (windowWidth/2)-(popupWidth/2)
	});

	$("#backgroundPopup").css({	"height": windowHeight});
	$("#backgroundPopup").css({"opacity": "0.7"});
	$('#backgroundPopup').show();
	$('#modal').show();
}
