function getElementsByClassName(classname, node) {
  if(!node) node = document.getElementsByTagName("body")[0];
  var a = [];
  var re = new RegExp('\\b' + classname + '\\b');
  var els = node.getElementsByTagName("*");
  for(var i=0,j=els.length; i<j; i++)
  if(re.test(els[i].className))a.push(els[i]);
return a;
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

function querySt(ji) {
	hu = window.location.search.substring(1);
	gy = hu.split("&");
	for (i=0;i<gy.length;i++) {
		ft = gy[i].split("=");
		if (ft[0] == ji) {
			return ft[1];
		}
	}
}

function validateForm()
{
	if (document.emailForm.firstname.value == "") {
		alert("Please enter your first name.");
		document.emailForm.firstname.focus();
		return false;
	}
	else if (document.emailForm.email.value == "") {
		alert("Please enter your email.");
		document.emailForm.email.focus();
		return false;
	}
	else if (!document.getElementById('newsYes').checked && !document.getElementById('newsNo').checked) {
		alert("Please specify whether you wish to receive the newsletter.");
		return false;
	}
	else {
		return true;
	}
}

function setFooter() {
	
}