nn4 = (document.layers)? true : false;
ie4 = (document.all)? true : false;
nn6 = (document.getElementById && !ie4)? true : false;
function popupWin(cardName, winW, winH, winTitle) {
//if (nn4 || ie4 || nn6) {
posX = Math.round((screen.width - winW) / 2);
posY = Math.round((screen.height - winH) / 2);
posCode = /*(nn4 || nn6)? 'screenX='+posX+',screenY='+posY :*/ 'left='+posX+',top='+posY;
//} else { posCode = ''; }
//alert(posCode);
cardWindow = window.open('','_blank','menubar=no,toolbar=no,scrollbars=no,status=no,width='+winW+',height='+winH+','+posCode);
cardWindow.document.open();
cardWindow.document.write('<html><head><title>'+winTitle+'<\/title><\/head>');
cardWindow.document.write('<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>');
cardWindow.document.write('<center><img src="'+cardName+'" width="'+winW+'" height="'+winH+'" align="center" /></center><\/body><\/html>');
cardWindow.document.close();
cardWindow.focus();
}

function ExploreMenu(id)
{
 if (document.getElementById(id).style.display == "none")
 {
  document.getElementById(id).style.display = "";
 }
 else
 {
  document.getElementById(id).style.display = "none";
 }
}

function HideAll()
{
 for (i=1; i<=7; i++)
  document.getElementById('mvent_id_'+i).style.display = "none";
}

function ShowGoodDescription(id)
{
 switch(id)
 {
  case 'good_description_1':
   document.getElementById('good_description_1').style.display = "";
   document.getElementById('good_description_2').style.display = "none";
   document.getElementById('good_description_3').style.display = "none";
  break;
  case 'good_description_2':
   document.getElementById('good_description_1').style.display = "none";
   document.getElementById('good_description_2').style.display = "";
   document.getElementById('good_description_3').style.display = "none";
  break;
  case 'good_description_3':
   document.getElementById('good_description_1').style.display = "none";
   document.getElementById('good_description_2').style.display = "none";
   document.getElementById('good_description_3').style.display = "";
  break;
 }
}

function SetPhotoImgBig(photo_img_big,photo_img_big2,width,height,title)
{
 document.getElementById('photo_img_big').innerHTML = "<img src='"+photo_img_big+"' alt='' />";
 if (photo_img_big2 != "")
  document.getElementById('photo_img_big2').innerHTML = "<a href=\""+photo_img_big2+"\" onClick=\"popupWin('"+photo_img_big2+"',"+width+","+height+",'"+title+"'); return false;\" title=\"Увеличить\" target=\"_blank\">Увеличить</a>";
 else
  document.getElementById('photo_img_big2').innerHTML = "";
}
