d = document;
opera = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;
ie = (document.all && !opera)? true : false;
dom = (document.getElementById && !ie && !opera)? true : false;

if (dom || ie)
{
        d.writeln('<STYLE type="text/css">');
        d.writeln('.subcat { display: none; }');
        d.writeln('</STYLE>');
}

function zoom(gal,wid,hei)
{
var n1=parseInt(wid);
var n2=parseInt(hei);
var wid2 = n1+5;
var hei2 = n2+10;
window.open(gal, 'gellery', "scrollbars=0,resizable=no,left=0,top=0,width="+wid2+",height="+hei2);
}

function foto(title, img, width, height, pr) {
	var width=(width ? width : 800);
	var height=(height ? height : 600);
	var win=window.open('', '_blank', 'width='+width+', height='+height+', left='+((screen.width-width)/2)+', top='+((screen.height-height)/2)+', toolbar=no, menubar=no, resizable=yes, status=yes, location=no, alwaysRaised=yes, scrollbars=no');
	win.document.write('<html><head><title>'+title+'</title></head><body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" rightmargin="0"><table width="100%" cellpadding="0" cellspacing="0" border="0" height="100%"><tr><td width="100%" align="center"><img src="/'+img+'" border="0" style="border:1px solid #bbbbbb;"></td></tr></table></body></html>');
}



function fotogal(name,imgb,txt) {
  myWin= open("", "displayWindow", "width=700,height=500,status=yes,toolbar=yes,scrolling=yes,menubar=yes,scrollbars=yes,resizable=yes");
  myWin.document.open();  
  myWin.document.write("<HTML><HEAD><title>Академия Мегаполиса</title><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>");
  myWin.document.write("<meta name='description' content='Академия Мегаполиса'><meta name='keywords' content='Академия Мегаполиса'><meta name='robots' content='index, follow'>");
  myWin.document.write("<link rel=stylesheet href='/css/site.css' type='text/css'></HEAD>");
  myWin.document.write("<BODY><center><h2>"+name+"</h2><br><br><img src=\"/"+imgb+"\"><br><br>"+txt+"</center></BODY></HTML>");
  myWin.document.close(); 
}
