function checkCookie(c) {
	if (!c) {
		alert('Страница использует механизм временных cookie.\nДля продолжения обновите страницу, включив cookie.');
		return false;
	}

	return true;
}

function readCookie(name, doc) {
	if (typeof doc === 'undefined') 
		doc = document;

	var c = doc.cookie, s = c.indexOf(name);
	if (s == -1) 
		return '';

	s += name.length + 1;

	var e = c.indexOf(';', s);
	if (e == -1) 
		e = c.length;

	return unescape(c.substring(s, e));
}

function reloadCImage() {
	image = GetE('code_image');
	image.src = image.src.slice(0, image.src.lastIndexOf('/') + 1) + Math.random().toString().slice(2, 7) + image.src.slice(image.src.lastIndexOf('.'));
	return false;
}
