function writeFlash() {
document.write('<object type="application/x-shockwave-flash" data="images/masthead.swf" width="534" height="206" id="masthead" name="masthead">');
document.write('<param name="movie" value="images/masthead.swf" />');
document.write('<img src="images/masthead.jpg" width="534" height="206" alt="EHSmith" />');
document.write('</object>');
}

function getElement(elementName) {
// thanks to http://www.netlobo.com/div_hiding.html
if (window.document.getElementById) {
	// this is the way the standards work
	thiselement = window.document.getElementById(elementName);
	return true;
	} else if (window.document.all) {
	// this is the way old msie versions work
	thiselement = window.document.all[elementName];
	return true;
	} else if (window.document.layers) {
	// this is the way nn4 works
	thiselement = window.document.layers[elementName];
	return true;
	}
	return false;
}

function revealHidden() {
// reveal close window JS link if JS is active
  if (getElement('JSHidden')) {
    thiselement.style.display="block";
  }
}

function openPopup(popupLocation, popupName, popupWidth, popupHeight) {
    // set defaults if they can't be read
    var screenWidth = 760;
  var screenHeight = 420;

    if (self.screen.width) {

    screenWidth = self.screen.width;
    screenHeight = self.screen.height;
    //alert(screenWidth+", "+screenHeight);
    }

  var popupTop = (screenHeight-popupHeight)/2;
  var popupLeft = (screenWidth-popupWidth)/2;
  popupName=window.open(popupLocation,popupName,'height='+popupHeight+',width='+popupWidth+',left='+popupLeft+',top='+popupTop+',resizable=0');

  if (window.focus) {
  popupName.focus();
  }

  return false;
    
}
