var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-11892718-2");
pageTracker._trackPageview();
} catch(err) {}

function openwin(link, menubar, width, height)
{
  str = '"menubar=no,';
  if (menubar == "yes") str += ' scrollbars=yes,';
  str += ' width=' + width + ', height=' + height + '"';
  win = window.open(link, "", str);
  win.moveTo(screen.availWidth/2 - width/2, screen.availHeight/2 - height/2);
}

function sh(el1, el2, action)
{
  var vis = "hidden";
  var col = "#fefcb8";

  if (action == 1)
  {
    vis = "visible";
    col = "#fffc9e";
  }

  var s = document.all['s'];
  s.style.visibility = vis;

  if (el1 != '')
  {
    var e1 = eval('document.all[\'s' + el1 + '\']');
    e1.style.visibility = vis;
    if (action == 1) e1.style.left = s.offsetWidth + 54;

    var i1 = eval('document.all[\'i' + el1 + '\']');
    if (i1.bgColor != '#fffee4') i1.bgColor = col;
  }
  if (el2 != '')
  {
    var e2 = eval('document.all[\'s' + el2 + '\']');
    e2.style.visibility = vis;
    if (action == 1) e2.style.left = s.offsetWidth + e1.offsetWidth + 54;

    var i2 = eval('document.all[\'i' + el2 + '\']');
    if (i2.bgColor != '#fffee4') i2.bgColor = col;
  }
}

function sel(el)
{
  el.bgColor = "#fffc9e";
}

function unsel(el)
{
  el.bgColor = "#fefcb8";
}

function show_alt()
{
  var alt = document.all['alt'];
  alt.style.top = window.event.clientY + document.body.scrollTop + 18;
  alt.style.left = window.event.clientX + document.body.scrollLeft + 8;
  alt.style.visibility = 'visible';
}

function hide_alt()
{
  alt.style.visibility = 'hidden';
}

function show_model()
{
  var but_mod = document.getElementById('but_mod');
  var model = document.getElementById('model');
  var mes = new Array('Показать 3D-модель', 'Спрятать 3D-модель');

  if (but_mod.value == mes[0])
  {
    but_mod.value = mes[1];
    model.style.display = '';
  }
  else
  {
    but_mod.value = mes[0];
    model.style.display = 'none';
  }
}

function show_big(pic, h)
{
  openwin('pic.php?pic=data/color/pic/' + pic, '', 500, h);
}