function setCookie(name, value) {
	var expiration = new Date();
	var hundredDays = expiration.getTime() + (100 * 24 * 60 * 60 * 1000);
	expiration.setTime(hundredDays);
	var curCookie = name + "=" + escape(value) + ";expires=" + expiration.toGMTString() + ";path=/;";
	document.cookie = curCookie;
}

function getCookie(name) {
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1) {
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	} else {
		begin += 2;
	}
	var end = document.cookie.indexOf(";", begin);
	if (end == -1) end = dc.length;
	return unescape(dc.substring(begin + prefix.length, end));
}

function thanks(votingId) {
	setCookie(votingId,"clicked");
	countVoting = jQuery("#"+votingId).next('span').children("span").text();
	jQuery("#"+votingId).next('span').children("span").text(countVoting*1 + 1);
}

