A few tips.
Comparing Dates In Javascript / Actionscript
If you have two date objects, you need to compare their values returned by their valueOf or getTime methods:
date1.valueOf() > new Date().valueOf()
If you are only after the difference in days, a quickt way of doing it is:
Math.floor( ( date1 - date2 ) / 86400000 );
Working With Weeks In Javascript / Actionscript
To find the start of the week:
//Mon=1, Tue=2,.., Sun=7
var start = 1;
date1.setDate( date1.getDate() - ( date1.getDay() + 7 - start ) % 7 )

Updates
subscribe to this blog's rss feed'
follow me on twitter
subscribe friendfeed
my delicious bookmarks
my youtube channel