// Load.js v1.5 (C) Andrey Miller, 2005-07-26.
// http://nimicanime.narod.ru
// Do not remove this comment.
// Не удаляйте данный комментарий.

// переменная, так на всякий случай.
var S = '';

// Создаем link типа text/css.
var link = document.createElement('link');
//document.getElementsByTagName("body")[0].appendChild(link);
link.rel = 'stylesheet';
link.type = 'text/css';

// Функция для загрузки файла с табличкой стилей.
function LoadCSS(Filehref) {
  link.href = Filehref;
}

// Функция для загрузки файла с JavaScript
function Loadfile(Filehref,sid) {
// Маленький финт ушами. Запоминаем, к примеру, переданный ID элемента на странице.
  S = sid;
// Создаем Div. В нем JavaScript с нужным src и после все удаляем.
  var div = document.createElement('DIV');
  div.style.display = 'none';
  div.appendChild(document.createElement('script')).src = Filehref;
  document.getElementsByTagName("body")[0].appendChild(div);
  div.parentNode.removeChild(div);
}

function Loadfile2(Filehref2, url2, sid2)
{
var textfile='';
var url_path=url2+Filehref2;

  try {textfile=new ActiveXObject('Msxml2.XMLHTTP');} 
  catch (e)
  {
    try {textfile=new ActiveXObject('Microsoft.XMLHTTP');} 
    catch (e)
    {
      try {textfile=new XMLHttpRequest();} 
      catch (e)
      {return "<p>error</p>";}
    }
  }
textfile.open('GET', url_path, false);
textfile.send(null);
document.getElementById(sid2).innerHTML = textfile.responseText;
}

// Функция для очистки содержмого указаного элемента на странице.
// Так на всякий случай для удобства.
function ClearData(EId) 
{
  document.getElementById(EId).innerHTML = ''; 
}