function testContactForm(theForm) {
	document.getElementById("contactError").innerHTML = "";
	if (theForm.contactName.value == "" || ( theForm.contactEmail.value == "" && theForm.contactPhone.value == "" ) || theForm.contactMessage.value == "" ) {
		document.getElementById("contactError").innerHTML = "** Please fill out all required fields **";
		return false;
	}
	else {
		return true;
	}
}
function testContactForm2(theForm) {
	document.getElementById("contactError").innerHTML = "";
	if (theForm.contactName.value == "" || ( theForm.contactEmail.value == "" && theForm.contactPhone.value == "" ) ) {
		document.getElementById("contactError").innerHTML = "** Please fill out all required fields **";
		return false;
	}
	else {
		return true;
	}
}

function extLink(theUrl) {
 document.location = "/external/?id=" + theUrl;
}

function redrawBottom() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  if (document.getElementById("container")) {
  	var containerHeight = document.getElementById("container").offsetHeight;
  	var bottomHeight = myHeight - containerHeight;
  	if (bottomHeight > 30) {
    	document.getElementById("container").style.height = (containerHeight + bottomHeight) + "px";
  	} else {
    	document.getElementById("container").style.height = (containerHeight + 30) + "px";
  	}
  }
}

//window.onresize = doThis;
window.onload = redrawBottom;