How to week of the year and use it as image source?
<p>What I am trying to do is show a jpg for each week in the year depending on what the date is. Does anybody know why this does not work?</p>

<pre><code>Date.prototype.getWeek = function() {         
var onejan = new Date(this.getFullYear(),0,1);         
return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7);     
}       

var weekNumber = (new Date()).getWeek();

var test='&lt;img src="C:/temp/ + weekNumber + .jpg"/&gt;';
document.write(test);
</code></pre>
