defaultStatus="  ";

function checkBrowser()
  {
    var b=navigator.appName;
    if(b=="Netscape")
      this.b="NS"
    else if(b=="Microsoft Internet Explorer")
      this.b="IE"
    else
      this.b=b;
    this.version=navigator.appVersion;
    this.v=parseInt(this.version);
    this.NS=(this.b=="NS" && this.v>=4);
    this.NS4=(this.b=="NS" && this.v==4);
    this.NS405=(this.NS && parseFloat(this.version)==(4.05 || 4.06));
    this.NS408=(this.NS && parseFloat(this.version)==(4.08));
    this.NS5=(this.b=="NS" && this.v==5);
    this.IE=(this.b=="IE" && this.v>=4);
    this.IE4=(this.version.indexOf('MSIE 4')>0);
    this.IE45=(this.version.indexOf('MSIE 4.5')>0);
    this.IE5=(this.version.indexOf('MSIE 5')>0);
    this.NorM=(this.NS||this.IE);
    this.os=navigator.userAgent;
    this.WINDOWS=(this.os.indexOf("Win")>=0);
    this.MACINTOSH=(this.os.indexOf("Mac")>=0);
  }

is=new checkBrowser();

function newWindow(cURL,cTitle,cWidth,cHeight)
  {
    if(cWidth!=null)
      cWidth=",width="+cWidth
    else
      cWidth="";
    if(cHeight!=null)
      cHeight=",height="+cHeight
    else
      cHeight="";
    window.open(cURL,cTitle,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,Dependent=1"+cWidth+cHeight);
  }

function setStatus(cMsg)
  {
    window.status=cMsg;
    msgTimer=setTimeout("clearStatus()",5000);
    return true;
  }

function clearStatus()
  {
    window.status="  ";
    clearTimeout(msgTimer);
    return true;
  }

function setPageReload(cURL)
  {
    rldTimer=setTimeout("PageReload('"+cURL+"')",1000*60*5);
  }

function PageReload(cURL)
  {
    clearTimeout(rldTimer);
    location.replace(cURL);
  }

function changeImage()
  {
    if(changeImage.arguments.length==0)
      {
        for(var i=0;i<self.document.images.length;i++)
          if(self.document.images[i].changed)
            {
              self.document.images[i].changed=false;
              self.document.images[i].src=self.document.images[i].oldsrc;
            }
      }
    else
      {
        self.document.images[changeImage.arguments[0]].changed=true;
        self.document.images[changeImage.arguments[0]].src=changeImage.arguments[1];
      }
  }

function preloadImages()
  {
    self.document.aImages=new Array();
    var j=0,param=preloadImages.arguments;
    for(var i=0;i<self.document.images.length;i++)
      {
        self.document.images[i].changed=false;
        self.document.images[i].oldsrc=self.document.images[i].src;
      }
    for(var i=0;i<param.length;i++)
      {
        self.document.aImages[j]=new Image;
        self.document.aImages[j++].src=param[i];
      }
  }

function EnterKey(esemeny)
  {
    if (is.IE)
      {
        if (13==window.event.keyCode)
          self.document.forms[0].submit();
      }
    else
      {
        with (esemeny)
          {
            if (13==parseInt(which))
              self.document.forms[0].submit();
          }
      }
    return true;
  }

