function pageHeight() {
	var myHeight;
	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight
	if (test1 > test2) // all but Explorer Mac
	{
		myHeight = document.body.scrollHeight;
	}
	else // Explorer Mac;
	     //would also work in Explorer 6 Strict, Mozilla and Safari
	{
		myHeight = document.body.offsetHeight;
	}
	return myHeight;
}

function toggle(theID) {
foo = document.getElementById(theID);
if (foo.style.display == 'none') foo.style.display = 'inline';
else foo.style.display = 'none';
return;
}

// this function puts the dark screen over the entire page
function dark()
{
   var myHeight = pageHeight();	
   var page_screen = document.getElementById('page_screen');
   page_screen.style.height = myHeight + 'px';
   page_screen.style.display = 'block';
}

// this function removes the dark screen and the page is light again
function light()
{
   var page_screen = document.getElementById('page_screen');
   page_screen.style.display = 'none';
}

function stripNonAlphaNumeric(str) {
  var r = str.replace(/[^a-zA-Z0-9]+/g,'');
  return r;
}

function fixString(str) {
  var r = str.replace(/"/g,"'");
  r = r.replace(/#/g, "");
  r = r.replace(/''/g,"' '");
  return r;
}

function confirmContact(emailAddress) {
	DWREngine._execute(_cfscriptLocation,null,'makeConfirmContent',emailAddress,showBox);
	return false;
}

function sendContactMessage () {
	hideEdit();
	return true;
}

function validateContactForm () {
if(""==document.emailForm.fname.value)
{
alert("Please enter your first name.");
return false;
}

if(""==document.emailForm.lname.value)
{
alert("Please enter your last name.");
return false;
}

if(""==document.emailForm.email.value)
{
alert("Please enter your email address.");
return false;
}
document.emailForm.submit();
return true;	
}