<!--

/**********************************************************************************
*
* запрет на правый клик
* 
**********************************************************************************/


function noLeftClick() {
if (event.button==2) {
alert('Copyright (c) 2005 ТД «МЕТАЛЛОЦЕНТР» Все права защищены')
}}
document.onmousedown=noLeftClick



/**********************************************************************************
*
* Images and buttons related stuff
* 
**********************************************************************************/



/**********************************************************************************
* function preloadImages (imagesList)
* preloads list of images separated by ","
**********************************************************************************/

function preloadImages (imagesList) {
	var imagesArr = new Array();
	imagesArr = imagesList.split(",");
	for (var i = 0; i < imagesArr.length; i++) {
		eval("var img"+i+" = new Image(); img"+i+".src = '"+imagesArr[i]+"';");
	}
	for (var i = 0; i < document.images.length; i++) {
		for (j = 0; j < imagesArr.length; j++) {
			if (document.images[i].src == imagesArr[j]) eval("document.images["+i+"].src = img"+j+".src");
		}
	}
}

/**********************************************************************************
* function showHide (divID)
* show DIV with given divID
**********************************************************************************/


function showHide (divID) {
	for(i = 0; i < document.all.length; i++) {
		if (document.all[i].tagName == 'DIV' ) {
			document.all[i].style.display="none";
		}
		if (document.all[i].tagName == 'HTML') {
			var j = i;
		}
	}
	if (document.all[divID] != null) {
		var d = document.all[divID].style.display;
		if("" == d) {
			document.all[divID].style.display="none";
		}
		else {
			document.all[divID].style.left =Math.round(event.clientX - document.all[divID].offsetWidth / 4); 
			document.all[divID].style.top = Math.round(document.all[j].scrollTop + event.clientY  - document.all[divID].offsetHeight / 4);
			document.all[divID].style.display="";
		}
	}
}

/**********************************************************************************
* function hideAll ()
* hide all DIVs
**********************************************************************************/


function hideAll () {
	for(i = 0; i < document.all.length; i++) {
		if (document.all[i].tagName == 'DIV') {
			document.all[i].style.display="none";
		}
	}
}

/**********************************************************************************
* function hideDiv (divID)
* hide specified DIV
**********************************************************************************/


function hideDiv (divID) {
	for(i = 0; i < document.all.length; i++) {
		if (document.all[i].tagName == 'HTML') {
			var j = i;
			break;
		}
	}
	if (event.clientX < divID.offsetLeft + 2 || divID.offsetLeft + divID.offsetWidth < event.clientX || event.clientY + document.all[j].scrollTop < divID.offsetTop + 2 || divID.offsetTop + divID.offsetHeight < event.clientY + document.all[j].scrollTop) hide = setTimeout("hideAll()", 100);
}

numMenus = 40;
//document.onmouseover = hideAllMenus;
var timeOn = null;

function showMenu(menuNumber, eventObj) {
    hideAllMenus();
	eventObj.cancelBubble = true;
    var menuId = 'submenu' + menuNumber;
    if(changeObjectVisibility(menuId, 'visible')) {
	return true;
    } else {
	return false;
    }
}

function hideAllMenus() {
    for(counter = 0; counter <= numMenus; counter++) {
		changeObjectVisibility('submenu' + counter, 'hidden');
    }
}
function menuOver() {
 clearTimeout(timeOn)
}
function menuOut() {
 if(document.layers) {
 	timeOn = setTimeout("hideAllMenus()", 4000)
  }
}

function getStyleObject(objectId, doc) {
    if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
		return getObjNN4(document,objectId);
    } else {
	return false;
    }
} 

function changeObjectVisibility(objectId, newVisibility) {
    var styleObject = getStyleObject(objectId, document);
    if(styleObject) {
	styleObject.visibility = newVisibility;
	return true;
    } else {
	return false;
    }
} 

//-->
