
		calendar = {
			cur		: 0,
			multi	: 0,
			load	: function(n) {
				$('refcal.month').update("dum dum...");
				calendar.cur += n;
				if(this.multi) $('float').hide();
				xhttp.send("/inc/ajx/mod.php", {wtype:'ajax', mod:'group', vars:{ 'n':calendar.cur, 'multi':this.multi }});
			},
			parse	: function(count) {
				$R(1, 42).each(function(n) { count++;
					$('refcal.'+n).className = (count<=0 || count > calendar.totalm) ? 'blur':'';
					$('refcal.'+n).stopObserving();
					if(calendar.dates['refcal.'+n]) {
						$('refcal.'+n).addClassName('active');
						$('refcal.'+n).observe('mouseover',calendar.blub);
					}
  					input = (count>0)? ((count > calendar.totalm)? count - calendar.totalm : count) : calendar.tprev + count;
  					$('refcal.'+n).update(input);
				});
			},
			blub 	: function() {
				
				if(calendar.multi) {
					vars = calendar.dates[this.id]; name='';
					$('float').clonePosition(this, {setWidth:0,setHeight:0,offsetLeft:0,offsetTop:0});
					$('float').update();
					vars.each(function(o){ $('float').appendChild(new Element('a',{href:"/artists/bio?id="+o.ID,"style":(o.otype==2)?"color:#aaa;":""}).update(o.name+"<br />")); });
					//$('float').update(name);
					$('float').show();
				} else {
					vars = calendar.dates[this.id][0];
					$('hint').clonePosition(this, {setWidth:0,setHeight:0,offsetLeft:6,offsetTop:21});
					$('hint.cont').update(vars.name);
					$('hint').show();
					this.observe('click', calendar.doinfo);
					this.observe('mouseout',calendar.unblub);
				}
			},
			refer	: function() {
					$('hint').clonePosition(this, {setWidth:0,setHeight:0,offsetLeft:6,offsetTop:21});
					$('hint.cont').update("klik voor volledig overzicht");
					$('hint').show();
					this.observe('click', function(){ window.location = "/agenda/cal.alles";});
					this.observe('mouseout',calendar.unblub);
			},
			unblub	: function() { $('hint').hide(); },
			closest	: function(now) {
				$('refcal.'+now).addClassName('now');
				for(n = now; n<42; n++) {
					if(calendar.dates['refcal.'+n]) { calendar.doinfo('refcal.'+n); break; }
				}
			},
			doinfo	: function(e) {
				vars = calendar.dates[(typeof e == 'string')? $(e).id : e.target.id][0];
				$('refcal.info.title').update();
				$('refcal.info.title').appendChild( new Element('a', {href:'/artiesten/bio?id='+vars.ID}).update(vars.name));
				$('refcal.info.date').update(vars.date);
				$('refcal.info.content').update(vars.content);
				$('refcal.info.content').appendChild(new Element('a', {href:'/artiesten/bio?id='+vars.ID}).update(' ...meer'));
				if(vars.alt) $('refcal.info.content').innerHTML += "<br />"+vars.alt;
			},
			goto	: function() {
				window.location = "/artists/bio?id="+calendar.dates[this.id][0].ID;
			}
		}
