﻿function setCookie(name, value, expire) {
   document.cookie = name + "=" + escape(value)
   + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}
function getCookie(Name) {
   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
         return unescape(document.cookie.substring(offset, end))
      } 
   }
}
function onClick()
{	
	if 	(getCookie("english") == "1") 
	{
		setCookie("english","0");
		setTimeout("location.href='/ru/about'",10)
	}
	else
	{
		setCookie("english","1");
		setTimeout("location.href='/en_about.php$opentop=0'",10)
	}		
}
function onLoad()
{
	//setTimeout("location.href='/ru/about'",3000)
}

function resize()
{
	var X, Y;	
	var X1 = 1133;
	var Y1 = 970;	
	//var img = document.getElementById('bg_image');
	var lt1 = document.getElementById('lt1');
	var th10 = document.getElementById('th10');
	var th11 = document.getElementById('th11');	
	var th12 = document.getElementById('th12');
	var th20 = document.getElementById('th20');	
	var th21 = document.getElementById('th21');
	var th22 = document.getElementById('th22');
	var th23 = document.getElementById('th23');
	var th30 = document.getElementById('th30');	
	var th31 = document.getElementById('th31');
	var th32 = document.getElementById('th32');
	var th40 = document.getElementById('th40');	
	var th41 = document.getElementById('th41');
	var th42 = document.getElementById('th42');
	if (navigator.appName.indexOf("Explorer")!=-1)
	{	
		X = document.width;
		Y = document.height;	
	}
	else
	{
		X = Math.max(innerWidth,document.width);
		Y = Math.max(innerHeight,document.height);
	}
	//img.width = X;	
	//img.height = Y1;
	lt1.width = X1;
	th11.width = Math.round(X1*0.23);
	th10.width = Math.round(X1*0.068);
	th23.width = Math.round(X1*0.058);
	//------------------------
	th10.height = Math.round(Y1*0.295);
	th21.height = Math.round(Y1*0.43);
	if (navigator.appCodeName.indexOf("Chrome")!=-1) 
	{
		th41.height = (Y1*0.08);
		th31.height = Math.round(Y1*0.168);
	}		
	if (navigator.appCodeName.indexOf("Mozilla")!=-1) 
	{
		th41.height = (Y1*0.08);
		th31.height = Math.round(Y1*0.17);
	}		
	if ((navigator.appName.indexOf("Explorer")!=-1) || ((navigator.appName.indexOf("opera")!=-1)))
	{
		th41.height = (Y1*0.09);
		th31.height = Math.round(Y1*0.15);
	}
	lt1.height = Y1;
}
function toas()
{
	if 	(getCookie("english") == "1") 
	{
		setTimeout("location.href='en_about.php?opentop=0'",100)
	}
}
