function doBlink()
{
  var blink = document.all.tags("BLINK")
  for (var i=0; i<blink.length; i++)
    blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
}

function startBlink()
{
  if (document.all)
    setInterval("doBlink()",250)
}

// JavaScript to interpolate random images into a page.
function pickRandomPhotoIndex()
{
  var ic = 2; // Number of alternative images
  var choice = 0;
  var photos = new Array(ic); // Array to hold filenames
  photos[0] = '<img src="images/havefun_rene.jpg" alt="" style="height: 425px; left: 66px; position: absolute; top: 164px; width: 358px;" />';
  photos[1] = '<img src="images/havefun_pam.jpg" alt="" style="height: 425px; left: 66px; position: absolute; top: 164px; width: 358px;" />';

  if (Math.random)
    choice = Math.round(Math.random() * (ic-1));
  else
  {
    var now = new Date();
    choice = (now.getTime() / 1000) % ic;
  }
  return photos[choice];
}

function checkforframe(framepage, menupage) {
  if (window.location==top.location)
  {
// voor productie
    var newURL =  self.location.protocol + '//www.jrsvhavefun.net/index.htm?framepage=' + framepage + '&menupage=' + menupage;
// voor testen -
//    var newURL = "Z:\\website_new\\index.htm?framepage=" + framepage + "&menupage=" + menupage;
    if (window.location.replace)
      top.location.replace(newURL);
    else
      top.location.href=newURL;
  }
}

function popup_all()
{
//  popup('/popup/bedrijventoernooi3.htm', 'Bedrijventoernooi', '394', '557');
//  popup('/popup/happynewyeartoernooi.htm', 'Bedrijventoernooi', '413', '585');
}

function popup(mylink, windowname, width, height)
{
  if (! window.focus)
    return true;

  var href;
  if (typeof(mylink) == 'string')
    href=mylink;
  else
    href=mylink.href;

  var size = "width=" + width + ",height=" + height + ",dependent=yes,scrollbars=no";

  popupwindow = window.open(href, windowname, size);
  popupwindow.moveTo(0,0);
}
