window.onerror = null;

var mIE = 0;

if (navigator.appName != "Microsoft Internet Explorer" && 
    navigator.appName != "Maxthon Browser" && 
	navigator.appName != "Opera") window.location="not_ie.php";
if (navigator.appName == "Microsoft Internet Explorer" && 
    navigator.appVersion < 4) window.location="not_ie.php";
if (navigator.appName == "Microsoft Internet Explorer" || 
    navigator.appName == "Maxthon Browser") mIE=1;
	
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer >= 4);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
var window_active = 0;
q_a=new Image();q_a.src="img/radio_a.gif";
var curLay=0;



//----------------------------------------- ÌÅÍÞ ----------------------------------------
function SMenu(menu){
	eval("document.all.Submenu"+menu+".style.visibility='visible'");
}

function HMenu(menu){
	eval("document.all.Submenu"+menu+".style.visibility='hidden'");
}    
//-------------------------------------------------------------------------------------------

//-------------------------------- ßÇÛÊÎÂÎÅ ÌÅÍÞ ------------------------------------
function ShowLang(){
	document.all.language.style.left='770'; 
    document.all.language.style.visibility='visible';
}

function HideLang(){
    document.all.language.style.left='-100'; 
    document.all.language.style.visibility='hidden';
}
//-------------------------------------------------------------------------------------------

function StandLayers(el){
  for(i=2;i<=el;i++) eval("document.all.L"+i+".style.posTop=132+("+i+"-2)*35");
  curLay=0; 
} 

function MoveLayer(Lay,ml){
var curTop=1;
  if (curLay!=Lay)
  {
   StandLayers(ml);
   for(i=(Lay+1);i<=ml;i++){
      eval("curTop=document.all.L"+i+".style.posTop+document.all.L"+Lay+".style.posHeight-34");
      countredirect(i,curTop);
   }
   curLay=Lay;
  } else StandLayers(ml);
}

function SL(mLay,cTop){
  if (eval("document.all.L"+mLay+".style.posTop")+25<=cTop)
      eval("document.all.L"+mLay+".style.posTop+=25");
  else
    if (eval("document.all.L"+mLay+".style.posTop")+15<=cTop)
        eval("document.all.L"+mLay+".style.posTop+=15");
    else
      if (eval("document.all.L"+mLay+".style.posTop")+10<=cTop)
          eval("document.all.L"+mLay+".style.posTop+=10");
      else
        if (eval("document.all.L"+mLay+".style.posTop")+5<=cTop)
            eval("document.all.L"+mLay+".style.posTop+=5");
        else
            eval("document.all.L"+mLay+".style.posTop+=1");
}

function countredirect(cLay,cTop){
  if (eval("document.all.L"+cLay+".style.posTop")!=cTop) SL(cLay,cTop); else return;
  setTimeout("countredirect("+cLay+","+cTop+")",1);
}

function swapimage(idimage, newimage) {
        if (document.images ) {
        if ((NS4 || IE4) ) oldimage = new Image();
                           oldimage.src = idimage.src;
                           idimage.src = eval(newimage +".src");
                        }}

function restoreimage(idimage) {
        if (document.images) {
        if ((NS4 || IE4) ) idimage.src = oldimage.src;
                        }}
						
//-------------------------------- ßÇÛÊÎÂÎÅ ÌÅÍÞ ------------------------------------

function SetPass(){
  if(!mIE){
    document.all.pass.type = "password";
	if(document.all.pass.value=='Ïàðîëü') document.all.pass.value='';
	document.all.pass.focus();
  }
  else{
	  if(document.all.pass.value=='Ïàðîëü'){
		  document.all.password1.style.visibility='visible';
		  document.all.password1.style.posLeft = 20;
		  document.all.password1.style.posTop = 411;
		  document.all.pass.value='';
		  document.all.pass1.focus();
	  }
  }
}

function PassOut(){
	if(!mIE){
		if(document.all.pass.value==''){
			document.all.pass.value='Ïàðîëü';
			document.all.pass.type = "text";
		}
	}
	else{
		if(document.all.pass1.value==''){
			document.all.pass.value='Ïàðîëü'
			document.all.password1.style.posLeft = 50;
		 	document.all.password1.style.posTop = 20;
		}
	}
}

function SetLogin(){
  if(document.all.log.value=='Ëîã³í') document.all.log.value='';
  document.all.log.focus();
}

function LogOut(){
  if(document.all.log.value=='') document.all.log.value='Ëîã³í';
}

function SetSearch(){
  if(document.all.search.value=='Ïîøóê ïî ñàéòó') document.all.search.value='';
  document.all.search.focus();
}

function SearchOut(){
   if(document.all.search.value=='') document.all.search.value='Ïîøóê ïî ñàéòó';
}

//-------------------------------- ßÇÛÊÎÂÎÅ ÌÅÍÞ ------------------------------------

function SetRadioPlTest(){
	
}

//------------------------------------------------------------------------------------------------			
		