// this shuffles the images for the windows at the top of the page
// the images are placed in the assets folder and are named with
// a prefix followed by a number, the prefix is wndw

var totalNum = 17; // total number of images to shuffle
var numArr = Array();
shuffle = function(o){
	for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
	return o;
};

for(var i = 1; i < totalNum+1; i++){
	numArr.push( i < 10 ? "0" + i : "" + i /*add leading zeros*/);
}

rnd = shuffle(numArr);

html_str = "<img src=\"assets/wndw"+rnd[0]+".jpg\" alt=\"wndw"+rnd[0]+"\" name=\""+rnd[0]+"\" class=\"img01\" />";
html_str += "<img src=\"assets/wndw"+rnd[1]+".jpg\" alt=\"wndw"+rnd[1]+"\" name=\""+rnd[1]+"\" class=\"img02\" />";
html_str += "<img src=\"assets/wndw"+rnd[2]+".jpg\" alt=\"wndw"+rnd[2]+"\" name=\""+rnd[2]+"\" class=\"img03\" />";
document.getElementById('windows').innerHTML=html_str;