ionl = new Image();
ionl.src='/i/butOnL.gif';
ionr = new Image();
ionr.src='/i/butOnR.gif';
il = new Image();
il.src='/i/1x1.gif';
ir = new Image();
ir.src='/i/1x1.gif';

function up(A, B, C, D) {
	if (document.images) { 
		document[A].src = ionl.src;
		document[B].src = ionr.src;
	}
	toggleOriginal(C, D);
}
function down(A, B, C, D)  {
	if (document.images) { 
		document[A].src = il.src; 
		document[B].src = ir.src;  
	}
	toggleOriginal(C, D);
}
function toggleOriginal(Y, Z) {  
	try {
		document.getElementById(Y).setAttribute("id", "butOnBg");
		document.getElementById(Z).setAttribute("id", "butOnC");
	}
	catch(e) {
		document.getElementById("butOnBg").setAttribute("id", Y); 
		document.getElementById("butOnC").setAttribute("id", Z);
	}
}     

function pop(n,wi,h) {
var t=(document.layers) ? "" : parent.document.title;
var a=t ? "закрыть окно" : "''";
w=window.open('','','width='+(wi+10)+',height='+(h+10)+',toolbar=0,scrollbars=0,resizable=1');
var d = w.document;
d.open();
d.writeln("<html><head><title>"+t+"</title><meta http-equiv=Content-Type content='text/html; charset=windows-1251'></head>");
d.writeln("<body bgcolor=white marginwidth=0 marginheight=0 topmargin=0 leftmargin=0><table width="+wi+" border=0 cellspacing=0 cellpadding=0><tr><td align=center valign=middle><a href=# onclick=window.close()><img src="+n+" width="+wi+" border=0 alt="+a+"></a></td></tr></table></body></html>");
d.close();
w.focus();
}