ie = (document.getElementById)? true : false;
nn4 = (document.layers)? true : false;
ie4 = (!ie && document.all)? true : false;

function MscWH(theURL,w,h)
{	r='width='+w+', height='+h ;
	if (self.screen) {  width = screen.width; height = screen.height;  }
					else {  var jkit = java.awt.Toolkit.getDefaultToolkit();  var scrsize = jkit.getScreenSize();
								 width = scrsize.width; height = scrsize.height; }
						width =  width-20; 		height =  height -60;
					var scb='noscrollbars';
					var w1=w; 	if(w1>width) {w1=width; scb='scrollbars';}
					var h1=h; 	if(h1>height) {h1=height; scb='scrollbars';}
					t='width='+w1+', height='+h1 ;
	mWin = window.open("","",t+','+scb);
	    mWin.document.open();
        mWin.document.write('<html><body leftmargin=0 topmargin=0 MARGINWIDTH=0 MARGINHEIGHT=0 onload="window.focus();">');
        mWin.document.write('<center><img src=' + theURL + ' '+ r+' border=0></center></body></html>');
        mWin.document.close();
}

function svet(n,x) // --- функция подсветки фона ---
{  var m='0_'+n;
	    if(ie){if (x == 'over'){document.getElementById(n).style.backgroundColor = "#FFFFFF";
								document.getElementById(m).style.backgroundColor = "#FFFFFF";}
                else {document.getElementById(n).style.backgroundColor ="#FF033F";
					document.getElementById(m).style.backgroundColor ="#FF033F";}
              }
        if(ie4){if (x == 'over'){document.all[n].style.backgroundColor ="#FFFFFF"; 
								document.all[m].style.backgroundColor ="#FFFFFF";}
                 else { document.all[n].style.backgroundColor ="#FF033F";
						  document.all[m].style.backgroundColor ="#FF033F";
						}
              }
}


function svet1(n,x) // --- функция подсветки фона ---
{
	    if(ie){if (x == 'over')document.getElementById(n).style.backgroundColor = "#FF033F";
                else document.getElementById(n).style.backgroundColor ="";
              }
        if(ie4){if (x == 'over') document.all[n].style.backgroundColor ="#FF033F"; 
                 else  document.all[n].style.backgroundColor ="";
              }
}

function svet2(n,x) // --- функция подсветки фона ---
{  var m='0_'+n;
	    if(ie){if (x == 'over'){document.getElementById(n).style.backgroundColor = "#FFFFFF";
								document.getElementById(m).style.backgroundColor = "#FFFFFF";}
                else {document.getElementById(n).style.backgroundColor ="#000000";
					document.getElementById(m).style.backgroundColor ="#000000";}
              }
        if(ie4){if (x == 'over'){document.all[n].style.backgroundColor ="#FFFFFF"; 
								document.all[m].style.backgroundColor ="#FFFFFF";}
                 else { document.all[n].style.backgroundColor ="#000000";
						  document.all[m].style.backgroundColor ="#000000";
						}
              }
}

