flash = false;
if (navigator.userAgent.indexOf('MSIE') == -1) {
  if (navigator.plugins["Shockwave Flash"]) {
    flash = true;
  } else {
    flash = false;
  }
} else {
  try {
    obj = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.8');
    flash = true;
  } catch(e) {
    flash = false;
  }
}



// Получить куки
function getCookie(name) {
      var prefix = name + "=";
      var cookieStartIndex = document.cookie.indexOf(prefix);
      if (cookieStartIndex == -1) return null;
      var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
      if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length;
      return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}


function setCookie (name, value, expires, path, domain, secure) {
      document.cookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}


function get_fold (i) {

var a=(getCookie('cookie'+i)); 

if(a=='show') {
document.getElementById('js_div'+i).style.display='none';
setCookie('cookie'+i,'hide', 'Mon, 01-Jan-2020 00:00:00 GMT', '/');
}
else {
document.getElementById('js_div'+i).style.display='block';
setCookie('cookie'+i,'show', 'Mon, 01-Jan-2020 00:00:00 GMT', '/');
}
}


/*
function set_menu () {
var count=document.getElementById('js_count').innerHTML;
for(i=1;i<=count; i++) {
if(getCookie('cookie'+i)=='show') {
alert('js_div'+i);
document.getElementById('js_div'+i).style.display='block';
}
else {
document.getElementById('js_div'+i).style.display='none';
}

}
   }

 */


	jQuery(document).ready(function(){

			set_menu();
			
			if(getCookie('path')!='/') {
				document.cookie='path=/'; 
				document.cookie='domain=tablogix.ru'; 
			}
	});
	

	
function get_lang (lang) {

function setCookie (name, value, expires, path, domain, secure) {
      document.cookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((secure) ? "; secure" : "");
}

setCookie('lang',lang, 'Mon, 01-Jan-2020 00:00:00 GMT', '/');


window.location = window.location;
}
