	function add2cart(item_uid){

		width = 450;
		height = 250;

		var leftPos = (screen.width - width)/2;
		var topPos = (screen.height - height)/4;

		cart_win = window.open('/add2cart/?item_uid='+item_uid, 'add_2_cart_win',  'width=' + width + ',height=' + height + ',left=' + leftPos + ', top=' + topPos + ', alwaysRaised=yes, toolbar=0, menubar=0, scrollbars=1');
		
		cart_win.focus();
	}

	function add2cartNom(nom_uid){

		width = 420;
		height = 150;

		var leftPos = (screen.width - width)/2;
		var topPos = (screen.height - height)/4;

		cart_win = window.open('/proc.php?s=add2cart&nom_uid='+nom_uid, 'add_2_cart_win',  'width=' + width + ',height=' + height + ',left=' + leftPos + ', top=' + topPos + ', alwaysRaised=yes, toolbar=0, menubar=0, scrollbars=1');
		
		cart_win.focus();
	}	
	
	function xget(id, doc) {
		if(!doc) doc=document;
		if(doc.getElementById) return doc.getElementById(id);
		else if(doc.all) return doc.all[id];
		return null;
	}
	
	
	function show_block(blockid){
	
		var o = xget(blockid);
		if(!o)
			return;
			
			
		o.style.display = '';	
		return false;
	}
	
	function hide_block(blockid){
	
		var o = xget(blockid);
		if(!o)
			return;
			
			
		o.style.display = 'none';	
		return false;
	}
	
	
	function toggle_block(blockid){
	
		var o = xget(blockid);
		if(!o)
			return;
			
			
		if(o.style.display == ''){
			hide_block(blockid);
		}	else {
			show_block(blockid);
		}
		return false;
	}


	function toggle_block2(blockid, olink, url){
	
		var o = xget(blockid);
		if(!o)
			return false;
			

		if(!olink)
			return false;
		
		
		var oSpan = olink.parentNode;
		if(!oSpan) {
			alert('no parent block found');
			return false;
		}	

			
			
		if(o.style.display == ''){
			hide_block(blockid);
			oSpan.style.background='url(/i/button-plus.gif)  3px 4px no-repeat';
		}	else {
			show_block(blockid);
			oSpan.style.background='url(/i/button-minus.gif)  3px 4px no-repeat';
		}
		

		groupNodeClick(blockid, url);

		return false;
	}
	
	
	
	function CheckSubmitRight(){
		bCompl = true;
		
		strMessage = 'Необходимо заполнение следующих полей:\n';

		if(queryform.fio && queryform.fio.value.length == 0){
			bCompl = false;
			strMessage += '[ Имя ]\n';
		}
		

		if( (queryform.phone && queryform.phone.value.length == 0) && (queryform.contact_email && queryform.contact_email.value.length == 0)){
			bCompl = false;
			strMessage += '[ Тел. ] или [ E-mail ]\n';
		}

		if(queryform.comment && queryform.comment.value.length == 0) {
			bCompl = false;
			strMessage += '[ Текст запроса ] \n';
		}	


		if(!bCompl)		
			alert(strMessage);

		return bCompl;
	}
	
	
	
	
	function CheckOrderSubmit(){
		bCompl = true;
		
		strMessage = 'Необходимо заполнение следующих полей:\n';

		if(queryform.fio && queryform.fio.value.length == 0){
			bCompl = false;
			strMessage += '[ Имя ]\n';
		}
		

		if((queryform.phone && queryform.phone.value.length == 0) && (queryform.contact_email && queryform.contact_email.value.length == 0)){
			bCompl = false;
			strMessage += '[ Тел. ] или [ E-mail ]\n';
		}

		if(queryform.address && queryform.address.value.length == 0) {
			bCompl = false;
			strMessage += '[ Регион ] \n';
		}	
		
		if(!bCompl)		
			alert(strMessage);

		return bCompl;
	}

	
