

function ImageOver(ImageName) 
  {
    if (document.images)
      {
	      document[ImageName].src=eval("Image"+ImageName+"Over.src");
      }
  }

function ImageOut(ImageName)
  {
    if (document.images)
      {  
        document[ImageName].src=eval("Image"+ImageName+"Out.src");
      }
  }


function unchange()
  {
    if (document['unchange1'].src==eval("un1.src"))
      {
        document['unchange1'].src = eval("un2.src");
      }
    else
      {
        document['unchange1'].src = eval("un1.src");
      }
  }

function changevis()
  {
    lay = document.getElementById('layx');
    
    if (lay.style.display=='none')
	    {
        lay.style.display='';
      }
    else
      {
        lay.style.display='none';
      }
  }


function changeCol(num)
  {
	  numa = document.getElementById(num+'a');
	  numa.className='naz3';
  	numb = document.getElementById(num+'b');
	  numb.className='naz3';
	  numc = document.getElementById(num+'c');
	  numc.className='naz3';
	  numd = document.getElementById(num+'d');
	  numd.className='naz3';
	  nume = document.getElementById(num+'e');
	  nume.className='naz3';	
	  nume = document.getElementById(num+'f');
	  nume.className='naz3';	
  }

function changeCol1(num)
  {
    numa = document.getElementById(num+'a');
   	numa.className='naz2';
	  numb = document.getElementById(num+'b');
	  numb.className='naz2';
	  numc = document.getElementById(num+'c');
	  numc.className='naz2';
	  numd = document.getElementById(num+'d');
	  numd.className='naz2';
	  nume = document.getElementById(num+'e');
	  nume.className='naz2';	
	  nume = document.getElementById(num+'f');
	  nume.className='naz2';	
  }

function menushow(menunum)
  {
    var currentmenu = document.getElementById("contdiv" + menunum);
    
	  if (currentmenu.style.display == 'block')
	    {
        currentmenu.style.display = 'none';
      }
	  else
	    {
        currentmenu.style.display = 'block';
      }
  }

function menu_vs(menunum1)
  {
    var currentmenu1 = document.getElementById("contdiv" + menunum1);
    
	  if (currentmenu1.style.display == 'block')
	    {
        currentmenu1.style.display = 'none';
      }
	  else
	    {
        currentmenu1.style.display = 'block';
      }
	  
	  var currentitem = document.getElementById("item" + menunum1);
	
    if (currentitem.innerHTML == "-")
	    {
        currentitem.innerHTML ='+';
      }
	  else
	    {
        currentitem.innerHTML ='-';
      }
  }  

function menu_cur(id1,id2,id3)
  {
    if (document.getElementById('contdiv' + id1)!=null)
      {document.getElementById('contdiv' + id1).style.display="block";}
	
    if (document.getElementById('contdiv' + id2)!=null)
      {document.getElementById('contdiv' + id2).style.display="block";}
	
    if (document.getElementById('contdiv' + id3)!=null)
      {document.getElementById('contdiv' + id3).style.display="block";}
	
    if (document.getElementById("item" + id1)!=null)
      {document.getElementById("item" + id1).innerHTML ='-';}
	
    if (document.getElementById("item" + id2)!=null)
      { document.getElementById("item" + id2).innerHTML ='-'; }
	
    if (document.getElementById("item" + id3)!=null)
      {document.getElementById("item" + id3).innerHTML ='-';}	  	  
  }

function popUpPic(URL, sizex, sizey)
  {
    var inc_y = 60;
    var inc_x = 13;
    params = "top=5,left=5,width="+sizex+",height="+sizey+",Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,resizable=yes";
    popupWin = window.open("","popupWin",params);
    popupWin.focus(); 
    popupWin.document.open();
    popupWin.document.write("<html><head><title></title></head>");
    popupWin.document.write("<script language = JavaScript>");
    popupWin.document.write("function closeWindow() {");
    popupWin.document.write("parent.window.close();}");
    popupWin.document.write("function resize(){");
//  popupWin.document.write("alert('ok');");
    popupWin.document.write(" if(window.document.images[0].height > (window.screen.height-100))");
    popupWin.document.write(" {q = window.screen.height-100;}");
    popupWin.document.write("else{q = window.document.images[0].height;}");
//  popupWin.document.write("alert(q);");
//  popupWin.document.write("alert(window.screen.height-150);");
    popupWin.document.write("window.resizeTo(window.document.images[0].width+"+inc_x+",q+"+inc_y+");}");
    popupWin.document.write("</scri"+"pt>");
    popupWin.document.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><a href=''><img src='"+URL+"' border='0' name='cha1' onClick='closeWindow()' onLoad='resize();' alt=''></a></body></html>");
    popupWin.document.close();
  } 


function right(e)
  {
    var msg = "Извините, контент защищен от копирования.";
  
    if (navigator.appName == 'Netscape' && e.which == 3)
      { 
        alert(msg);
        return false;
      }
	
    if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2)
      { 
        alert(msg);
        return false;
      }
    else
      return true;
}

function trap() 
  {
    if (document.images)
      {
        for (i=0; i<document.images.length; i++)
          {
            document.images[i].onmousedown = right;
            document.images[i].onmouseup = right;
          }
      }
  }
// End -->

