// Copyright © Kelta Systems 2002-2005 - All rights reserved
// The following code is used under license from Kelta Systems - www.kelta.co.uk
/* v0-01a - work with frames */
/* v1-44 use zParse function */
/* v1-46 use zParse with arrays */
/* v1-47 bug fix */
/* 20050701 Licensed to The Whitehart Inn for use on www.whitehartinnbodmin.co.uk */

  window.zWindowVK = zDefineValidKeywords('!name!height!href!width!copyhistory!resizable!menubar!scrollbars!location!status!toolbar!');
  window.zWindowVKA = zDefineValidKeywords();

  // 'zWindow' object contructor ---------------------------------------------------
  function zWindow(parameters){ //zListP(parameters,'parameters=');
    if (parameters) {
      zParse(this,parameters,zWindowVK,zWindowVKA);
      if (!window.zWindows) window.zWindows = new Object();
      this.parms = 'copyhistory';
      if (this.resizable) this.parms = this.parms + ',resizable';
      if (this.menubar) this.parms = this.parms + ',menubar';
      if (this.scrollbars) this.parms = this.parms + ',scrollbars';
      if (this.location) this.parms = this.parms + ',location';
      if (this.status) this.parms = this.parms + ',status';
      if (this.toolbar) this.parms = this.parms + ',toolbar';
      if ((!window.zWindows[this.name]) || (window.zWindows[this.name].closed)) {
        window.zWindows[this.name] = window.open(this.href,this.name,this.parms);
      }
      window.zWindows[this.name].focus()
    }
  }
  new zWindow()