// JavaScript Document

function getElement(id) {
	var ele = null;

	if ( document.getElementById ) {
		ele = document.getElementById(id);
	} else if ( document.all ) {
		ele = document.all[id];
	} else if ( document.layers ) {
		ele = document.layers[id];
	}

	return ele;
}

tmpBox = 0;
function showBox(box) {
	ele = getElement(box);
	ele.style.display = "block";
	tmpBox = 1;
}

function hideBox(box) {
	setTimeout('doHideBox(\''+box+'\')', 2000);	
	tmpBox = 0;
}
function doHideBox(box) {
	if(tmpBox == 0) getElement(box).style.display = "none";	
}


function switchTxt(container, content) {
		for(i=1; i<=3; i++) {
			getElement("an"+i).style.backgroundPosition = "top left";
		}
	getElement("a"+content).style.backgroundPosition = "bottom left";
	getElement(container).innerHTML = getElement(content).innerHTML;
}
