var lastSel = 1;
var lastSel2 = 1;

function mostraitem(id){
	var div_valor = document.getElementById("valor_"+id);
	var tempo = document.getElementById("tempo_"+id);
	var div_matricula = document.getElementById("matricula_"+id);
	
	if(lastSel!=undefined && lastSel!=id){
		document.getElementById("valor_"+lastSel).style.display='none';
		document.getElementById("tempo_"+lastSel).className='';
		document.getElementById("matricula_"+lastSel).style.display='none';
		
	}
	div_valor.style.display =  "block";
	tempo.className =  "on";
	div_matricula.style.display =  "block";
	lastSel = id;
}

function mostraitem2(id){
	var div_valor2 = document.getElementById("valor2_"+id);
	var tempo2 = document.getElementById("tempo2_"+id);
	var div_matricula2 = document.getElementById("matricula2_"+id);
	
	if(lastSel2!=undefined && lastSel2!=id){
		document.getElementById("valor2_"+lastSel2).style.display='none';
		document.getElementById("tempo2_"+lastSel2).className='';
		document.getElementById("matricula2_"+lastSel2).style.display='none';
		
	}
	div_valor2.style.display =  "block";
	tempo2.className =  "on";
	div_matricula2.style.display =  "block";
	lastSel2 = id;
}

function popUpWindow(URLStr, popName, width, height, p_scroll, left, top)
{
  if(p_scroll=="yes") p_scroll="yes";
  else p_scroll="no";
  vpopName =popName;
  if(!left) left=(screen.availWidth-width)/2;
  if(!top) top=(screen.availHeight-height)/2;
  vpopName = window.open(URLStr, popName, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+p_scroll+',resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function enviar(el){
	var frm = document.form;
	if (document.getElementById(el).value != undefined && document.getElementById(el).value != ""){
		link = document.getElementById(el).value;
		window.open(link);
	}
	//popUpWindow(link,'curso',796,577);
}
