// JavaScript Document

	function reportBox(cid) {
		if ( $('#hiddenModalContent'+cid).length > 0 )
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenModalContent'+cid+'&modal=true',false);
		else 
			$$.pForumReportForm(cid);
	}

	rn.pForumReportForm = function(cid) {
		rn.rmsSend({ mod:'report', tar:'forum', op:'pForumReport',cid:cid },rn.pForumReportFormr);
    };
	
	rn.pForumReportFormr = function(oRmsR) {
		if (oRmsR['rmsS']==true)
		{
			$('body').append(oRmsR['rmsD']['box']);
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenModalContent'+oRmsR['rmsD']['cid']+'&modal=true',false);

		}
		else if (oRmsR['rmsS']==false)
		{
			alert(oRmsR['rmsM']);
		}
		else
		{
			alert('Communication Error');
		}
    };
	
	function cessBox(cid) {
		if ( $('#hiddenCessContent'+cid).length > 0 )
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenCessContent'+cid+'&modal=true',false);
		else 
			$$.pForumCessForm(cid);
	}
	
	rn.pForumCessForm = function(cid) {
		rn.rmsSend({ mod:'report', tar:'forum', op:'pForumCess',cid:cid },rn.pForumCessFormr);
    };
	
	rn.pForumCessFormr = function(oRmsR) {
		if (oRmsR['rmsS']==true)
		{
			$('body').append(oRmsR['rmsD']['box']);
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenModalContent'+oRmsR['rmsD']['cid']+'&modal=true',false);

		}
		else if (oRmsR['rmsS']==false)
		{
			alert(oRmsR['rmsM']);
		}
		else
		{
			alert('Communication Error');
		}
    };
///////////////////////////////////////////////////
function delThreadBox(tid) {
		if ( $('#hiddenCessContent'+tid).length > 0 )
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenThreadContent&modal=true',false);
		else 
			$$.pForumDelThreadForm(tid);
	}
	
	rn.pForumDelThreadForm = function(tid) {
		rn.rmsSend({ mod:'report', tar:'forum', op:'pForumDelThread',tid:tid },rn.pForumDelThreadFormr);
    };
	
	rn.pForumDelThreadFormr = function(oRmsR) {
		if (oRmsR['rmsS']==true)
		{
			$('body').append(oRmsR['rmsD']['box']);
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenThreadContent&modal=true',false);

		}
		else if (oRmsR['rmsS']==false)
		{
			alert(oRmsR['rmsM']);
		}
		else
		{
			alert('Communication Error');
		}
    };

	function sendDelThread(obj,cid) {
		var val = $(obj).parents('#reportbody').children('#reportdiv').children('#selval').val();
		var reason = $(obj).parent().siblings('div :second').children('#selval').val();
	
		$$.pDelThread(cid, val, reason);
		$('div #commentid'+cid).hide();
	}


///////////////////////////////////////////////////
	
	function reportUser(uid) {
		if ( $('#hiddenModalContent'+uid).length > 0 )
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenModalContent'+uid+'&modal=true',false);
		else 
			$$.pUserReportForm(uid);
	}

	rn.pUserReportForm = function(uid) {
		rn.rmsSend({ mod:'report', tar:'forum', op:'pUserReport',uid:uid },rn.pUserReportFormr);
    };
	
	rn.pUserReportFormr = function(oRmsR) {
		if (oRmsR['rmsS']==true)
		{
			$('body').append(oRmsR['rmsD']['box']);
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenModalContent'+oRmsR['rmsD']['uid']+'&modal=true',false);

		}
		else if (oRmsR['rmsS']==false)
		{
			alert(oRmsR['rmsM']);
		}
		else
		{
			alert('Communication Error');
		}
    };
	
	rn.pSendUserReport = function(userid, profileid,val,reason) {
		rn.rmsSend({ mod:'user', tar:'user', op:'pSendUserReport', uid:userid , pid:profileid, val:val, reason:reason },rn.pSendUserReportr);
    };
	
	rn.pSendUserReportr = function(oRmsR) {
		
			  
		if (oRmsR['rmsS']==true)
		{
			
		}
		else if (oRmsR['rmsS']==false)
		{
			alert(oRmsR['rmsM']);
		}	
		else
		{
			alert('Communication Error');			
		}
    };	
	
///////////////////////////////////////////////////
	
	function sendPhoto(obj,pid, uid) {
		var val = $(obj).parents('#reportbody').children('#reportdiv').children('#selval').val();
		var reason = $(obj).parent().siblings('div :second').children('textarea').val();
		
		$$.pSendPhotoReport(uid,pid, val, reason);
	}

	
	function reportPhoto(pid) {
		if ( $('#hiddenModalContent'+pid).length > 0 )
			tb_show(null,'#TB_inline?height=300&width=700&inlineId=hiddenModalContent'+pid+'&modal=true',false);
		else 
			$$.pPhotoReportForm(pid);
	}

	rn.pPhotoReportForm = function(pid) {
		rn.rmsSend({ mod:'report', tar:'photo', op:'pPhotoReport',pid:pid },rn.pPhotoReportFormr);
    };
	
	rn.pPhotoReportFormr = function(oRmsR) {
		if (oRmsR['rmsS']==true)
		{
			$('body').append(oRmsR['rmsD']['box']);
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenModalContent'+oRmsR['rmsD']['pid']+'&modal=true',false);

		}
		else if (oRmsR['rmsS']==false)
		{
			alert(oRmsR['rmsM']);
		}
		else
		{
			alert('Communication Error');
		}
    };
	
	rn.pSendPhotoReport = function(userid, photoid,val,reason) {
		rn.rmsSend({ mod:'photo', tar:'photo', op:'pSendPhotoReport', uid:userid , pid:photoid, val:val, reason:reason },rn.pSendPhotoReportr);
    };
	
	rn.pSendPhotoReportr = function(oRmsR) {
		
			  
		if (oRmsR['rmsS']==true)
		{
			
		}
		else if (oRmsR['rmsS']==false)
		{
			alert(oRmsR['rmsM']);
		}	
		else
		{
			alert('Communication Error');			
		}
    };	
	
	
function reportVideo(vid) {
		if ( $('#hiddenModalContent'+vid).length > 0 )
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenModalContent'+vid+'&modal=true',false);
		else 
			$$.pVideoReportForm(vid);
	}

	rn.pVideoReportForm = function(vid) {
		rn.rmsSend({ mod:'report', tar:'video', op:'pVideoReport',vid:vid },rn.pVideoReportFormr);
    };
	
	rn.pVideoReportFormr = function(oRmsR) {
		if (oRmsR['rmsS']==true)
		{
			$('body').append(oRmsR['rmsD']['box']);
			tb_show(null,'#TB_inline?height=550&width=700&inlineId=hiddenModalContent'+oRmsR['rmsD']['vid']+'&modal=true',false);

		}
		else if (oRmsR['rmsS']==false)
		{
			alert(oRmsR['rmsM']);
		}
		else
		{
			alert('Communication Error');
		}
    };
	
	rn.pSendVideoReport = function(userid, videoid,val,reason) {
		rn.rmsSend({ mod:'video', tar:'video', op:'pSendVideoReport', uid:userid , vid:videoid, val:val, reason:reason },rn.pSendVideoReportr);
    };
	
	rn.pSendVideoReportr = function(oRmsR) {
		
			  
		if (oRmsR['rmsS']==true)
		{
			
		}
		else if (oRmsR['rmsS']==false)
		{
			alert(oRmsR['rmsM']);
		}	
		else
		{
			alert('Communication Error');			
		}
    };	
			