function showCertified(){
	var wnd = openWindow("/awcertified.html", "Certified", 704, 503, "");
}

function openWindow(sURL, sName, nWidth, nHeight, sFeatures) {
// wraps around 'window.open' and centralizes the new window based on its opener window
// usage:  var wnd = openWindow("Page.htm", "page name", 400, 400, "resizable=1")
	if (sFeatures) {
		sFeatures = getWindowCenterOptions(nWidth, nHeight) +"," +sFeatures
	}
	else sFeatures = getWindowCenterOptions(nWidth, nHeight)
	wnd = window.open(sURL, sName, sFeatures);
	return wnd;
}


function getWindowCenterOptions(nWidth, nHeight) {
	var sFeatures
	
	var bIE = navigator.appVersion.indexOf("MSIE") > -1
	var nLeft, nTop
	var wnd
	var myTop = window.top
	
	if ( navigator.appVersion.indexOf("MSIE") > -1 ) {
		var myBody = myTop.document.body
		if (!myBody) {
			myBody = document.body
			myTop = window
		}
		if (myBody) {
			if (myTop.screenLeft) {
				nLeft = centralize(screen.availWidth, myTop.screenLeft, myBody.offsetWidth, nWidth + 10) // 10 is a  magic number
				nTop = centralize(screen.availHeight, myTop.screenTop, myBody.offsetHeight, nHeight + 29)	// 29 is another magic number
			} else { // IE 4 doesn't support screenLeft/Top so just center on screen
				nLeft = centralize(screen.availWidth, 0, screen.availWidth, nWidth) // 10 is a  magic number
				nTop = centralize(screen.availHeight, 0, screen.availHeight, nHeight)	// 29 is another magic number
			}
			sFeatures = "top=" + nTop + ",left=" + nLeft + ",width=" + nWidth + ",height=" + nHeight
		}			
	} else { // Netscape (most probably)

		nLeft = centralize(screen.availWidth, myTop.screenX, myTop.outerWidth, nWidth  )
		nTop = centralize(screen.availHeight, myTop.screenY, myTop.outerHeight, nHeight)

		sFeatures = "screenY=" + nTop + ",screenX=" + nLeft + ",outerWidth=" + nWidth + ",outerHeight=" + nHeight
	}
	
	return sFeatures
}

function centralize(Sr, Pl, Pw, Dw) {
	return Math.max(0, Math.min(Sr - Dw, (Math.max(0, Pl) + Math.min(Sr, Pl + Pw) - Dw) / 2))
}
