var popUpWin=0;

function _onload()
{
a1 = new Image(); a2 = new Image();
a3 = new Image(); a4 = new Image();
a5 = new Image(); a6 = new Image();
a1.src = "/_img/menu/about_over.gif";
a2.src = "/_img/menu/about.gif";
a3.src = "/_img/menu/catalogue_over.gif";
a4.src = "/_img/menu/catalogue.gif";
a5.src = "/_img/menu/news_over.gif";
a6.src = "/_img/menu/news.gif";
a5.src = "/_img/menu/manual_over.gif";
a6.src = "/_img/menu/manual.gif";
return true;
}
window.onload = _onload;

function Over(name)
{
src = "/_img/menu/" + name + "_over.gif";
var img = document.getElementById(name);
img.src = src;
return true;
}

function Out(name)
{
src = "/_img/menu/" + name + ".gif";
var img = document.getElementById(name);
img.src = src;
return true;
}

function popUpImg(URLStr, width, height)
{
	if(popUpWin) { if(!popUpWin.closed) popUpWin.close(); }
	html = "<html><head><title>Антикварный салон «СОВ-АРТ».</title></head><body bottommargin=0 leftmargin=0 marginheight=0 marginwidth=0 rightmargin=0 topmargin=0 bgcolor='#FFFFFF' style='overflow: hidden;'>\n"+
	"<div align='center'><a href='javascript: window.close();'><img width="+
	width +
	" height=" +
	height +
	" src='"+
	URLStr +
	"' border=0 alt='закрыть' style='margin: 25px 0px 0px 0px;' /></a></div></body></html>";
	
	var left = (screen.width - width)/2;
	var top = (screen.height - height)/2-50;
	//var top = 50;
	width=width+50; height=height+50;
	
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=yes,menub ar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	popUpWin.document.open();
	popUpWin.document.write(html);
	popUpWin.document.close();
	
	return true;
}

function popUpHTML(URLStr, width, height)
{
	if(popUpWin) { if(!popUpWin.closed) popUpWin.close(); }
	
	var left = (screen.width - width)/2;
	var top = (screen.height - height)/2-50;
	//var top = 50;
	
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function showFlash(o){
	var bg,q,s,v;
	if(o.bgcolor){bg=o.bgcolor;}else{bg="#FFFFFF";}
	if(o.quality){q=o.quality;}else{q="high";}
	if(o.scale){s=o.scale;}else{s="noscale";}
	if(o.ver){v=o.ver;}else{v=6;}
	var str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+v+',0,0,0" ';
	str+='id="'+o.id+'" ';
	if(o.base){str+='base="'+o.base+'" ';}
	if(o.aligh){str+='aligh="'+o.aligh+'" ';}
	str+='width="'+o.width+'" height="'+o.height+'"><param name="movie" value="'+o.name+'"/><param name="bgcolor" value="'+bg+'"/><param name="quality" value="'+q+'"/>';
	if(o.flashvars){str+='<param name="flashvars" value="'+o.flashvars+'"/>';}
	if(o.salign){str+='<param name="salign" value="'+o.salign+'"/>';}
	if(o.wmode){str+='<param name="wmode" value="'+o.wmode+'"/>';}
	str+='<param name="scale" value="'+s+'"/><embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" id="'+o.id+'-embed" src="'+o.name+'" bgcolor="'+bg+'" ';
	if(o.flashvars){str+='flashvars="'+o.flashvars+'" ';}
	str+='quality="'+q+'" ';
	if(o.base){str+='base="'+o.base+'" ';}
	if(o.wmode){str+='wmode="'+o.wmode+'" ';}
	if(o.salign){str+='salign="'+o.salign+'" ';}
	str+='scale="'+s+'" width="'+o.width+'" height="'+o.height+'"></embed></object>';
	document.writeln(str);
}


function checkFormSearch(form) {
	var fChek = true;
	if (form.id.value=='' && form.id.value=='№ предмета' && form.title.value=='' && form.title.value=='Название' && form.author.value==0 && form.plant.value==0) fChek = false;
	if (fChek) disButton();
	return fChek;
};
function disButton()
{
    document.getElementById("submitSearchForm").disabled = true;
}
