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', ''); }
			}
		}

	}

	// умело устанавливаем функцию всем элементам системы таб
	tabRoot = document.getElementById ("tab");
	if(tabRoot) {
		for (i = 0; i < tabRoot.childNodes.length; i++) 
		{
			node = tabRoot.childNodes[i];
			if (node.nodeName=="LI") 
			{
				node.onmouseup = function() { 
					// на каждый клик мы чистим во всех закладочках куррент и устанавливаем курент на нажатую. ну не зачот ли?					
					nRoot = document.getElementById ("tab");
					for (j = 0; j < nRoot.childNodes.length; j++) 
					{
						node2 = nRoot.childNodes[j];
						if (node2.nodeName == "LI") { node2.className = 'off' };
					}
			
					this.className = 'on'; 
				}
			}
		}
	}
}

window.onload = startList;


var NS4DOM = document.layers ? true:false;
var IEDOM = document.all ? true:false;
var W3CDOM = document.getElementById ? true:false;

function getObject (id) 
{
	if (W3CDOM) return document.getElementById(id);
	else if (IEDOM) return document.all[id];
	else if (NS4DOM) return document[id];
	return false;
}

function loadpic (id)
{
	getObject('big').src = '/item_img.asp?id=' + id + '&f=1'
}