function viewer_elements(_obj,el_start,el_stop) {
	for(i=0;i<=el_stop-el_start;i++)
		_obj.elements[el_start+i].disabled = !_obj.elements[el_start+i].disabled;
}
//************************************************
function change_div(text_lang) {
	if (text_lang=='ru') {
		document.getElementById('div_ru').style.display = 'block';
		//document.getElementById('div_en').style.display = 'none';
	}
	else if (text_lang=='en') {
		document.getElementById('div_ru').style.display = 'block';
		//document.getElementById('div_en').style.display = 'block';
	}
}
//************************************************
function BodySize()
{
	N=window.navigator.appName.substring(0,8);
	w=0;h=0;
	if(N=="Microsof"){
		w=document.body.clientWidth;
		h=document.body.clientHeight;
	}
	if(N=="Netscape"){
		w=window.innerWidth;
		h=window.innerHeight;
	}
	document.forms[0].elements[0].value=w;
	document.forms[0].elements[1].value=h;
}
//************************************************
function changelanguage(_obj) {
    /*
	_text_lang = document.getElementById('text_lang');
	_text_lang_value = _text_lang.options[_text_lang.options.selectedIndex].value
	if (_text_lang_value == 'ru')
		_from = document.forma_ru
	else
		_from = document.forma_en
	_from.lang.value=_obj.options[_obj.options.selectedIndex].value;
	_from.text.value=document.content.text.value
	_from.submit();
	*/
}
//************************************************
function move_textarea() {
	N=window.navigator.appName.substring(0,8);
	w=0;
	if(N=="Microsof")
		w=document.body.clientWidth;
	if(N=="Netscape")
		w=window.innerWidth;
//	alert (w);
	w = Math.floor(((w - 50) / 2)/7)+5;
	document.content.text.cols = w;
	document.content.text_rez.cols = w;
}
//************************************************
//************************************************
// Example:
// alert( readCookie("myCookie") );
function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}
//************************************************
// Example:
// writeCookie("myCookie", "my name", 24);
// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.
function writeCookie(name, value, hours)
{
  var expire = "";
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}
//************************************************
if (!readCookie('CorrectorCustomer'))
	writeCookie('CorrectorCustomer', Math.floor(Math.random()*1000000), 8760);