// подключение таблиц стилей
ua=screen.availWidth;
l='<LINK rel="stylesheet" type="text/css" href="';
c='.css">';

if (/1024/.test(ua)){document.write(l+'1024'+c);var Iwidth="_1024";}
if (/1152/.test(ua)){document.write(l+'1024'+c);var Iwidth="_1024";}
if (/1280/.test(ua)){document.write(l+'1280'+c);var Iwidth="_1280";}
if (/1360/.test(ua)){document.write(l+'1280'+c);var Iwidth="_1280";}
if (/1440/.test(ua)){document.write(l+'1280'+c);var Iwidth="_1280";}
if (/1600/.test(ua)){document.write(l+'1280'+c);var Iwidth="_1280";}
if (/1920/.test(ua)){document.write(l+'1280'+c);var Iwidth="_1280";}
if (/2048/.test(ua)){document.write(l+'1280'+c);var Iwidth="_1280";}

function Blok1()//навигация
{
 document.getElementById("blok1").style.display="block";
 document.getElementById("img1_blok1").style.display="none";
 document.getElementById("blok2").style.display="none";
 document.getElementById("img1_blok2").style.display="block";
 document.getElementById("blok3").style.display="none";
 document.getElementById("img1_blok3").style.display="block";
 document.getElementById("blok4").style.display="none";
 document.getElementById("img1_blok4").style.display="block";
 document.getElementById("blok5").style.display="none";
 document.getElementById("img1_blok5").style.display="block";
}
function Blok2()//навигация
{
 document.getElementById("blok1").style.display="none";
 document.getElementById("img1_blok1").style.display="block";
 document.getElementById("blok2").style.display="block";
 document.getElementById("img1_blok2").style.display="none";
 document.getElementById("blok3").style.display="none";
 document.getElementById("img1_blok3").style.display="block";
 document.getElementById("blok4").style.display="none";
 document.getElementById("img1_blok4").style.display="block";
 document.getElementById("blok5").style.display="none";
 document.getElementById("img1_blok5").style.display="block";
}
function Blok3()//навигация
{
 document.getElementById("blok1").style.display="none";
 document.getElementById("img1_blok1").style.display="block";
 document.getElementById("blok2").style.display="none";
 document.getElementById("img1_blok2").style.display="block";
 document.getElementById("blok3").style.display="block";
 document.getElementById("img1_blok3").style.display="none";
 document.getElementById("blok4").style.display="none";
 document.getElementById("img1_blok4").style.display="block";
 document.getElementById("blok5").style.display="none";
 document.getElementById("img1_blok5").style.display="block";
}
function Blok4()//навигация
{
 document.getElementById("blok1").style.display="none";
 document.getElementById("img1_blok1").style.display="block";
 document.getElementById("blok2").style.display="none";
 document.getElementById("img1_blok2").style.display="block";
 document.getElementById("blok3").style.display="none";
 document.getElementById("img1_blok3").style.display="block";
 document.getElementById("blok4").style.display="block";
 document.getElementById("img1_blok4").style.display="none";
 document.getElementById("blok5").style.display="none";
 document.getElementById("img1_blok5").style.display="block";
}
function Blok5()//навигация
{
 document.getElementById("blok1").style.display="none";
 document.getElementById("img1_blok1").style.display="block";
 document.getElementById("blok2").style.display="none";
 document.getElementById("img1_blok2").style.display="block";
 document.getElementById("blok3").style.display="none";
 document.getElementById("img1_blok3").style.display="block";
 document.getElementById("blok4").style.display="none";
 document.getElementById("img1_blok4").style.display="block";
 document.getElementById("blok5").style.display="block";
 document.getElementById("img1_blok5").style.display="none";
}
var Top_Menu='<div id="menu_top"><!--верхнее меню-->';
var url_html=document.URL;
if(/blok1/.test(url_html))
{
if(/blok1.html/.test(url_html))
{
Top_Menu+='<div id="top_img1" style="background-image:url(img/top_img1';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<img class="h1_top_menu" src="img/non.gif" alt="">';
Top_Menu+='</div>';
}
else {
Top_Menu+='<div id="top_img1" style="background-image:url(img/top_img1';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<a href="blok1.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
}
else {
Top_Menu+='<div id="top_img1" onmouseover="DoFade(1)" onmouseout="Fade(1)">';
Top_Menu+='<a href="blok1.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
if(/blok2/.test(url_html))
{
if(/blok2.html/.test(url_html))
{
Top_Menu+='<div id="top_img2" style="background-image:url(img/top_img2';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<img class="h1_top_menu" src="img/non.gif" alt="">';
Top_Menu+='</div>';
}
else {
Top_Menu+='<div id="top_img2" style="background-image:url(img/top_img2';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<a href="blok2.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
}
else {
Top_Menu+='<div id="top_img2" onmouseover="DoFade(2)" onmouseout="Fade(2)">';
Top_Menu+='<a href="blok2.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
if(/blok3/.test(url_html))
{
if(/blok3.html/.test(url_html))
{
Top_Menu+='<div id="top_img3" style="background-image:url(img/top_img3';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<img class="h1_top_menu" src="img/non.gif" alt="">';
Top_Menu+='</div>';
}
else {
Top_Menu+='<div id="top_img3" style="background-image:url(img/top_img3';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<a href="blok3.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
}
else {
Top_Menu+='<div id="top_img3" onmouseover="DoFade(3)" onmouseout="Fade(3)">';
Top_Menu+='<a href="blok3.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
if(/blok4/.test(url_html))
{
if(/blok4.html/.test(url_html))
{
Top_Menu+='<div id="top_img4" style="background-image:url(img/top_img4';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<img class="h1_top_menu" src="img/non.gif" alt="">';
Top_Menu+='</div>';
}
else {
Top_Menu+='<div id="top_img4" style="background-image:url(img/top_img4';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<a href="blok4.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
}
else {
Top_Menu+='<div id="top_img4" onmouseover="DoFade(4)" onmouseout="Fade(4)">';
Top_Menu+='<a href="blok4.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
if(/blok5/.test(url_html))
{
if(/blok5.html/.test(url_html))
{
Top_Menu+='<div id="top_img5" style="background-image:url(img/top_img5';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<img class="h1_top_menu" src="img/non.gif" alt="">';
Top_Menu+='</div>';
}
else {
Top_Menu+='<div id="top_img5" style="background-image:url(img/top_img5';
Top_Menu+=Iwidth;
Top_Menu+='.jpg);">';
Top_Menu+='<a href="blok5.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
}
else {
Top_Menu+='<div id="top_img5" onmouseover="DoFade(5)" onmouseout="Fade(5)">';
Top_Menu+='<a href="blok5.html"><img class="h1_top_menu" src="img/non.gif" alt=""></a>';
Top_Menu+='</div>';
}
Top_Menu+='</div>';

var Top_Zakladki="";
var Iur2="";
var Iur3=Iwidth + '.jpg);">';
if(/index/.test(url_html)||(url_html.length<=27)){
Iur2="index"+Iur3;
Top_Zakladki+='<div id="zakladki"  style="background-image:url(img/';
Top_Zakladki+=Iur2;
Top_Zakladki+='<img id="zakladki_1" src="img/non.gif" alt="">';
Top_Zakladki+='<a href="compani.html"><img id="zakladki_2" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<a href="contakt.html"><img id="zakladki_3" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<a href="map.html"><img id="zakladki_4" src="img/non.gif" alt=""></a>';
Top_Zakladki+='</div>';
}
if(/compani/.test(url_html)){
Iur2="compani"+Iur3;
Top_Zakladki+='<div id="zakladki"  style="background-image:url(img/';
Top_Zakladki+=Iur2;
Top_Zakladki+='<a href="http://www.donative.ru/"><img id="zakladki_1" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<img id="zakladki_2" src="img/non.gif" alt="">';
Top_Zakladki+='<a href="contakt.html"><img id="zakladki_3" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<a href="map.html"><img id="zakladki_4" src="img/non.gif" alt=""></a>';
Top_Zakladki+='</div>';
}
if(/\bcontakt\b/.test(url_html)){
Iur2="contakt"+Iur3;
Top_Zakladki+='<div id="zakladki"  style="background-image:url(img/';
Top_Zakladki+=Iur2;
Top_Zakladki+='<a href="http://www.donative.ru/"><img id="zakladki_1" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<a href="compani.html"><img id="zakladki_2" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<img id="zakladki_3" src="img/non.gif" alt="">';
Top_Zakladki+='<a href="map.html"><img id="zakladki_4" src="img/non.gif" alt=""></a>';
Top_Zakladki+='</div>';
}
if(/map/.test(url_html)){
Iur2="map"+Iur3;
Top_Zakladki+='<div id="zakladki"  style="background-image:url(img/';
Top_Zakladki+=Iur2;
Top_Zakladki+='<a href="http://www.donative.ru/"><img id="zakladki_1" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<a href="compani.html"><img id="zakladki_2" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<a href="contakt.html"><img id="zakladki_3" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<img id="zakladki_4" src="img/non.gif" alt="">';
Top_Zakladki+='</div>';
}
else {
Iur2=""+Iur3;
Top_Zakladki+='<div id="zakladki"  style="background-image:url(img/';
Top_Zakladki+=Iur2;
Top_Zakladki+='<a href="http://www.donative.ru/"><img id="zakladki_1" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<a href="compani.html"><img id="zakladki_2" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<a href="contakt.html"><img id="zakladki_3" src="img/non.gif" alt=""></a>';
Top_Zakladki+='<a href="map.html"><img id="zakladki_4" src="img/non.gif" alt=""></a>';
Top_Zakladki+='</div>';
}
function Fade(im1) {
      var Iurl_1="url(img/top_img"+im1+"-1"+Iwidth+".jpg)";
      if(im1==1){document.getElementById("top_img1").style.backgroundImage = Iurl_1}
      if(im1==2){document.getElementById("top_img2").style.backgroundImage = Iurl_1}
      if(im1==3){document.getElementById("top_img3").style.backgroundImage = Iurl_1}
      if(im1==4){document.getElementById("top_img4").style.backgroundImage = Iurl_1}
      if(im1==5){document.getElementById("top_img5").style.backgroundImage = Iurl_1}
       }
function DoFade(im1) {
      var Iurl="url(img/top_img"+im1+Iwidth+".jpg)";
      if(im1==1){document.getElementById("top_img1").style.backgroundImage = Iurl}
      if(im1==2){document.getElementById("top_img2").style.backgroundImage = Iurl}
      if(im1==3){document.getElementById("top_img3").style.backgroundImage = Iurl}
      if(im1==4){document.getElementById("top_img4").style.backgroundImage = Iurl}
      if(im1==5){document.getElementById("top_img5").style.backgroundImage = Iurl}
       }



