function image(id, image)
{
  img = document.getElementById(id).src = image;
}

function window_open(url, width, height)
{
  xpos = (screen.width - width) / 2;
  ypos = (screen.height - height) / 2;

  options = "width=" + width + ",height=" + height + ",left=" + xpos + ",top=" + ypos + ",statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes";
  window.open(url, '', options);
}

function move_left()
{
  scroll_line.scrollLeft -= 125;
}

function move_right()
{
  scroll_line.scrollLeft += 125;
}

var req;

function ajax_get(url)
{
  if (window.XMLHttpRequest)
  {
    req = new XMLHttpRequest();    
  }
  else if (window.ActiveXObject)
  {
    req = new ActiveXObject("Microsoft.XMLHTTP");
  }

  req.onreadystatechange = statechange;
  req.open('GET', url, true);
  req.send(null);
}

function statechange() 
{
  if (req.readyState == 4)
  {
    if (req.status == 200)
    {
      response = req.responseXML.documentElement;
      document.getElementById('model').innerHTML = response.getElementsByTagName('result')[0].firstChild.data;
    }
  }
}

function s(id)
{
  URL = 'http://www.maxval.ru/getitem/' + id + '/';
  //alert(URL);
  ajax_get(URL);
}

var message="Отключено"; 
function click(e) {if (document.all) 
{if (event.button == 2) 
{alert(message);return false;}} 
if (document.layers) {if (e.which == 3) 
{alert(message);return false;}}} 
if (document.layers) 
{document.captureEvents(Event.MouseDown);} 
document.onmousedown=click;
