function GetE(id) {
	return document.getElementById(id);
}

function GetN(name) {
	return document.getElementsByName(name);
}

function GetT(tag) {
	return document.getElementsByTagName(tag);
}

function CountSymbols(Element, MaxLength) {
	if (Element.value.length>MaxLength) 
		Element.value=Element.value.substring(0, MaxLength);
	GetE('c_'+Element.id).innerHTML=', осталось: '+(MaxLength-Element.value.length);
}

function ReadCookie(name) {
	var Cooks=document.cookie;
	var startIndex=Cooks.indexOf(name);
	if (startIndex==-1) 
		return false;
	startIndex+=name.length+1;
	var endIndex=Cooks.indexOf(';', startIndex);
	if (endIndex==-1) 
		endIndex=Cooks.length;
	var CookValue=Cooks.substring(startIndex, endIndex);
	return unescape(CookValue);
}

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