

function ifyesgoto( msg,goto_url )
{

	if (confirm( msg ))
		{
		location.href= goto_url;
		}
} 



function new_window( theURL,WindowName,toolbar )
{
var qwe;
// scrollbars=yes
	if (toolbar)
		qwe = window.open( theURL,'x','scrollbars=yes,Toolbar=yes,Menubar=yes,resizable=yes,top=50,left=50,width=400,height=300');
	else
		qwe = window.open( theURL,'t',',scrollbars=yes,Toolbar=no,resizable=yes,top=50,left=50,width=400,height=300');
}


function forum_new_window( theURL,WindowName,toolbar )
{
var qaz;
// scrollbars=yes
	if (toolbar)
		qaz = window.open( theURL,'xx','scrollbars=yes,Toolbar=yes,Menubar=yes,resizable=yes,top=50,left=50,width=680,height=500');
	else
		qaz = window.open( theURL,'tt',',scrollbars=yes,Toolbar=no,resizable=yes,top=50,left=50,width=680,height=500');
}


function upload_new_window( theURL )
{
var qqq;

// scrollbars=yes
	qqq = window.open( theURL,'z','scrollbars=yes,Toolbar=no,Menubar=no,resizable=no,top=50,left=50,width=430,height=250');
}


function goto( theURL )
{

	self.navigate( theURL );
}


function recuar( n ) 
{
	if(navigator.appName=='Netscape')
	{
		for(i=1;i<=n;i++)
			back( );
	}
	else
	{
		for(i=1;i<=n;i++)
			history.back( );
	}
}


function fechar()
{
	self.close();
}

function fechar_janela()
{
	document.write("<a href='javascript:fechar()'><b>Fechar Janela</b></a>");
}


function obrigado_pelo_trabalho( autor_id )
{
	url="/portal/pt/autores/autor.asp?id="+autor_id
	
	document.write("<table height='100%' width='780' cellspacing='0' cellpadding='0' border='0'>")
	document.write("<tr><td align='center' height='60%'>")
	document.write("<font size='+1' face='Arial'>Obrigado, o seu trabalho foi guardado!</font><br><br>")
	document.write("<font face='Arial'>Brevemente o seu trabalho será validado pelos nossos serviços.")
	document.write("<br><br><br><br>")
//	document.write("<input type='Button' name='sair' value='Volta à Página Principal' onclick=javascript:goto('/portal/pt/info.asp')>")	
//	document.write("<input type='Button' name='sair' value='Voltar' onclick=javascript:goto( '" + url + "' )>")
//	document.write("<input type='Button' name='sair' value='Voltar' onclick=javascript:goto( '/portal/pt/autores/autor.asp?id=64' )>")
	document.write("<a href='" + url + "'><b>Voltar</b></a>")
	document.write("</td></tr>")
	document.write("<tr><td height='40%'>")
	document.write("&nbsp;")
	document.write("</td></tr>")
	document.write("</table>")
	
}

function autor_envio_password( nome )
{
	document.write("<table height='100%' width='780' cellspacing='0' cellpadding='0' border='0'>")
	document.write("<tr><td align='center' height='60%'>")
	document.write("<font size='+1' face='Arial'>Bem vindo " + nome +"!</font><br><br>")
	document.write("<font face='Arial'>A sua password ser&aacute; enviada para a sua conta de e-mail.")
	document.write("<br><br><br><br>")	
	document.write("<input type='Button' name='sair' value='Volta à Página Principal' onclick=javascript:goto('/portal/pt/info.asp')>")		
	document.write("</td></tr>")
	document.write("<tr><td height='40%'>")	
	document.write("&nbsp;")	
	document.write("</td></tr>")	
	document.write("</table>")
	
}


function teste_url( theURL )
{
	new_window( theURL,"Teste URL",false )
}

