// RMSchedulerView.j
// RMSchedulerView


@import <AppKit/CPApplication.j>



@implementation RMSchedulerCPView : CPView {

}

- (void) mouseDown:(CPEvent)viewEven {
    var locaPoin = [viewEven locationInWindow];
	
	var fact1 = 4;
	var fact2 = 3600./fact1;
	var xd = 4;
	var yd = 4;
	
	var x = Math.floor(locaPoin.x/xd) - 3;
	var y = Math.floor(locaPoin.y/yd)/fact1;

	//alert("mouseDown1: x="+x+"  y="+y);   

	var week = Math.floor(x/8);
	x -= week*8;
	
	if ( y < 14.75 )
		y -= 2.5;
	else if ( y < 27 )
		y -= 2.75;
	else if ( y < 39.25 )
		y -= 27;
	else
		y -= 27.25;

	alert("mouseDown2: week="+week+"  day="+x+"  hour="+y);   
	 
}



@end
