function startRequester(iRequestType, iSubjectId, iOwnerId) {

	// left requires half of specified width value to subtract from window - when changing do both!
	$.blockUI({ fadeOut: 0, message: '<div id="msgComposer"><div id="msgWait" class="bgPale  jhide">'+sTextWait+'</div><div id="msgForm" class="bgPale"><form onsubmit="return false;"><div class="clearfix"><a href="#" onclick="$.unblockUI(function() { $(\'#msgComposer\').remove(); }); return false;" class="msgComp-x" title="click to close the request window">x</a><h5 class="txt-ctr pad-b">Please let the owner of this item know why you would like access to this item or who you are.</h5></div><dl id="msgFields" class="clearfix"><dt><label for="msgReason" class="msgReasonLabel">Reason</label></dt><dd id="msgReason"></dd><dt>&nbsp;</dt><dd><button onclick="$(\'#msgForm\').slideUp(function() { $(\'#msgWait\').slideDown(function() { sendPrvRequest('+iRequestType+', '+iSubjectId+', '+iOwnerId+'); }) });" class="frmBtn">'+sTextSend+'</button>&nbsp;<button onclick="$.unblockUI(function() { $(\'#msgComposer\').remove(); }); return false;" class="frmBtn">'+sTextCancel+'</button></dd></dl></form></div></div>', css: { top: '133px', width: '500px', left: ( ($(window).width() / 2) - 250) }, applyPlatformOpacityRules: true }); //, overlayCSS: { backgroundColor:'#FFFFFF', opacity: '0.4' }
	$('#msgForm').slideDown(function() {
			var fck = new FCKeditor("msgReasonWyzy");
			fck.ToolbarSet = 'Basic';
			fck.Width = 400;
			$('#msgReason', $(this)).html(fck.CreateHtml());
		});
}

function sendPrvRequest(iRequestType, iSubjectId, iOwnerId) {
	$.post("/api/js/member/requestaccess.php", { t: iRequestType, sid: iSubjectId, oid: iOwnerId, r: FCKeditorAPI.GetInstance('msgReasonWyzy').GetHTML() }, function(aData){
			eval("aData = "+aData);
			sendPrvRequestRsp(aData);
		});
}

function sendPrvRequestRsp(aData) {
	if (aData['errors'] === false) {
		if (!$('#msgComposer').hasClass('static')) {
			$.unblockUI();
			$('#msgComposer').remove();
		} else {
			$('#msgWait').slideUp(function() { $('#msgForm').slideDown() });
			$('#msgTitle').val('');
			FCKeditorAPI.GetInstance('msgReasonWyzy').SetHTML('');
		}
		oMasterNotifier.alert('Your request has been sent');
	} else {
		if (aData['errors'] == -1) {
			$('#msgError').html('Unable to send Request.');
			$('#msgError').show();
		}
		$('#msgWait').slideUp(function() { $('#msgForm').slideDown() });
	}
}

