// Copyright 2005, Sandeep Gangadharan -->
// For more free scripts go to http://www.sivamdesign.com/scripts/ -->
// This script formats the dropdowns in the sidebar

if (document.getElementById) {
 document.writeln('<style type="text/css"><!--')
 document.writeln('.main {text-decoration:none; font-family: "Helvetica Neue", Helvetica, Tahoma, Arial, sans-serif; font-size: .8em; color:#ffffff; padding-left:20px; cursor:hand; cursor:pointer}')
 document.writeln('span:hover.mainLink {text-decoration:none; color:#fbaa29}')
 document.writeln('.links {display:none; padding-left: 40px; font-family: "Helvetica Neue", Helvetica, Tahoma, Arial, sans-serif; font-size: .80em;}')
 document.writeln('.link {text-decoration: none; color:#ffffff;}')
 document.writeln('a:hover.link {text-decoration: none; color: #fbaa29}')
 document.writeln('//--></style>') }

function openClose(theID) {
 if (document.getElementById(theID).style.display == "block") {
     document.getElementById(theID).style.display = "none";
     document.getElementById("tick_"+theID).innerHTML = "+"; }
 else {
     document.getElementById(theID).style.display = "block";
     document.getElementById("tick_"+theID).innerHTML = "-"; } }
	 
// Copyright © 2001 by Apple Computer, Inc., All Rights Reserved.
// validate email field

function validateForm(theForm) 
{
  var why = "";
  why += checkEmail(theForm.email.value);
  if (why != "") {
      alert(why);
      return false;
   }
return true;
}
function checkEmail (strng) {
var error="";
if (strng == "") {
   error = "Please enter an email address.\n";
}

    var emailFilter=/^.+@.+\..{2,3}$/;
    if (!(emailFilter.test(strng))) { 
       error = "Please enter a valid email address.\n";
    }
    else {
//test email for illegal characters
       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (strng.match(illegalChars)) {
          error = "The email address contains illegal characters.\n";
       }
    }
return error;    
}

