<!-- HIDE FROM NON-JAVASCRIPT ENABLED BROWSERS

function buttonOn (aObj)
{
  if (aObj.parentElement)
  {
    var widget = aObj.parentElement;
    widget.className = "navButtonOn";
  }
}

function buttonOff (aObj)
{
  if (aObj.parentElement)
  {
    var widget = aObj.parentElement;
    widget.className = "navButton";
  }
}

/** ----------------------------------------------------------------------
  * openWindow
  *
  * Remarks:
  * Spawns a new browser window, and opens the file found identified by
  * URL in the new window.
  *
  * parameters: url - the URL of the file to open in the new window
  * returns: None
  *
  * Created:    23 Jan 2003
  * Author:     Kevin Corr
  * ----------------------------------------------------------------------
  */
function openWindow(url)
{
	window.open(url,"","height=435,width=630,left=140,top=40,screenX=140,screenY=40,scrollbars=1'");
}


/** ----------------------------------------------------------------------
  * openLocationWindow
  *
  * Remarks:
  * Spawns a new browser window, and opens the file found identified by
  * URL in the new window.
  *
  * parameters: url - the URL of the file to open in the new window
  * returns: None
  *
  * Created:    23 Jan 2003
  * Author:     Kevin Corr
  * ----------------------------------------------------------------------
  */
function openLocationWindow(url)
{
	window.open(url,"","'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height=610,width=765,left=20,top=20'");
}


/** ----------------------------------------------------------------------
  * changePic
  *
  * Remarks:
  * Changes the image ref known as tourImage to point to img_src
  * and changes its alt text to img_alt
  *
  * parameters: img_src - the path to the new image ref
  *		img_alt - the text to display as the image alt
  *		scl_pnt - the position to move the scroll area to
  * returns: None
  *
  * Created:    24 mar 2004
  * Author:     Kevin Corr
  * ----------------------------------------------------------------------
  */
function changePic(img_src,img_alt, scl_pnt)
{
	document['tourImage'].src	= img_src;
	document['tourImage'].alt	= img_alt;
	document.getElementById("description").innerText	= img_alt;
	document.getElementById("nav").scrollLeft= scl_pnt;
}


  /* Function to efficiently fix elements that are not filled. */
  function fixElement(element, message)
  {
     alert(message);
     element.focus();
  }


  /* Main mail function:
       1. checks elements
       2. sends mail.
  */

  function isContactFormReady(form)
  {
     var passed = false;
     if (form.name.value == "")
     {
        fixElement(form.name, "Please include your name.");
     }
     else if ((form.email.value == "") && (form.phone.value == ""))
     {
        fixElement(form.email, "Please include your email address or phone number.");
     }
     else if (form.query.value == "")
     {
        fixElement(form.query, "Please inlcude your message.");
     }
     else
     {
        passed = true;
     }
     return passed;
  }
  
// CODE FOR TICKER

// 1999 by Christian Maier 1999   http://www.beste-links.de.cx
// 2002 Modified by Kevin Corr    corrk@hotmail.com

// CONSTANTS
var DELAY_BETWEEN_MESSAGES = 1500;
var DELAY_BETWEEN_CHARS = 60;

var max = 0;

var x = 0;
var pos = 0;
var endChar = 0;

function textlist()
{
  max = textlist.arguments.length;
  for (i=0; i<max; i++)
  {
    this[i]=textlist.arguments[i];
  }
}

function textticker()
{

  if (endChar == 0)
  {
    document.tickform.tickfield.value=tl[x].substring(0,pos)+"-";
    endChar = 1;
  }
  else
  {
    document.tickform.tickfield.value=tl[x].substring(0,pos)+"_";
    endChar = 0;
  }

  if (pos++ == l)
  {
    document.tickform.tickfield.value=tl[x];
    pos = 0;
    setTimeout("textticker()",DELAY_BETWEEN_MESSAGES);
    x++;

    if (x == max)
    {
      x=0;
    }

    l = tl[x].length;
  }
  else
  {
    setTimeout("textticker()",DELAY_BETWEEN_CHARS);
  }
}

function isGBSignReady(form)
  {
     var passed = false;
     if (form.Fname.value == "")
     {
        fixElement(form.Fname, "Please inlcude your first name.");
     }
     else if (form.Sname.value == "")
     {
        fixElement(form.Sname, "Please include your surname.");
     }
     else if (form.Location.value == "")
     {
        fixElement(form.Location, "Please include your location.");
     }
     else if (form.comment.value == "")
     {
        fixElement(form.comment, "Please inlcude a comment.");
     }
     else
     {
        passed = true;
     }
     return passed;
  }


// END HIDE -->

