function win(url,awidth,aheight,wnd,no_scroll) {
	var scroll = (no_scroll) ? 'no':'yes';
	var x=(self.screen.width-awidth)/2; if (x<0) x=0;
	var y=(self.screen.height-aheight)/2; if (y<0) y=0;
	window.open(url,wnd,"width=" + awidth + ", height=" + aheight + ", replace=no, scrollbars=" + scroll + ", resize=no, left="+ x +", top=" + y);
}

function set_now(id) {
	var elm=document.getElementById(id); if (!elm || elm.value!='') return;
	var dt=new Date();
	var vl='', s=0;
	s=dt.getDate(); if (s<10) vl+='0'+s+'.'; else vl+=s+'.';
	s=dt.getMonth()+1; if (s<10) vl+='0'+s+'.'; else vl+=s+'.';
	elm.value=vl+dt.getFullYear();
}

function get_now(){
	var dt=new Date();
	var vl='', s=0;
	s=dt.getDate(); if (s<10) vl+='0'+s+'.'; else vl+=s+'.';
	s=dt.getMonth()+1; if (s<10) vl+='0'+s+'.'; else vl+=s+'.';
	vl+=dt.getFullYear();
	return vl;
}

function set_value(us, ut){
	var elm=parent.left.document.getElementById(us); 
	var tgt=document.getElementById(ut); 
	if (!elm || elm.value=='') return;
	else {
		var uval=elm.value.split('/');
		tgt.value=uval=uval[uval.length-1];
	}
}