function checkBrowser() {
	var browser = navigator.userAgent;
	if (browser.indexOf('MSIE') != -1)
	{
		//they're using IE, let's see what version it is
		//-cut the string at MSIE
		browser = browser.substring(browser.indexOf('MSIE'));
		//-find the first instance of ';', and cut everything else after it
		browser = browser.substring(0, browser.indexOf(';'));
		//-cut 'MSIE ' off to just have the version number
		browser = browser.substring(5); //'MSIE ' = 5
		//-convert to number by multiplying by 1
		browser = browser *= 1;
		//-now see if the version is less than 7
		if (browser < 7) {
			return false;
		}
	}
	return true;
}

function swapLogo(obj, img) {
	//only perform this function if user is using IE7 or the other good browsers
	if (checkBrowser()) {
		document.getElementById(obj).src = img;
	}
}

function popUpImg(obj, img, imgW, imgH) {
	var popUpLoc = document.getElementById(obj);
	//alert(obj + ', ' + popUpLoc);
	//clear the popup window
	popUpLoc.innerHTML = '';
	//screen width/height
	var screenW;
	var screenH;
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	if (typeof window.innerWidth != 'undefined')
	{
		screenW = window.innerWidth,
		screenH = window.innerHeight
	}
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	else if (typeof document.documentElement != 'undefined'
	 && typeof document.documentElement.clientWidth !=
	 'undefined' && document.documentElement.clientWidth != 0)
	{
	    screenW = document.documentElement.clientWidth,
		screenH = document.documentElement.clientHeight
	}
	// older versions of IE
	else
	{
	    screenW = document.getElementsByTagName('body')[0].clientWidth,
		screenH = document.getElementsByTagName('body')[0].clientHeight
	}
	//alert('screen width = ' + screenW + ', screen height = ' + screenH);
	//user scroll positions
	var scrollX = typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement.scrollLeft;
  	var scrollY = typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement.scrollTop;
	//alert('scrollX='+scrollX+', scrollY='+scrollY);
	//position the popup window
	var midX = Math.floor(screenW/2) + scrollX;
	var midY = Math.floor(screenH/2) + scrollY;
	var imgMidX = Math.floor(imgW/2);
	var imgMidY = Math.floor(imgH/2);
	var posLeft = midX - imgMidX;
	var posTop = midY - imgMidY;
	//alert('midX='+midX+', midY='+midY+', imgMidX='+imgMidX+', imgMidY='+imgMidY+', posLeft='+posLeft+', posTop='+posTop);
	//set popup window properties
	popUpLoc.style.top = posTop + 'px';
	popUpLoc.style.left = posLeft + 'px';
	popUpLoc.style.width = imgW + 'px';
	//popUpLoc.style.height = (imgH + 10) + 'px';
	popUpLoc.innerHTML = '<div align="right"><a href="#" onclick="hide(\''+obj+'\'); return false;">[close]</a></div><a href="#" onclick="hide(\''+obj+'\'); return false;"><img src="'+img+'" width="'+imgW+'" height="'+imgH+'" border="0" alt="click to close" title="click to close" /></a>';
	//display the popup window
	popUpLoc.style.display = 'block';
}
function hide(obj) {
	document.getElementById(obj).style.display = 'none';
}
