isDOM=document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
isOpera=isOpera5=window.opera && isDOM //Opera 5+
isOpera6=isOpera && window.print //Opera 6+
isOpera7=isOpera && document.readyState //Opera 7+
isMSIE=document.all && document.all.item && !isOpera //Microsoft Internet Explorer 4+
isMSIE5=isDOM && isMSIE //MSIE 5+
isNetscape4=document.layers //Netscape 4.*
isMozilla=isDOM && navigator.appName=="Netscape" //Mozilla или Netscape 6.*



function MM_preloadImages() { //v3.0
  var d=document; 
if(d.images)
{
if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
}}}



iTimerIDs = new Array();


function showMenu(objID)
{
hideShown(objID);
clearTimerForMenu(objID);
obj = document.getElementById('menu' + objID);
obj.style.display = 'inline';
}


function hideShown(objID)
{
for (ind in iTimerIDs)
{
if (ind!= objID)
{
doHideMenu(ind);
clearTimerForMenu(iTimerIDs[ind]);
}
}
}


function doHideMenu(objID)
{
obj = document.getElementById('menu' + objID);
obj.style.display = 'none';
}

function clearTimerForMenu(objID)
{
if (iTimerIDs[objID] != null){window.clearInterval(iTimerIDs[objID]); iTimerIDs[objID] = null;}
}

function hideMenu(objID)
{
clearTimerForMenu(objID); 
iTimerID = window.setTimeout('doHideMenu("' + objID + '");', 350);
iTimerIDs[objID] = iTimerID;
}


function showMenuPic(picObj, picInd)
{
if (document.readyState == 'complete') 
{
obj = document.getElementById(picObj);
obj.src=document.MM_p[picInd].src;
}
}


function showLarge(filenamestr, altstr, w, h)
{
myWin=window.open("","_blank","width=" + w + ", height=" + h + ", top="+ ((screen.height/3)-h+200) + ", left="+ ((screen.width/2)-w/2) + ", scrollbars=no, menubar=no,status=yes,location=no,directories=no,resizable=no");
myWin.document.open();
myWin.document.writeln('<html><head>');
myWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">');
myWin.document.writeln('<title>'+altstr+'</title></head>');
myWin.document.writeln('<body bgcolor="#6287A9" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>');
myWin.document.writeln('<a href="javascript:window.close();"><img src="'+filenamestr+'" alt="'+altstr+'\n(Нажмите, чтобы закрыть)" border=0 width=' + w + ' height=' + h + '></a>');
myWin.document.writeln('</body></html>');
myWin.document.close();
}

