/*
//объект для проверки формы
var FormVal = function(form_name, arr_rules, WrapInst) {
	this.form_name = form_name ? form_name : 0;
  this.arr_rules = arr_rules ? arr_rules : new Array();
  this.ww = WrapInst ? WrapInst : new WinWrapper();
  this.ww.setOnloadListener(this, "onload");
}
FormVal.prototype = {
	onload : function(e) {
		// Onload main wndow
		alert('load')
		new form_validate(this.form_name, this.arr_rules, this.ww, true);
		this.ww.removeOnloadListener(this);
	}
}
*/


// ============= Показ рисунков с эффектами =================
function adv_show(img_n, wd, hg, tit, src) {
if(!src)src='/image?tp=b&id='
var txt_f = new Array();
if(wd<20) wd=20;
if(hg<30) hg=30;
if(!tit) tit="Big photo";

txt_f[0] = '<HTML><HEAD><TITLE>'+tit+'</TITLE><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">';
txt_f[1] = '<STYLE>BODY{font-family:Times New Roman,Times,serif; font-size:16px; font-weight:bold;}';
txt_f[3] = '</STYLE></HEAD><BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 BGCOLOR=BLACK>';
txt_f[8] = ' </BODY></HTML>';

if (BR == 1) {
	txt_f[2] = '#txtload {position:absolute; width:100%; top:40%; visibility:visible; color:#CCCCFF; text-align:center;}#txterror {position:absolute; width:100%; top:40%; visibility:hidden; color:red; text-align:center;}#shimg {visibility:hidden; filter:revealTrans(transition=23);}';
	txt_f[4] = '<SCRIPT LANGUAGE="JavaScript">function errimg(){ document.all.txtload.style.visibility="hidden"; document.all.txterror.style.visibility="visible";}';
	txt_f[5] = 'function ini_img(){ document.all.txtload.style.visibility="hidden"; document.all.shimg.filters.item(0).Apply(); document.all.shimg.filters.item(0).Play(); document.all.shimg.style.visibility="visible";}</SCRIPT>';
	txt_f[6] = '<DIV ID=txtload>Рисунок загружается.<BR>Пожалуйста, подождите.<BR>Image loading.<BR>Please wait.</DIV><DIV ID=txterror>ERROR!!! Please try again</DIV>';
	txt_f[7] = '<TABLE HEIGHT="100% "WIDTH="100%" CELLPADDING="0" CELLSPACING="0"><TR><TD ALIGN="center"><IMG SRC="' +src + img_n + '" ID=shimg WIDTH=' + wd + ' HEIGHT=' + hg + ' BORDER=0 ALT="' + tit + '" ONLOAD="ini_img()" ONERROR="errimg()"></TD></TR></TABLE>';
	}
else if (BR == 2) {
	txt_f[2] = '#txtload {position:absolute; width:' + wd + '; top:' + (hg*0.4) + '; visibility:visible; color:#CCCCFF; text-align:center;}#txterror {position:absolute; width:' + wd + '; top:' + (hg*0.4) + '; visibility:hidden; color:red; text-align:center;}#shimg {position:absolute; visibility:hidden;}';
	txt_f[4] = '<SCRIPT LANGUAGE="JavaScript">function errimg(){ document.layers["txtload"].visibility="hide"; document.layers["txterror"].visibility="show";}';
	txt_f[5] = 'function ini_img(){ document.layers["txtload"].visibility="hide"; 	document.layers["shimg"].visibility="show";}</SCRIPT>';
	txt_f[6] = '<DIV ID=txtload>Рисунок загружается.<BR>Пожалуйста, подождите.<BR>Image loading.<BR>Please wait.</DIV><DIV ID=txterror>ERROR!!! Please try again</DIV>';
	txt_f[7] = '<DIV ID=shimg><IMG SRC="'+src + img_n + '" WIDTH=' + wd + ' HEIGHT=' + hg + ' BORDER=0 ALT="' + tit + '" ONLOAD="setTimeout(\'ini_img()\', 6000);" ONERROR="errimg()"></DIV>';
	}
else {
	txt_f[2] = ''
	txt_f[4] = '';
	txt_f[5] = '';
	txt_f[6] = '';
	txt_f[7] = '<IMG SRC="'+src + img_n + '" WIDTH=' + wd + ' HEIGHT=' + hg + ' BORDER=0 ALT="' + tit + '">';
	}

if(win_det && !win_det.closed)win_det.resizeTo(wd,hg);
openwindet("",wd,hg,",resizable=1","gallery");
for (i=0;i<txt_f.length;i++) win_det.document.write(txt_f[i]);
win_det.document.close();
return false;
}
