var showObj, showMenuObj;
var flag=false;

function showMenu(obj, menu){

	
	showMenuObj = document.getElementById(menu);
	showObj = obj;
	

	if (showMenuObj.style.display == 'block'){
		showMenuObj.style.display = 'none';
		showObj.className = showObj.className.replace(' select', '');
		showObj = null;
		showMenuObj = null;
		flag = setFlag(false);
	}else{
		
		showObj.className += ' select';
		showMenuObj.style.display = 'block';
		window.setTimeout('setFlag(true)', 500);
		
	}
	
	return false;
	
}

function setFlag(value){
	flag = value;	
}

function menuOver(obj, menu){
	if(showObj){
		showMenuObj.style.display = 'none';
		showObj.className = showObj.className.replace(' select', '');
		showObj = null;
		showMenuObj = null;
		showMenuObj = document.getElementById(menu);
		showObj = obj;
		showMenuObj.style.display = 'block';
		showObj.className += ' select';
	}
}

function hideMenu(){
	if(flag){
		showMenuObj.style.display = 'none';
		showObj.className = showObj.className.replace(' select', '');
		showObj = null;
		showMenuObj = null;
		flag = setFlag(false);
	}
}

function changeFoto(obj){
	document.getElementById('img-large').src = obj.href;
	return false;
}

function changeText(obj)
{
var n = obj.id.substring(1);
var divs = document.getElementsByTagName("div");
for (i = 0; i < divs.length; i++)
{
var el = divs[i];
if (el.id.substring(0, 4) == 'text')

{ if (el.id.substring(4) == n) el.style.display = "block"; else el.style.display = "none"; } 
}
}


function wopen(url){
	window.open(url	, '_blank','resizable=yes');
	return false;	
}

var currTbl, currLink;
function getTbl(id, oLink){
	if(currLink)
		currLink.className = 'none';
		
	if (currTbl)
		currTbl.style.display = 'none';
		
	currTbl = document.getElementById(id);
	currTbl.style.display = 'block';
	currLink = oLink;
	currLink.className = 'active';
}


