// Coded project advocat <advocat@zeema.com>
function menu (id, mode) {
	if (mode == 1) {
		document.getElementById(id).style.backgroundImage='url(/image/menu/bg-on.gif)';
	} else {
		document.getElementById(id).style.backgroundImage='url(/image/menu/bg-off.gif)';
	}
}
//--><!--
onmail=new Image(); onmail.src="image/header/icon-mail-on.gif"; ofmail=new Image(); ofmail.src="image/header/icon-mail.gif";
onhome=new Image(); onhome.src="image/header/icon-home-on.gif"; ofhome=new Image(); ofhome.src="image/header/icon-home.gif";

function icon (graphName, mode) {
	if (mode == 1) {
		img=eval("on"+graphName+".src")
		document.images[graphName].src=img;
	} else {
		img=eval("of"+graphName+".src")
		document.images[graphName].src=img;
	}
}
//--><!--
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.01
  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 && d.getElementById) x=d.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 rmenu (id, mode) {
        if (mode == 1) { document.getElementById(id).src='/image/menu/' + id + 'on.jpg';
        } else { document.getElementById(id).src='/image/menu/' + id + '.jpg'; }
}
ont1 = new Image(); ont1.src="image/menu/t1on.jpg";
ont2 = new Image(); ont2.src="image/menu/t2on.jpg";
ont3 = new Image(); ont3.src="image/menu/t3on.jpg";
ont4 = new Image(); ont4.src="image/menu/t4on.jpg";
ont5 = new Image(); ont5.src="image/menu/t5on.jpg";
ont6 = new Image(); ont6.src="image/menu/t6on.jpg";
ont7 = new Image(); ont7.src="image/menu/t7on.jpg";
<!-- // Button Reverse
function button (iname, file, mode) {
        if (mode == 1) document.images[iname].src = "image/button/" + file + "-on.gif";
        else document.images[iname].src = "image/button/" + file + ".gif";
} //--><!-- // Content Window Image Viewer
function OpenWinImage(img, title){
        popUpImage = new Image();
        popUpImage.src = (img);
        ControlImageLoad(img, title);
} function ControlImageLoad(img, title){
        if ((popUpImage.width!=0)&&(popUpImage.height!=0)) {
                viewPopUpImage(img, title);
        } else {
                NewControl = "ControlImageLoad('"+img+"','"+title+"')";
                CILInterval = setTimeout(NewControl,25);
        }
} function viewPopUpImage(img, title) {
        var imgwidth = popUpImage.width;
        var imgheight = popUpImage.height;
        viewpopupimgwin = window.open("","viewpopupimg","top=50,left=200,width=" + popUpImage.width + ",height=" + popUpImage.height + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
        viewpopupimgwin.document.write("<html><head><title>" + title + "</title></head><body leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 marginwidth=0 marginheight=0><img src=\""+ img +"\" border=\"0\" alt=\"" + title + "\"></body></html>");
} function PollCheck(form) {
        var resx = 0;
        for(a = 0; a<form.length; a++) {
                if (form.elements[a].checked == true) resx = 1;
        } if (resx == 1) form.submit();
        else alert("Вы не выбрали ответ!");
}//-->
