function help_new(id){
	$.ajax({
		url		:	"/help/new",
		type	: 	"POST",
		data	:	({
			id			: id,
			use_ajax	: true,
			showWindow	: true
		}),
		datatype: 'html',
		success : function(data){
			$('body').append(data);
			$(".window_inner").width(850); 
			$(".window_inner").height(850); 
			$("#window[name='helpwindow']").fadeIn();
		}
	})
}

function help_remove(id){
	$.ajax({
		url		:	"/help/remove",
		type	: 	"POST",
		data	:	({
			id			: id,
			use_ajax	: true,
			showWindow	: true
		}),
		datatype: 'html',
		success : function(data){
			$('body').html(data);
		}
	})
}


function help_close(){
	$("#help").fadeOut("slow").remove();
}

function help_minimize(){
	$('#help_content').hide();
	$("#help").animate({
			width: '25px'
			}
			);	
}

function help_maximize(){
	$("#help").animate({
			width: '280px'
			}
			);	
	$('#help_content').fadeIn();
			
}


function help_show(catid, subid){
	help_close();
	$.ajax({
		url		:	"/help/help",
		type	: 	"POST",
		data	:	({
			catid		: catid,
			use_ajax	: true,
			showWindow	: true
		}),
		datatype: 'html',
		success : function(data){
			$('body').append(data);
			$("#help").fadeIn("slow");
			
			$("#help_sid_"+subid).fadeIn(1200);
			
			blink($("#help_sid_"+subid));
		}
	})	
}


function blink(el) {
    if (!el) {
        el=this
    }
    $(el).animate( { opacity: 0.1 },1200, function() {
        $(this).animate( {opacity: 1 }, 1200, blink );
    } );
}

