function popup(url) {
  newwindow=window.open(url,'Card','width=362,height=230,menubar=no,toolbar=no,status=no,resizable=yes');
  if (window.focus) {newwindow.focus()}
  return false;
}
var x = document.getElementsByTagName('a');
function setpopups() {
  for (var i=0;i<x.length;i++) {
    if (x[i].className == 'card') {
      x[i].onclick = function () {
        return popup(this.href)
      }
    }
  }
}
var y = 0;
var homel = new Array();
homel[0] = '<img src="images/home-l1.jpg" id="homeimagel" width="450" height="192" alt="XYZ">';
homel[1] = '<img src="images/home-l2.jpg" id="homeimagel" width="450" height="192" alt="XYZ">';
homel[2] = '<img src="images/home-l3.jpg" id="homeimagel" width="450" height="192" alt="XYZ">';
homel[3] = '<img src="images/home-l4.jpg" id="homeimagel" width="450" height="192" alt="XYZ">';
homel[4] = '<img src="images/home-l5.jpg" id="homeimagel" width="450" height="192" alt="XYZ">';
var homer = new Array();
homer[0] = '<img src="images/home-r1.jpg" id="homeimager" width="320" height="192" alt="XYZ">';
homer[1] = '<img src="images/home-r2.jpg" id="homeimager" width="320" height="192" alt="XYZ">';
homer[2] = '<img src="images/home-r3.jpg" id="homeimager" width="320" height="192" alt="XYZ">';
homer[3] = '<img src="images/home-r4.jpg" id="homeimager" width="320" height="192" alt="XYZ">';
homer[4] = '<img src="images/home-r5.jpg" id="homeimager" width="320" height="192" alt="XYZ">';
var name = "";
function getId(name) {
  if (document.getElementById) {
    this.obj = document.getElementById(name);
    this.src = document.getElementById(name).src;
  }
  else if (document.all) {
    this.obj = document.all[name];
    this.src = document.all[name].src;
  }
  else if (document.layers) {
    this.obj = document.layers[name];
    this.src = document.layers[name];
  }
}
function randomhomeimages() {
  y=Math.round(Math.random()*(homel.length-1));
  document.write(homel[y])
  y=Math.round(Math.random()*(homel.length-1));
  document.write(homer[y])
}
window.onload = setpopups;
