  //****************
  //* Openwin
  //****************
  function openwin(url)
   {
    _new=window.open(url,'_new');
    setTimeout('_new.focus();',250);
   }
   //  <A HREF="#" onclick="openwin('URL')"> 

  //****************
  //* Showpicture
  //****************
  function showpicture(imgname,x,y) 
   { 
    _new = window.open(imgname,'_new','width='+x+',height='+y);
    setTimeout('_new.focus();',250);
   }
   //   use method <A HREF="javascript:showpicture('pics/hol2001/1_large.jpg',425,258)"> 

  //****************
  //* Set window status
  //****************
  function setwindowstatus()
   {
    window.status='Adelante Para Siempre'
   }

  //****************
  //* Setregfocus
  //* Set the focus to the first editable field on the screen
  //****************
  function setregfocus()
   {
    document.registration.realname.focus();
    setwindowstatus();
   }

  //****************
  //* Setwhakafocus
  //* Set the focus to the first editable field on the screen
  //****************
  function setwhakafocus()
   {
    document.whakaupdate.code.focus();
    setwindowstatus();
   }

  //****************
  //* Setmanuhirifocus
  //* Set the focus to the first editable field on the screen
  //****************
  function setmanuhirifocus()
   {
    document.manuhiri.realname.focus();
    setwindowstatus();
   }

  //****************
  //* Setnewsfocus
  //* Set the focus to the first editable field on the screen
  //****************
  function setnewsfocus()
   {
    document.news.realname.focus();
    setwindowstatus();
   }

  //****************
  //* Setsearchfocus
  //* Set the focus to the first editable field on the screen
  //****************
  function setsearchfocus()
   {
    document.search.terms.focus();
    setwindowstatus();
   }

  //****************
  //* Writedate
  //* Write today's date - from local workstations system
  //****************
  function writedate()
   {
    dayName = new Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
    monName = new Array ("January", "February", "March", "April", "May", "June", "July",
                         "August", "September", "October", "November", "December");
    today = new Date;
    document.write(dayName[today.getDay()] + ", " + today.getDate() + " " 
                   + monName[today.getMonth()]);
   }

  //****************
  //* Daystillparty
  //* Write 29 December 2001 less today's date
  //****************
  function daystillparty()
   {
    today = new Date;
    party = new Date("December 29, 2001")
    msPerDay = 24 * 60 * 60 * 1000 ; // Number of milliseconds per day
    daysLeft = ((party.getTime() - today.getTime()) / msPerDay) + 1;
    daysLeft = Math.floor(daysLeft);
    if (daysLeft < 0) daysLeft = 0;
    document.write(daysLeft);
   }

  //****************
  //* getrandom
  //* Write 29 January 2005 to help fight spam
  //****************
  function getrandom()
   {
    return Math.floor(Math.random()*999 + 1);    
   }

  //****************
  //* setvbles
  //* Write 29 January 2005 to help fight spam
  //****************
  var randomno
  function setvbles()
   {
    randomno = getrandom(); 
   }

  //****************
  //* Addbookmark
  //* bookmark current site
  //****************
  var bookmarkurl="http://www.manueljose.org.nz"
  var bookmarktitle="Manuel Jose Family"
  function addbookmark()
   {
    if (document.all)
    window.external.AddFavorite(bookmarkurl,bookmarktitle)
   }


