function _showWindow ( url ) {
	newWindow = window.open( url );
	newWindow.focus();
}

function _msie_replace_png_imgs() {
	var i, elements;

	elements = document.getElementsByTagName( "img" );
	for ( i = 0; i < elements.length; i++ ) {
		var img = elements[i];
		if ( img.src.toLowerCase().search(/\.png$/ ) < 0 ) continue;

		img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src	+ "', sizingMethod='image')";
		img.src = "img/spacer.gif";
	}
}

if ( window.attachEvent && navigator.appName == "Microsoft Internet Explorer" ) window.attachEvent ( "onload", _msie_replace_png_imgs );

var showState = true;

function _showIt ( text ) {
	showState = true;
	document.getElementById( 'definitionMiddle' ).innerHTML = "<p>" + decodeURI( text ) + "</p>";
	document.onmouseover = _sustain;
}

function _sustain ( Event ) {
	if ( showState ) {
		showState = false;
		if ( navigator.appName == "Netscape" || navigator.appName == "Opera" ) {
			windowWidth = window.innerWidth;
			horzPosition = Event.pageX;
			vertPosition = Event.pageY;
		} else if ( document.documentElement.clientWidth ) {
			windowWidth = document.documentElement.clientWidth;
			horzPosition = event.x;
			vertPosition = document.documentElement.scrollTop + event.y;
		}
		d = document.getElementById( 'definition' ).style;
		d.left = ( horzPosition < ( windowWidth / 2 )) ? ( horzPosition + 12 ) + "px" : ( horzPosition - 200 - 12 ) + "px" ;
		d.top = ( vertPosition + 10 ) + "px";
		d.visibility = "visible";
	}
}

function _hideIt () {
	document.getElementById( 'definition' ).style.visibility = "hidden";
}

