

// На главную
m1_on = new Image();
m1_on.src = "img/f_17.gif";
m1_off = new Image();
m1_off.src = "img/f_17_i.gif";
// Контакты
m2_on = new Image();
m2_on.src = "img/f_19.gif";
m2_off = new Image();
m2_off.src = "img/f_19_i.gif";
// Гостевая
m3_on = new Image();
m3_on.src = "img/f_21.gif";
m3_off = new Image();
m3_off.src = "img/f_21_i.gif";


// О музее
m01_on = new Image();
m01_on.src = "img/menu/menu_02.gif";
m01_off = new Image();
m01_off.src = "img/menu/menu_02_.gif";
// Экспозиция
m02_on = new Image();
m02_on.src = "img/menu/menu_03.gif";
m02_off = new Image();
m02_off.src = "img/menu/menu_03_.gif";
// Деятельность
m03_on = new Image();
m03_on.src = "img/menu/menu_04.gif";
m03_off = new Image();
m03_off.src = "img/menu/menu_04_.gif";
// Контакты
m04_on = new Image();
m04_on.src = "img/menu/menu_05.gif";
m04_off = new Image();
m04_off.src = "img/menu/menu_05_.gif";
// Сотрудничество
m05_on = new Image();
m05_on.src = "img/menu/menu_06.gif";
m05_off = new Image();
m05_off.src = "img/menu/menu_06_.gif";
// Новости
m06_on = new Image();
m06_on.src = "img/menu/menu_07.gif";
m06_off = new Image();
m06_off.src = "img/menu/menu_07_.gif";
// Гостевая книга
m07_on = new Image();
m07_on.src = "img/menu/menu_08.gif";
m07_off = new Image();
m07_off.src = "img/menu/menu_08_.gif";
// Новости
m08_on = new Image();
m08_on.src = "img/menu/menu_09.gif";
m08_off = new Image();
m08_off.src = "img/menu/menu_09_.gif";
// Новости
m09_on = new Image();
m09_on.src = "img/menu/menu_10.gif";
m09_off = new Image();
m09_off.src = "img/menu/menu_10_.gif";

m10_on = new Image();
m10_on.src = "img/menu/menu_12.gif";
m10_off = new Image();
m10_off.src = "img/menu/menu_12_.gif";







function img_inact(img)
{
	imgOn = eval(img+"_on.src");
	document[img].src = imgOn;

}

function img_act(img)
{
	imgOn = eval(img+"_off.src");
	document[img].src = imgOn;
}

<!-- Image Selector
// Usage:
//  RandomImage(images)
//  RandomImageLong(images,iparams)
//  RandomImageLink(images,urls)
//  RandomImageLinkLongTarget(images,urls,iparams,hparams)
//     images		is space or comma separated file list
//     urls		is space or comma separated list of url's
//     iparams		params to add to <img>
//     hparams		params to add to <a href..>

function RandomImageLong(images,iparams)
{
/* si: start index 
** i: current index
** ei: end index
** cc: current count
*/
 si = 0; 
 ci=0;
 cc=0;
 imageSet = new Array();
 ei = images.length;
  for (i=1;i<ei;i++) {
    if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
      imageSet[cc] = images.substring(si,i);
      cc++;
      si=i+1;
      }
    }
  ind = Math.floor(Math.random() *cc);
  document.write("<img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\">");
}

function RandomImage(images)
{
  RandomImageLong(images," ");
}

function RandomImageLinkLongTarget(images,urls,iparams,hparams)
{
/* si: start index 
** i: current index
** ei: end index
** cc: current count
*/
 imageSet = new Array();
 urlSet = new Array();
 si = 0; 
 ci=0;
 cc=0;
 ei = images.length;
  for (i=1;i<ei;i++) {
    if (images.charAt(i) == ' ' || images.charAt(i) == ',') {
      imageSet[cc] = images.substring(si,i);
      cc++;
      si=i+1;
      }
    }
  ind = Math.floor(Math.random() *cc);
 si = 0; 
 ci=0;
 cc=0;
 ei = urls.length;
  for (i=1;i<ei && cc <=ind ;i++) {
    if (urls.charAt(i) == ' ' || urls.charAt(i) == ',') {
      urlSet[cc] = urls.substring(si,i);
      cc++;
      si=i+1;
      }
    }

  //document.write("<img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\">");
  document.write("<a "+hparams+" href=\""+urlSet[ind]+"\"><img "+iparams+" src="+imageSet[ind]+" alt=\""+imageSet[ind]+"\"></a>");
}

function RandomImageLinkLong(images,urls,iparams)
{
  RandomImageLinkLongTarget(images,urls,iparams,"");
}

function RandomImageLink(images,urls)
{
  RandomImageLinkLongTarget(images,urls,"border=0","");
}

// End Script -->

// <!--
// Вложенные подуровни

function ChangeIt(id)	{
	id.style.display = (id.style.display=="block")?"none":"block";
}

function MyChangeIt(id,loc) {
	if(id.style.display=="none") {
		location.href=loc;
	}
	else { 
		id.style.display="none"; 
	}
}

function godown(loc) {
	location.href=loc;
}
// -->
