function newWin(url, w, h, other) {
	leftpos = (screen.width - w)/2;
	toppos = (screen.height - h)/2;
	win = window.open(url, "popup", 'width=' + w + ',height=' + h + ',left=' + leftpos + ',top=' + toppos + ',' + other);
	win.focus();
	return false;
}

var popup = null;
function openFrame(url) {
	if (popup && !popup.closed && popup.location) {
		popup.location.href = url;
	} else {
		popup = positionWin(url);
	}
	if (window.focus) {
		popup.focus();
	}
	return false;
}
function positionWin(url) {
	// screen position
	var pos = findPos(document.getElementById('spacer'));
	var left = pos[0];
	var top = pos[1];

	// positioning
	if (document.all) {		// browser is IE
		if (left != 0) {
			left = window.screenLeft + left;
			top = window.screenTop + top;
		}
	} else {		//browser is not IE
		left = window.screenX + left;
		top = window.screenY + 360;
	}

	var width = 780;
	var height = 500;
	if (document.all) {		// browser is IE
		height = window.document.body.clientHeight - 280;
	} else {
		height = window.document.body.clientHeight - 300;
	}
	
	window.location.href='#top';
	return window.open(url, 'mail', 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',screenX=' + left + ',screenY=' + top + ',scrollbars=yes,status=no,resizable=yes');
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function eventListMouseOver(id) {
	document.getElementById(id).style.backgroundColor='#4C4C4C';
	document.getElementById(id).style.color='#FFFFFF';
	document.getElementById(id + 'a').style.backgroundColor='#EFEFEF';
}

function eventListMouseOut(id) {
	document.getElementById(id).style.backgroundColor='';
	document.getElementById(id).style.color='';
	document.getElementById(id + 'a').style.backgroundColor='';
}