var placeholder;

	function getAjaxRequest(page, params, target)
	{
			placeholder = (target);
			
			$(placeholder).fadeOut("fast", function(){
			
				$.ajax({
					type: "GET",
					dataType: "html",
					url: page,
					data: params,
					async: false,
					error: displayAjaxError,
					success: displayAjaxSuccess
				});
				
			});
	}

	function postAjaxRequest(formName, page, params, target)
	{
			placeholder = $(target);
			
			var formName;
			
			$(placeholder).fadeOut("fast", function(){
			
				var formObj = $('form#'+ formName).ajaxForm();
				formData = formObj.formSerialize();
				
				$.ajax({
			
					type: "POST",
					dataType: "html",
					url: page,
					data: formData,
					async: false,
					success: displayAjaxSuccess
				});
			});
			return false;
	}
	
	function displayAjaxError(request, textStatus, errorThrown){
	
		
		$(placeholder).html('<div style="position: relative; top: 50px; text-align:center; padding: 10px; border: 2px solid crimson;background: #DDD; color: crimson;">Sorry, some error occurred<br/>' + textStatus + '</div>');
	
	
	}
	
	function displayAjaxSuccess(responseText, statusText) {
	
			$(placeholder).html(responseText);
			$(placeholder).fadeIn("fast");
	
	
	}