function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


    function showram(p)
    {
      // p - префикс
        var xb1 = document.getElementById(p+'xb1');
        var xb2 = document.getElementById(p+'xb2');
        var xb3 = document.getElementById(p+'xb3');
        var xb4 = document.getElementById(p+'xb4');
        var xb5 = document.getElementById(p+'xb5');
        var xb6 = document.getElementById(p+'xb6');
        var xb7 = document.getElementById(p+'xb7');
        var xb8 = document.getElementById(p+'xb8');
        var xb9 = document.getElementById(p+'xb9');
        xb1.style.background='#005511';
        xb2.style.background='#fff';
        xb2.style.borderColor='#060';
        xb3.style.background='#fff';
        xb3.style.borderColor='#060';
        xb4.style.background='#fff';
        xb4.style.borderColor='#060';
        xb5.style.background='#fff';
        xb5.style.borderColor='#005511';
        xb6.style.background='#fff';
        xb6.style.borderColor='#060';
        xb7.style.background='#fff';
        xb7.style.borderColor='#060';
        xb8.style.background='#fff';
        xb8.style.borderColor='#060';
        xb9.style.background='#005511';
    }

    function hideram(p)
    {
      // p - префикс
        var xb1 = document.getElementById(p+'xb1');
        var xb2 = document.getElementById(p+'xb2');
        var xb3 = document.getElementById(p+'xb3');
        var xb4 = document.getElementById(p+'xb4');
        var xb5 = document.getElementById(p+'xb5');
        var xb6 = document.getElementById(p+'xb6');
        var xb7 = document.getElementById(p+'xb7');
        var xb8 = document.getElementById(p+'xb8');
        var xb9 = document.getElementById(p+'xb9');
        xb1.style.background='#f5f5f5';
        xb2.style.background='#f5f5f5';
        xb2.style.borderColor='#f5f5f5';
        xb3.style.background='#f5f5f5';
        xb3.style.borderColor='#f5f5f5';
        xb4.style.background='#f5f5f5';
        xb4.style.borderColor='#f5f5f5';
        xb5.style.background='#f5f5f5';
        xb5.style.borderColor='#f5f5f5';
        xb6.style.background='#f5f5f5';
        xb6.style.borderColor='#f5f5f5';
        xb7.style.background='#f5f5f5';
        xb7.style.borderColor='#f5f5f5';
        xb8.style.background='#f5f5f5';
        xb8.style.borderColor='#f5f5f5';
        xb9.style.background='#f5f5f5';
    }

function addBookmark(url, title)
{
if (!url) url = location.href;
if (!title) title = document.title;
//Gecko
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel ("My Site", "../www.mysite.com/", "");
//IE4+
else if (typeof window.external == "object") window.external.AddFavorite(url, title);
//Opera7+
else if (window.opera && document.createElement)
{
var a = document.createElement('A');
if (!a) return false; //IF Opera 6
a.setAttribute('rel','sidebar');
a.setAttribute('href',url);
a.setAttribute('title',title);
a.click();
}
else return false;
return true;
}

   
