
function openPopup( aUrl, aWidth, aHeight) {
	
	theFeatures = 'location=no,status=no,menubar=no,resizable=yes,scrollbars=yes,toolbar=no,width=' + aWidth + ',height=' + aHeight + ',left=' + ( screen.width / 2 - aWidth / 2 ) + ',top=' + ( screen.height / 2 - aHeight / 2 )
	var aWin = window.open( aUrl, 'map', theFeatures )
	if ( aWin ) {
		aWin.focus()
	}
}

var subnav_on;
var subnav_timeout

function showSubnav( aName ) {
	if ( subnav_on != aName ) {
		hideSubnavNow()
		clearTimeout( subnav_timeout )
	    new Effect.SlideDown( aName, {duration: 0.2})
		subnav_on = aName
	} else {
		clearTimeout( subnav_timeout )
	}
}

function hideSubnav() {
	subnav_timeout = setTimeout( 'hideSubnavNow()', 1000 )
}

function hideSubnavNow() {
	if ( subnav_on ) {
		clearTimeout( subnav_timeout )
	    new Effect.SlideUp( subnav_on, {duration: 0.2} )
		subnav_on = null
	}
}

