<!--
var ie=(user_agent) ?0:1;
var loc;

//изображения в новом окне	
function newWindow(url,id,width,height)
{
if (loc!=id)
{
	zoom=window.open(url, id, '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))
	zoom.focus();
	loc=id;
} else {
	if(document.all) zoom.close();
		else if(zoom.document) zoom.close();
	zoom=window.open(url, id, '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))
	zoom.focus();
	}
}

function newWindow1(url,id)
{
width=710;
height=500;
if (loc!=id)
{
	zoom=window.open(url, id, 'width = '+width+' , height = '+height+',resizable=1,scrollbars=1,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2))
	zoom.focus();
	loc=id;
} else {
	zoom.close();
	zoom=window.open(url, id, 'width = '+width+' , height = '+height+',resizable=1,scrollbars=1,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2))
	zoom.focus();
	}
}
	
//окно 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=_3ccenter.htm>Пожалуйста, заполните поля:</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));
}
//окно alert
function FormAlert1(al,name)
{
var width, height;
	width=250;
	height=200;

 if (ie) window.open('win_new.htm@text=_3ccenter.htm>'+al+'</center>', 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));
	else {
	var re=new RegExp("<br>","g");	
	alert(al.replace(re,"\n"));
	}
}


//окно alert, маленькое
function FormAlertNew(al,name)
{
var width, height;
width=250; height=150;

	window.open('win_new.htm@text=_3ccenter.htm>'+al+'</center>', 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 class=warn>':''
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 (al != '')
{
 if (ie) {
	FormAlert(al, fname, j);
	}
	else {
	alert('Заполните следующие поля:\n\n' + al);
	}
	return false;
	exit;
}

form_name.submit();
return true;
};

//проверка формы поиска

function CheckFormSpec()
{
var it=document.form_search;
var al='';

if (it.query.value=='Поиск'){
		al='Введите слово для поиска';
}

if (it.query.value.length<2){
		al='Слово для поиска должно содержать не менее 2-х символов';
}

if (al != '')
{
 if (ie) {
width=250;
height=150;
	window.open('win_new.htm@text=.htm'+al, "form0",'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));
	}
	else {
	alert(al);
	}
	return false;
	exit;
}

it.submit();
return true;
};

//-->
