<!--

// open popup
function popup(href, target, width, height, title) {

	var wWidth  = parseInt(width, 10);
	var wHeight = parseInt(height, 10);
	if (title) {
		wHeight += 50;
	}

	var win;
	var left = ( screen.width - wWidth ) / 2;
	var top = ( screen.height - wHeight ) / 2;
	var html = '<html>';
	html += '<head><title>deryabin-weapon.ru</title><style type="text/css">body {margin:0;padding:0;background-color:#fff;font:9pt Verdana, Geneva, Arial, Helvetica, sans-serif;} img {border:0;} div {border-top:1px solid #C0A779;padding:.5em;text-align:center;}</style></head>';
	html += '<body>';
	html += '<a href="#" title="Закрыть окно" onclick="window.close();"><img src="' + href + '" width="' + width + '" height="' + height + '" alt="Закрыть окно"></a>';
	if (title) {
		html += '<div>' + title + '</div>';
	}
	html += '</body>';
	html += '</html>';

	if ( win = window.open("/empty.html", target, "width=" + wWidth + ",height=" + wHeight + ",left=" + left + ",top=" + top + ",scrollbars=0,status=1") ) {
		win.document.open();
		win.document.write(html);
		win.document.close();
		win.focus();
		return true;
	}

}

// open menu with given ID
function openMenu(menuID,linkObj) {
	// if the menu code is ready
	if (um.ready) {
		// find co-ordinates of link object
		var coords = {
			'x' : um.getRealPosition(linkObj.parentNode,'x'),
			'y' : um.getRealPosition(linkObj.parentNode,'y')
			};

		// adjust x and y positions
		coords.x -= 1;
		coords.y += (linkObj.offsetHeight + 3);

		// activate menu at returned co-ordinates
		um.activateMenu(menuID, coords.x + 'px', coords.y + 'px');
	}
}

// close menu with given ID
function closeMenu(menuID) {
	// if the menu code is ready
	if(um.ready) {
		// deactive menu
		um.deactivateMenu(menuID);
	}
}

//-->