<!--
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
var n =0;
var ie = 0;
var browser=0;

function makeMenu(obj){
	this.css=(n) ? eval('document.'+obj):eval('document.all.'+obj+'.style')					
   	this.ref=(n) ? eval('document.'+obj+'.document'):eval('document');		
	this.height=n?this.ref.height:eval(obj+'.offsetHeight')
	this.x=(n)? this.css.left:this.css.pixelLeft;
	this.y=(n)? this.css.top:this.css.pixelTop;							
	this.hideIt=b_hideIt;	this.showIt=b_showIt; this.moveIt=b_moveIt											
	return this
}
function b_showIt(){this.css.visibility="visible"}
function b_hideIt(){this.css.visibility="hidden"}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}
function init(){
	oTop=new Array()
	oTop[0]=new makeMenu('divTop1')
	oTop[1]=new makeMenu('divTop2')
	oTop[2]=new makeMenu('divTop3')
	oTop[3]=new makeMenu('divTop4')
  	oTop[4]=new makeMenu('divTop5')
}

function menu(num)
{
	if(browser)
	{
			for(i=0;i<oTop.length;i++)
			{
				if(i!=num) oTop[i].hideIt()
				
			}
			oTop[num].showIt();
		}
}
function initall() {
/*
n = (document.layers) ? 1:0;
ie = (document.all) ? 1:0;
browser=((n || ie) && parseInt(navigator.appVersion)>=4)
if (browser) init();
*/
}

	function Winopen(url)
	{
	var	width=250;
	var	height=150;
	new_win = window.open(url, "new_win", 'width = '+width+' , height = '+height+',resizable=0,scrollbars=0,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
	}

function msgwin(al,name)
{
var width=250;
var height=150;
	window.open('win_new.htm?text='+al+'', name,'width='+width+', height='+height+',resizable=0,scrollbars=0,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
}

function msgwin1(al,name)
{
var width=250;
var height=150;
	window.open('win_new1.htm?text='+al+'', name,'width='+width+', height='+height+',resizable=0,scrollbars=0,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
}

	function descrwin(id)
	{
	var	width=400;
	var	height=300;
	new_win = window.open("descr.htm?id="+id, "new_win", 'width = '+width+' , height = '+height+',resizable=0,scrollbars=1,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
	}

//окно alert
function FormAlert(al,name,j)
{
var width, height;
if (j<7)
{width=250; height=250;}
else
{width=250; height=350;}

	window.open('win_new.htm?text=<center>Пожалуйста, заполните поля:</center><br>'+al, name,'width='+width+', height='+height+',resizable=0,scrollbars=0,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2));
}


//проверка форм
function CheckFields(fname,form_num)
{
var form_name=eval('document.'+fname);
var li=(ie) ?'<li>':''
var br=(ie) ?'':'\n'
	var al='';
	var j='';
	var al_post='';
temp_f=eval('f'+form_num+'_Fld');	
temp_a=eval('f'+form_num+'_Alrt');	

for (i=0; i<temp_f.length; i++)
{
	var item = eval('document.'+fname+'.'+temp_f[i]);
  re1 = new RegExp("^ +$","g");
	if (item.value=='' || re1.test(item.value))
 {
		al_post=al;
		al+=li+temp_a[i]+br;
		j++;
	}
}

if (fname=='s_form') {
  if (document.s_form.producer_search.value!=0)
  al=0;
  }

if (al != '')
{
 if (ie) {
	FormAlert(al, fname, j);
	}
	else {
	alert('Заполните следующие поля:\n\n' + al);
	}
	return false;
	exit;
}

form_name.submit();
return true;
};

function ImageOpen(image,width, height)
	{
	zoom = window.open("image.htm?pic="+image, "image", 'width = ' + width + ', height = ' + height + ',resizable=0,scrollbars=no,menubar=no,status=no');
	}
 
//-->
