/*-------------------------------------------------------------------------*/
/* Javascript External Reference File                                      */
/* Copyright (c)2001, Scott Bambrick. All Rights Reserved.                 */
/* Created for MONTO STEEL PRODUCTS - montosteel.com.au                    */
/* Created      6/11/01                                                    */
/* Modified     9/11/01                                                    */
/* Email        scott@monto.au.com                                         */
/* Web          monto.au.com                                               */
/*-------------------------------------------------------------------------*/
function MenuOn()
{
  source=event.srcElement
  if (source.tagName=="TR"||source.tagName=="TABLE")
    return
  while(source.tagName!="TD")
    source=source.parentElement
  if (source.style.backgroundColor!='6988C2')
    source.style.backgroundColor='6988C2'
}

function MenuOff()
{
  if (event.fromElement.contains(event.toElement)||source.contains(event.toElement))
  return
  if (event.toElement!=source)
  source.style.backgroundColor='597BBB'
}

function ValidateEmail()
{
  Email = document.MailList.Email.value;

  if (Email == '')
  {
    alert('ERROR\nYou must enter your email address.');
    document.MailList.Email.focus();
    return(false);
  }

  if (Email.indexOf("@")<2)
  {
    alert('ERROR\nThe email address you have entered is invalid.');
    document.MailList.Email.focus();
    return(false);
  }

  if ((Email.indexOf(".com")<5)&&(Email.indexOf(".org")<5)&&(Email.indexOf(".gov")<5)&&(Email.indexOf(".net")<5)&&(Email.indexOf(".mil")<5)&&(Email.indexOf(".edu")<5)&&(Email.indexOf(".co")<5)&&(Email.indexOf(".biz")<5)&&(Email.indexOf(".tv")<5)&&(Email.indexOf(".cc")<5)&&(Email.indexOf(".ca")<5))
  {
    alert('ERROR\nThe email address you have entered is invalid.');
    document.MailList.Email.focus()
    return(false);
  }
}

function ImageView(image)
{
  window.open("imageviewer.php?image=" + image,"ImageViewer","width=10,height=10,resizable=0,menubar=no,status=no,left=50,top=50");
}

