

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 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;
newPopupName=window.open(popupLocation,'newname','height='+popupHeight+',width='+popupWidth+',left='+popupLeft+',top='+popupTop+',resizable=0');

if (newPopupName.focus) {
newPopupName.focus();
}

return false;

}