//if (document.getElementById('puzzle')) {

var isIE = false;
if (typeof(window.innerWidth) == 'number') {
  // Non-IE
} else if (
    (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
    || (document.body && (document.body.clientWidth || document.body.clientHeight))
  ) {
  isIE = true;
}

window.onload = function() {
  if (document.getElementById && document.createElement) {
    var puzzle = document.getElementById('puzzle');
    var divs = '';
    for (var i = 0; i < pics.length; i++) {
      var style = 'position: absolute;display: block; ';
      style = style + 'width: ' + pics[i][1] + 'px;';
      style = style + 'height: ' + pics[i][2] + 'px;';

      if (!isIE) {
        style = style + 'background-image: url(\'' + pics[i][0] + '\'); background-repeat: no-repeat;';
      } else {
        style = style + 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + pics[i][0] + '\');'
      }
      divs = divs + '<div style="' + style + '" id="p' + i + '"><' + '/div>';
    }
    puzzle.innerHTML = divs;
  }
}

//}