/*JavaScripts (http://www.cnooks.nl)*/

var today = new Date();
var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000);
var foto = "Image";
var alt = "Alt";
var url = "cnooks.htm";
var crc = "off";

function delCookie(name) {
  document.cookie = name + '=' + 
  "; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";
}

function setCookie(name, val) {
  document.cookie = name + "=" + escape (val) +
  "; expires=" + expiry.toGMTString() +  "; path=/"; 
}

function getCookie(varName) {
  var cookies = document.cookie.split("; ");
  for (i=0; i < cookies.length; i++) {
    nextcookie = cookies[i].split("=");
    if (nextcookie[0] == varName) {
      return unescape(nextcookie[1]);
    }
  }
  return null;
}

function putData(nummer,tekst,breedte,hoogte) {
  var woord = tekst.split(" ");
  var concat = "";
  for (var i=0;i<woord.length;i++) { concat += woord[i] + "&nbsp;" }
  setCookie(foto, nummer);
  setCookie(alt, concat);
  setCookie(crc, "off");
  bb = breedte;
  hh = hoogte;
  if (hh > screen.height) {
    hh = screen.height;
    bb = Math.round(breedte * screen.height / hoogte);
  }
  setCookie("Breedte", bb);
  setCookie("Hoogte", hh);
  attr='toolbar=no,location=0,directories=no,status=no,menubar=0,scrollbars=yes,resizable=no,';
  attr += 'width=' + bb + ',height=' + hh;
  Viewer=window.open(url,"Viewer",attr);
  Viewer.location=url;
  Viewer.moveTo((screen.width - bb) / 2,(screen.height - hh) / 2);
}

function seasnd() {
  var MSIE=navigator.userAgent.indexOf("MSIE");
  var NETS=navigator.userAgent.indexOf("Netscape");
  var OPER=navigator.userAgent.indexOf("Opera");
  var FIRE=navigator.userAgent.indexOf("Firefox");
  if((MSIE>-1) || (OPER>-1)) {
    document.write("<BGSOUND SRC=seasnd.au LOOP=3>");
  } else {
    document.write("<EMBED SRC=seasnd.au AUTOSTART=TRUE");
    document.write("HIDDEN=true VOLUME=1 LOOP=3>");
  }
}

/*JavaScripts (http://www.cnooks.nl)*/

