function popupPage(page) {
	windowprops = "height=250,width=275,location=no," + "scrollbars=yes,menubars=no,toolbars=no,resizable=yes";
	window.open(page, "Popup", windowprops);
}

function doPopup(page,height,width) {
	windowprops = "height=" + height + ",width=" + width + ",location=no," + "scrollbars=yes,menubars=no,toolbars=no,resizable=yes,status=no,directories=no";
	window.open(page, 'page', windowprops);
}

/*
function placeFocus() {
	if(document.login.username && document.login.username.value.length == 0) document.login.username.focus();
	else if(document.login.password) document.login.password.focus();
}
*/
function addEvent(obj, evType, fn)
{
	if (obj.addEventListener) {
		obj.addEventListener(evType, fn, false);
		return true;
	}
	if (obj.attachEvent) {
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	}
	return false;
}

function setActiveTab(id) {
	var el = document.getElementById(id).getElementsByTagName('A')[0];
	if(el) el.className='selected';
	return true;
}