﻿isIE=false;
isOPERA=false;
isNS=false;
isIE4=false;
notres=true;
clear_=false;
clear2_=false;
var userbrouser,clientwid;
function elstyle(el){if(isIE||isNS||isOPERA){r=document.getElementById(el).style}else{if(isIE4){r=document.all[el].style}}return (r)}
function elements(el){if(isIE||isNS||isOPERA){r=document.getElementById(el)}else{if(isIE4){r=document.all[el]}}return (r)}
function navig(){BrUserAgent=navigator.userAgent.toLowerCase();if(BrUserAgent.indexOf('opera')!=-1){userbrouser="Opera"}else if(BrUserAgent.indexOf('msie')!=-1){userbrouser="Explorer"}else if(window.navigator.userAgent.indexOf ("Gecko")>0){userbrouser="Netscape"}}
navig();
function brous(){if(userbrouser=="Explorer"){isIE=(document.getElementById)?true:false;isIE4=(document.layers)?true:false}if(userbrouser=="Opera"){isOPERA=true}if(userbrouser=="Netscape"){isNS=true}if(!(isNS||isIE||isIE4||isOPERA)){isIE=true;}}
brous();
function trim(){bool=true;inp=document.URL;var szam='';qwq=inp.length;for (i=0;i<=qwq;i++){if((inp.charAt(i)=='?')||(inp.charAt(i)=='#')){return(szam);bool=false}else{szam=szam+inp.charAt(i)}}if(bool){return(szam)}}
function fyy(){window.status=''}
function fzz(j179){if((j179.charAt(0)=='?')||(j179.charAt(0)=='#')||(j179.charAt(0)=='/')){window.status='Переход на страницу:  '+trim()+j179}else{window.status='Переход на страницу:  '+j179}} 
function cur(bd1){
//elstyle(bd1).cursor='hand';
elstyle(bd1).cursor='pointer'
}
function dl(j183){document.location=j183}
function Zind(n0,n1){elstyle(n0).zIndex=n1}
function colorss(n2,n3){elstyle(n2).background=n3}
function clear_inp(id_)
{
if(!clear_){elements(id_).value='';}
}
function start_inp(id_)
{
if(!clear_||elements(id_).value==''){elements(id_).value='поиск';}
}
function stat_res_inp()
{
clear_=true;
}
//////////////////////////////////////////////////////
function clear_inp2(id_)
{
if(!clear2_){elements(id_).value='';}
}
function start_inp2(id_)
{
if(!clear2_||elements(id_).value==''){elements(id_).value='расширенный поиск';}
}
function stat_res_inp2()
{
clear2_=true;
}
/////////////////////////////////////////////////////
function vibor(serid,maxer)
{
for (i=0;i<=maxer;i++)
{
id=serid+i;
elements(id).checked=elements(serid).checked;}
}

function checkk(idd,maxid)
{
ex=false;
for (i=0;i<=maxid;i++)
{
id=idd+i;
if (elements(id).checked==true){ex=true}
}
if (ex){elements(idd).checked=true}else{elements(idd).checked=false}
}
///////////////////////////////////////////////////////////////////////////////////////////////////
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
   {
   var way="";
   for(var i=0; i<document.images.length; i++)
      {
          var img = document.images[i];
          var imgName = img.src.toUpperCase();
          var ispx1=imgName.substring(imgName.length-8, imgName.length);
            if (ispx1=="/PX1.GIF")
                 {
                    way=img.src;
                 }
      }
   for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i];
         var imgName = img.src.toUpperCase();
         if (imgName.substring(imgName.length-4, imgName.length) == ".PNG")
             {
               var img = document.images[i];
                src = img.src; 
                img.src=way;                           
                img.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')"; 
             }
     
      }
    correct_fon();
   }
function correct_fon()
  {  
     src=elements('left_fon').background;	 
     elstyle('left_fon').background='';
    if (src) elements('left_fon').runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
  }
  var vis=true;
function close_()
{
if(!vis)
elstyle('eding').visibility='hidden';
vis=true;
}
function open_()
{
if(vis)
elstyle('eding').visibility='visible';
vis=false
}
var 
   id_array=new Array();
   text=new Array();
   oldtext=new Array();
function on_(el)
 {
 b=false;
 for (i=0;i<id_array.length;i++)
  {
  if (id_array[i]==el)
   {
    if (text[i]==true)
	 {
      el.value='';
	 } 
	b=true;
   }
  }
  num=id_array.length;
  if(b==false){id_array[num]=el; text[num]=true;oldtext[num]=el.value;el.value='';}
  
 }
 //---------------------------------------------------------------------------------------
 function off_(el)
 {
 for (i=0;i<id_array.length;i++)
  {
  if (id_array[i]==el)
   {
   b='';buf=el.value;
	 for(j=0;j<el.value.length;j++)
	 { 
	 c=j+1;
	 if(buf.substring(j,c)!=' '){b=b+buf.substring(j,c);}
	 }
	 b=b.toUpperCase();
   if ((text[i]==true)||(b=='')||(b==oldtext[i].toUpperCase()))
    {	 
	text[i]=true;
	el.value=oldtext[i];
	}
   }
  }
 }
 //------------------------------------------------------------------------------------------
 function click_(el)
 {
 b=false;
 for (i=0;i<id_array.length;i++)
  {
  if (id_array[i]==el)
   {
   text[i]=false;b=true;
   }
  }
  num=id_array.length;
  if(b==false){id_array[num]=el; text[num]=false;oldtext[num]=el.value;el.value='';}
 }
 //////////////////////////////////////////////////////
 function writemail()
 {
 a=new Array();
 a[0]="<a href='"; a[1]='m'; a[2]='a'; a[3]='i'; a[4]='l'; a[5]='t'; a[6]='o'; a[7]=':'; a[8]='p'; a[9]='r';
 a[10]='o'; a[11]='f'; a[12]='i'; a[13]='t'; a[14]='a'; a[15]='@'; a[16]='p'; a[17]='r'; a[18]='o'; a[19]='f';
 a[20]='i'; a[21]='t'; a[22]='a'; a[23]='.'; a[24]='r'; a[25]='u'; a[26]="'"; a[27]='>ProfitA';a[28]='@';a[29]='ProfitA';a[30]='.';a[31]='Ru</a>';
 buf="";
 for(i=0;i<32;i++)
 {
 buf=buf+a[i];
 }
document.write(buf);
 }
 /////////////////////////////////////////////////////
function writemail_kont()
 {
 a=new Array();
 a[0]="<a href='"; a[1]='m'; a[2]='a'; a[3]='i'; a[4]='l'; a[5]='t'; a[6]='o'; a[7]=':'; a[8]='p'; a[9]='r';
 a[10]='o'; a[11]='f'; a[12]='i'; a[13]='t'; a[14]='a'; a[15]='@'; a[16]='p'; a[17]='r'; a[18]='o'; a[19]='f';
 a[20]='i'; a[21]='t'; a[22]='a'; a[23]='.'; a[24]='r'; a[25]='u'; a[26]="'"; a[27]='><b>';a[28]='P'; a[29]='r';
 a[30]='o'; a[31]='f'; a[32]='i'; a[33]='t'; a[34]='A'; a[35]='@'; a[36]='P'; a[37]='r'; a[38]='o'; a[39]='f';
 a[40]='i'; a[41]='t'; a[42]='A'; a[43]='.'; a[44]='R'; a[45]='u</b></a>';
 buf="";
 for(i=0;i<46;i++)
 {
 buf=buf+a[i];
 }
document.write(buf);
 }
 function writemail_error()
 {
 a=new Array();
 a[0]="<a href='"; a[1]='m'; a[2]='a'; a[3]='i'; a[4]='l'; a[5]='t'; a[6]='o'; a[7]=':'; a[8]='p'; a[9]='r';
 a[10]='o'; a[11]='f'; a[12]='i'; a[13]='t'; a[14]='a'; a[15]='@'; a[16]='p'; a[17]='r'; a[18]='o'; a[19]='f';
 a[20]='i'; a[21]='t'; a[22]='a'; a[23]='.'; a[24]='r'; a[25]='u'; a[26]="'"; a[27]='>СЮДА</a>';
 buf="";
 for(i=0;i<28;i++)
 {
 buf=buf+a[i];
 }
document.write(buf);
 }
//////////////////для иконки////////////////////////////////////////////////////////////////////////////////////////////////////
var k1;
var k40;
k2=40;
k3=-5.2;
k36=0.17;
kold=1;k4=0;k5=6;k6=20;k7=15;k8=8;k9=3;k511=6;k61=20;k71=15;k81=8;k91=3;k10=new Array (1);k11=new Array (1);k101=new Array (1);k111=new Array (1);
k12=new Array (1);k13=new Array (1);k14=new Array (1);k15=new Array (1);k16=new Array (1);
k17=new Array (1);k18=false;k19=new Array (1);k20=new Array (1);k201=new Array (1);k19[0]=0;k201[0]='ipr0';k10[0]=6;k11[0]=6;k101[0]=6;k111[0]=6;k12[0]=0;k13[0]=0;k17[0]=false;function ident(k21){var k22;
if(k21=="ipr0"){k22=0}return(k22);}function over(k23,k24,k25){k26=k24;k1=ident(k26);k17[k1]=false;k27=k23;k14[k1]=0;k675=elstyle(k25);k675.top=k9;
k675.left=k9;k675.width=k6;k675.height=k6;koordinats(k27);}
function outing(k28){k30=k28;k29=elstyle(k30);k29.top=k5;k29.left=k5;k29.width=k7;k29.height=k7;k15[k1]=k5+k8;k16[k1]=k5+k8;
k19[k1]=1;if(k18!=true){k18=true;setTimeout('freq()',k2)}}
function koordinats(k31){if(isNS){k15[k1]=k31.layerX+k14[k1]+k9;k16[k1]=k31.layerY+k14[k1]+k9;
}else{k15[k1]=k31.offsetX+k14[k1]+k9;k16[k1]=k31.offsetY+k14[k1]+k9}k19[k1]=1;if(k18!=true){k18=true;setTimeout('freq()',k2)}}function koord(k32,k33)
{k34=k33;k1=ident(k34);if(k17[k1]){k35=k32;koordinats(k35)}else{k14[k1]=0;k17[k1]=true}}
function freq()
{
k37=false;
for(k38=0;k38<=k4;k38++)
{
if(k19[k38]!=0)
{
k40=k20[k38];
k41=false;
if((Math.round(k10[k38])!=(Math.round(k15[k38]-k7/2)))||(Math.round(5*k12[k38])!=0))
{
k42=k12[k38]*k36;
k12[k38]=k12[k38]+20*(k15[k38]-k8-k10[k38])*k36+k3*k36*k12[k38];
k10[k38]=k10[k38]+k42;
k40.left=Math.round(k10[k38]);
k41=true;
}
if((Math.round(k11[k38])!=(Math.round(k16[k38]-k7/2)))||(Math.round(5*k13[k38])!=0))
{
k43=k13[k38]*k36;
k13[k38]=k13[k38]+20*(k16[k38]-k8-k11[k38])*k36+k3*k36*k13[k38];
k11[k38]=k11[k38]+k43;
k40.top=Math.round(k11[k38]);k41=true
}
if(k41!=true)
{
k19[k38]=0;
k17[k38]=false
}else {k37=true}}}
if(!k37){k18=false} else {setTimeout('freq()',k2);}
}
function razmerikonki(){
for(k54=0;k54<=k4;k54++)
{k20[k54]=elstyle(k201[k54]);}
}
function sending(elsemform){elements(elsemform).submit();}
/* //////////////////////для иконки */

mmwidth = function (){
if(document.body.clientWidth > 1280){
  document.getElementById('content_block').style.width ='1280px';}
else
{
 document.getElementById('content_block').style.width =document.body.clientWidth+'px';
}
}
var canzvuk='';
function setcanzvuk()
 {
    canzvuk='';
    canzvuk=canzvuk + '<div style="position:relative;height:60px;padding-top:174px;width:61px;padding-right:15px;z-index:100">';
    canzvuk=canzvuk + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
    canzvuk=canzvuk + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ';
    canzvuk=canzvuk + 'width="61px" height="61px">           <param name="movie" value="/site/Flash/zvuk.swf">';
    canzvuk=canzvuk + ' <param name="quality" value="high">		   <param name="wmode" value="transparent">';
    canzvuk=canzvuk + ' <embed src="/site/Flash/zvuk.swf" wmode="transparent" quality="high" ';
  canzvuk=canzvuk + 'pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="61px"';
    canzvuk=canzvuk + 'height="61px"></embed></object></div>';
 }
function writezvuk()
{
elements('zvuks').innerHTML=canzvuk;
}


function startp (){
		
 		var im,x,y,di;
  		im=document.getElementById ("findus");
  		di=document.getElementById ("car");
  		var img = document.getElementById("findus");
		var left = img.offsetLeft;
		var top = img.offsetTop;
		var parent = img.offsetParent;
		while(parent && parent != di.offsetParent)	
		{
   			left += parent.offsetLeft;
   			top += parent.offsetTop;
   			parent = parent.offsetParent;
		}
		di.style.left=left;
  		di.style.top=top;
  		di.style.visibility='visible';
  		
  		writezvuk();
  		
 }

 function startp1 (){
		
 		var im,x,y,di;
  		im=document.getElementById ("findus");
  		di=document.getElementById ("car");
  		var img = document.getElementById("findus");
		var left = img.offsetLeft;
		var top = img.offsetTop;
		var parent = img.offsetParent;
		while(parent && parent != di.offsetParent)	
		{
   			left += parent.offsetLeft;
   			top += parent.offsetTop;
   			parent = parent.offsetParent;
		}
		di.style.left=left;
  		di.style.top=top;
  		di.style.visibility='visible';
  		
  		
  		
 }