function isNN(){
appLongVer=navigator.appVersion
appVer=appLongVer.substring(0,1);
if((navigator.appName=="Netscape")&&(appVer>=4))
return true
return false
}
function isIE(){
appLongVer=navigator.appVersion
appVer=appLongVer.substring(0,1);
if((navigator.appName=="Microsoft Internet Explorer")&&(appVer>=4))
return true
return false
}
function init(){
//if(isNN()) {layerRef="document.layers"; styleSwitch="" ;}
//if(isIE()) {layerRef="document.all"; styleSwitch=".style";}
}
function showLayer(name){
document.getElementById(name).style.visibility="visible";
document.getElementById(name).style.display="block";
//eval(layerRef + '["'+ name + '"]'+ styleSwitch + '.visibility="visible"');
}
function hiddenLayer(name){
//eval(layerRef + '["'+ name + '"]'+ styleSwitch + '.visibility="hidden"');
document.getElementById(name).style.visibility="hidden";
}
function showDescr(name){
//eval(layerRef + '["'+ name + '"]'+ styleSwitch + '.visibility="visible"');
document.getElementById(name).style.visibility="visible";
//eval(layerRef + '["'+ name + '"]'+ styleSwitch + '.display="block"');
document.getElementById(name).style.display="block";
if (isIE())  { eval(layerRef + '["'+ name +'1'+'"]'+ styleSwitch + '.color="#E04C1D"');}
}
function hideDescr(name){
//eval(layerRef + '["'+ name + '"]'+ styleSwitch + '.visibility="hidden"');
document.getElementById(name).style.visibility="hidden";
//eval(layerRef + '["'+ name + '"]'+ styleSwitch + '.display="none"');
document.getElementById(name).style.display="none";
if (isIE())  {document.getElementById(name).style.color="#B08550";}
}
function Layers(size){
for (var i=0; i<size; ++i) {this[i]=null;}
return this;
}
function Descr(name,size){ 
for (i=0; i<size; ++i){	if (Lay[i]==name){showDescr(Lay[i])} else {hideDescr(Lay[i])} }
}
function clearLayer(Part,mPart) {
	if ((window.event.clientX>600)||(window.event.clientY<24)||(window.event.clientY)>60)
	{	var wait=null;
		wait=setTimeout("hiddenLayer(\'"+Part+"\')",1000);
		switch (Part){
		case "about": if (!(Part==mPart)) { wait=setTimeout('out(\'i1\')',1000); } break;
		case "progr":  if (!(Part==mPart)) { wait=setTimeout('out(\'i2\')',1000); } break;
		case "offers":   if (!(Part==mPart)) {  wait=setTimeout('out(\'i3\')',1000); } break;
		case "info":   if (!(Part==mPart)) {  wait=setTimeout('out(\'i4\')',1000); } break;	}
	} 
}
function clearLayerNN(Part,mPart){
	var wait=null;wait=setTimeout("hiddenLayer(\'"+Part+"\')",1000);
	switch (Part){
		case "about": if (!(Part==mPart)) { wait=setTimeout('out(\'i1\')',1000); } break;
		case "progr":  if (!(Part==mPart)) { wait=setTimeout('out(\'i2\')',1000); } break;
		case "offers":   if (!(Part==mPart)) {  wait=setTimeout('out(\'i3\')',1000); } break;
		case "info":   if (!(Part==mPart)) {  wait=setTimeout('out(\'i4\')',1000); } break;	}
}
function WinOpen(name) {				// работает везде
viewer=window.open("/PIC/VIEWS/"+name+".gif","","width=400,height=600,toolbar=no,scrollbars=no,screenX=0,screenY=0,resize=yes");
location.reload();
}
function OpenNews(name) {				// в NN отображает теги
viewer=window.open("/NEWS/"+name+".inc","","width=500,height=600,toolbar=no,scrollbars=yes,screenX=0,screenY=0,resize=yes");
location.reload();
}

function PhotoViewer(name) {
viewer=window.open("/PIC/FIRM/MUSEUM/"+name+".jpg","","width=620,height=430,toolbar=no,scrollbars=no,screenX=0,screenY=0,resize=no");
//location.reload();
}
function Viewer(path,w,h) {				// для IE( с полями) и OPERA ( без полей )
w+=20; h+=30;
viewer=window.open(path,"","width="+w+",height="+h+",toolbar=no,scrollbars=no,screenX=0,screenY=0,resize=no");
location.reload();
}
//function Viewer(path,w,h) {			// для IE( без полей ) и NN( с полями), OPERA не понимает
//viewer=window.open("","","width="+w+",height="+h+",toolbar=no,scrollbars=no,screenX=0,screenY=0,resize=no");
//viewer.document.write("<body style='margin:0px';><table width=100% height=100%><tr><td valign=top><img src='"+path+"' height="+h+" width="+w+" alt='' border=0></td></tr></table></body>");
//}
function VideoViewer(name,width,height) {
VideoViewer=window.open(name,'','width='+width+',height='+height+',toolbar=no,scrollbars=no,screenX=0,screenY=0,resize=no');
location.reload();
}


function styleNN(size) {
if (isNN()) {
document.writeln('<style type="text/css">');
document.writeln('tr.row1 \{ display: table-row; \}');
for (i=2; i<=size; ++i) { document.writeln('tr.row'+i+' \{ display: none; \}');}
document.writeln('</style>');
}
}
function changeTree(which) {
if (treeOpen[which]) {
for (i in treeItems[which]) removeElem(treeItems[which][i]);
treeOpen[which] = false;
} else {
for (i in treeItems[which]) {
putElem(treeItems[which][i],"table-row");
}
treeOpen[which] = true;
}
}
function putElem(elemId,displayValue) {
if (dom) document.getElementById(elemId).style.display = (displayValue)? displayValue : "block";
else if (ie) document.all[elemId].style.display = "block";
}
function removeElem(elemId) {
if (dom) document.getElementById(elemId).style.display = "none";
else if (ie) document.all[elemId].style.display = "none";
}
