// JavaScript Document

startList = function() {
  if (document.all&&document.getElementById) {
    navRoot = document.getElementById("nav");
    for (i=0; i<navRoot.childNodes.length; i++) {
      node = navRoot.childNodes[i];
      if (node.nodeName=="LI") {
        node.onmouseover=function() {
          this.className+=" over";
        }
        node.onmouseout=function() {
          this.className=this.className.replace(" over", "");
        }
      }
    }
  }
}
window.onload=startList;

function Nws_LntRu(){
  var r = Math.round(Math.random() * 100000);
  document.write('<scr'+'ipt src="http://img.lenta.ru/r/js/r12a.js?'+r+'"></scr'+'ipt>');
}

//---------------------------------------------

var oldId, oldBgColor;

function l(elem) {
  oldId = elem;
  oldBgColor = document.getElementById(elem).style.background;
  document.getElementById(elem).style.background = 'red';
}

function l1(elem) {
  oldId = elem;
  oldBgColor = document.getElementById(elem).style.background;
  document.getElementById(elem).style.background = 'white';
}

function t() {
  document.getElementById(oldId).style.background = oldBgColor;
}

function t1() {
  document.getElementById(oldId).style.background = '009999';
}

function t2() {
  document.getElementById(oldId).style.background = '#000000';
}

function note_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

function pt(pth){ pth_arr = pth.split('. '); pth = pth_arr.join('.'); pth_arr = pth.split('???'); pth1 = pth_arr.join('/'); 
}

function lc(pth){location.href='http://<?php echo $_SERVER["SERVER_NAME"];?>/'+pth+'.htm';}
function lo(pth){open('http://<?php echo $_SERVER["SERVER_NAME"];?>/'+pth+'.htm');}
function lm(pth){open(pth);}
function lm1(pth){window.status=pth;}
function lw(pth){open('http://'+pth);}
function lw1(pth){window.status='http://'+pth;}
function ls1(pth){window.status='http://<?php echo $_SERVER["SERVER_NAME"];?>/'+pth+'.htm';}
function ls0(){window.status='';}

function la(url1, left1, top1, width1, height1, toolbar1, menubar1, statusbar1, scrollbar1, resizable1){
  name1 = url1;
  note_window(name1, 'http://<?php echo $_SERVER["SERVER_NAME"];?>/'+url1+'.htm', left1, top1, width1, height1, toolbar1, menubar1, statusbar1, scrollbar1, resizable1);
}



//-------------------------------------------------------------------------
function AddonDisplay(Display){
  if (Display != 'none'){
		document.getElementById('stst').style.display = '';
		document.getElementById('addon_show').style.display = 'none';
		document.getElementById('addon_hide').style.display = '';
	} else {
		document.getElementById('stst').style.display = 'none';
		document.getElementById('addon_show').style.display = '';
		document.getElementById('addon_hide').style.display = 'none';
	}
}

function PaymentOn(){
	document.getElementById('payment').style.display = '';
}

function PaymentOff(){
	document.getElementById('payment').style.display = 'none';
}

