function loadanimate() {
	Effect.Grow('homelink', { duration: 1});
	Effect.Grow('aboutlink', { duration: 1.5});
	//Effect.Grow('photolink', { duration: 2});
	Effect.Grow('musiclink', { duration: 2.5});
	Effect.Grow('linkslink', { duration: 3});
	Effect.Grow('contactlink', { duration: 3.5});
	Effect.Appear('footer', { duration: 8});
}
function extlinks() { 
	if (!document.getElementsByTagName) return;
	var lynkz = document.getElementsByTagName("a");
	for (a=0; a<lynkz.length; a++) {
		var lynk = lynkz[a];
		if (lynk.getAttribute("href") && lynk.getAttribute("rel") == "new") lynk.target = "_blank";
	}
}
function vmailc(address) {
	
	check = address.match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/);
	

	if (check == null) {
		return "no";
	}
	else {
		return "ok";
	}
}
/* Resize a textarea
	call it with txtarea(1) or txtarea(-1)
*/
function txtarea(direction) {
  var txtarea = document.getElementById('message');
  if (direction==1) {
    txtarea.rows = txtarea.rows + 5;
  }
  else {
    txtarea.rows = txtarea.rows - 5;
  }
  document.getElementById("txtareastate").value=txtarea.rows;
  return false;
}
function DHTMLcontactForm() {
	var formz = document.getElementsByTagName("form");
	for (f=0; f<formz.length; f++) {
		var frm = formz[f];
		frm.onsubmit = function() {
			ValidateEmail(this);
			return false;
		}
	}
	var inputs = document.getElementsByTagName("input");
	for (i=0; i<inputs.length; i++) {
		var inp = inputs[i];
		if (inp.type == "text") {
			inp.onfocus = function() {
				if (this.className == "txt") this.className = "txtg";
				else if (this.className = "stxt") this.className = "stxtg";
			}
			inp.onblur = function() {
				if (this.className == "txtg") this.className = "txt";
				else if (this.className = "stxtg") this.className = "stxt";
			}
		}
	}
	var txta = document.getElementById("message");
	txta.onfocus = function() {
		this.className = "txtafocus";
	}
	txta.onblur = function() {
		this.className = "txtablur";
	}
	
}
function ValidateEmail(email) {
	var errors = 0;
	var inputz = document.getElementsByTagName("input");
	for (ii=0; ii<inputz.length; ii++) {
		var inp = inputz[ii];
		/*if (inp.type = "text" && inp.value == "") {
			errors++;
			if (this.className == "txt") this.className = "txte";
			else if (this.className = "stxt") this.className = "stxte";
		}*/
	}
	if (errors != 0) {
	
	}
	else {
		document.getElementById("display").style.display = "none";
		sdiv = document.getElementById("submitter");
		sdiv.style.display = "block";
		sdiv.innerHTML = "<p>Sending message, Please wait...</p>";
		email.submit();
	}
}