function photosLoad() {
  var height = document.getElementById("page").offsetHeight - 260;
  var html = "";
  while (height > 0 && photos.length > 0) {
    var i = parseInt(Math.random() * photos.length);
    var h = sizes.splice(i, 1);
    var photo = photos.splice(i, 1);
    if (h < height) {
      html += photo;
      height = height - h - 18;
    }
  }
  document.getElementById("photos").innerHTML = html;
}
