// JavaScript Document
function isValidEmail(str) {
  return (str.indexOf(".") > 0) && (str.indexOf("@") > 0);
}
function isEmpty(aTextField) {
   if ((aTextField.value.length==0) || (aTextField.value==null)) {
      return true;
   }
   else { return false; }
}

function validateContactForm(form) {
	if (isEmpty(form.email) || !(isValidEmail(form.email.value))) {
		document.all.emailNote.innerText='Invalid email address!';
		if (document.all.emailNote.style.color != 'red') {		// Only change it if needed
			document.all.emailNote.style.color='red';
			document.all.emailNote.style.fontWeight='bold';
		}
		return false;
	}
	return true;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr);
}

function resetText() {
	changeText(0);
}

function noop() {
	return true;
}

function preloadImages()
{
  if(document.images)
  {
    if(!document.imageArray) document.imageArray = new Array();
    var i,j = document.imageArray.length, args = preloadImages.arguments;
    
    for(i=0; i<args.length; i++)
    {
      if (args[i].indexOf("#")!=0)
      {
        document.imageArray[j] = new Image;
        document.imageArray[j++].src = args[i];
      }
    }
  }
}
