//Copyright (c) www.saitrix.ru, 2007

var _piccount = 0;
var _runtime = false;

function timer() {
	var j = 0;
	for (var i=0; i<_piccount; i++) {
		obj = document.getElementById('objpic'+i);
		if (!obj) continue;
		if (!obj.b) continue;
		var s = obj.style.backgroundPosition;
		var a = s.split(' ');
		var x = a[0]?parseInt(a[0]):-36;
		x += 8;
		if (x>137) {
			obj.b = 0; x = -36;
			obj.style.cursor = 'hand';			
		}
		obj.style.backgroundPosition = x + 'px ' + '0px';
		j++;
	}
	if (j) {
		setTimeout('timer()',10);
	} else {
		_runtime = false;		
	}
}

function pic_mouseOver(obj) {
	//obj.style.backgroundImage = 'url(images/blik2.gif)'
	if (obj.b) return;
	obj.b = 1;
	if (!obj.id) {
		obj.id = 'objpic'+_piccount;
		_piccount++;
	}
	if (!_runtime) {
		_runtime = true;
		setTimeout('timer()',10);
	}
}


function addBookmark(url, title)
{
  if (!url) url = location.href;
  if (!title) title = document.title;
  
  //Gecko
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel (title, url, "");
  //IE4+
  else if (typeof window.external == "object") window.external.AddFavorite(url, title);
  //Opera7+
  else if (window.opera && document.createElement)
  {
    var a = document.createElement('A');
    if (!a) return false; //IF Opera 6
    a.setAttribute('rel','sidebar');
    a.setAttribute('href',url);
    a.setAttribute('title',title);
    a.click();
  }
  else return false;
  
  return true;
}

