function useCheckbox( hidden_id, orig_value ) {
	var hidden_el = document.getElementById ( hidden_id );
	if ( hidden_el.value == orig_value ) hidden_el.value = 0;
	else hidden_el.value = orig_value;
}
function ShowHide(What)
{
	nav=document.getElementById(What).style
	if(nav.display=="none")
		{ nav.display='';}
	else
		{ nav.display='none'; }
}
var popup;
function openIMG(URL,WNAME,w,h)
{
	if (popup != null && !popup.closed) popup.close();  
	sw = screen.width-100;
	sh = screen.availHeight-100;
	if (w > sw || h > sh)
	{
		if (w > sw) {w1 = sw;} else {w1 = w+17;}
		if (h > sh) {h1 = sh;} else {h1 = h+17;}
		mtw1 = (screen.width-w1)/2;
		mth1 = (screen.availHeight-h1)/2;
		popup = window.open('',WNAME,"width="+w1+",height="+h1+",top="+mth1+",left="+mtw1+",status=no,toolbar=no,scrollbars=yes,resizable=no,menubar=no");
		popup.focus();
	}
	else
	{
		mtw = (screen.width-w)/2;
		mth = (screen.availHeight-h)/2;
    	popup = window.open('',WNAME,"width="+w+",height="+h+",top="+mth+",left="+mtw+",status=no,toolbar=no,scrollbars=no,resizable=no,menubar=no");
		popup.focus();
	}
  	popup.document.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>'+WNAME+'</title></head><body style="margin: 0px;"><a href="javascript:window.close();"><img src="'+URL+'" border=0 width="'+w+'" height="'+h+'" alt="Закрыть окно"></a></body></html>');
}