im1 = new Image();
im1.src = 'site/images/menu2-0.gif';
im2 = new Image();
im2.src = 'site/images/menu2-1.gif';

function subForm(id){
	name = 'prod_' + id;
	document.forms[name].submit();
}

function form_submit(id){
	document.forms[id].submit();
}

function delete_item(id){
	document.getElementById('form_action').value = 'deleteElems';
	document.getElementById('deleteElement').value = id;
	document.forms['order'].submit();
}

function Zoom11(xlink){
var img = window.open('','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=0,left=70,height=10,width=20');
img.document.writeln('<html><head><title>Sveti.by</title></head><body style="margin:0px; padding:0px;" onload="res();"><div id="sect" style="display:block;" align=center>Загрузка...</div><div align=center><a href=\'javascript:window.close();\'><img src="' + xlink + '" border=0 alt=Закрыть  onload="window.resizeTo(this.width+27, this.height+50);"/></a></div></body></html>');
}


function Zoom(xlink){
var img = window.open('','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=0,left=70,height=10,width=20');
img.document.writeln('<html><head><title>Sveti.by</title></head><body bgcolor="#D6D3CE" style="padding: 0px; margin: 0px; border: 0px;"><div id="text" style="width: 100%; height: 100%; text-align: center; padding-top: 40px; font-family: tahoma; font-size: 12px;">Загрузка изображения...</div><div id="image" style="display: none;"><a href=\'javascript:window.close();\'><img src="' + xlink + '" alt="Закрыть" border="0" onload="document.getElementById(\'text\').style.display = \'none\'; document.getElementById(\'image\').style.display = \'block\'; window.resizeTo(this.width+27, this.height+50)" /></a></div></body></html> ');
}

function show(id){
	var elem = document.getElementById(id);
	if (!elem) return false;
	
	var menu = document.getElementById('menu');
	var divs = menu.getElementsByTagName('span');

	arr = id.split('_');
	for (var i=0;i < divs.length;i++) {
		if ( arr[0] == 'item' ) {
			divs[i].style.display = 'none';			
		}
    }
    
    if (elem.style.display == 'none'){
		elem.style.display = 'block';
	} else {
		elem.style.display = 'none';
	}

}