

		var tipo = location.search.substring(1,2);
		if (! /[BS]/.test(tipo)) tipo = 'B'; //allowed: "B" or "S"
		
		var numero = location.search.substring(2,4);
		if (! /[0-9]{2}/.test(numero)) numero = '00'; //allowed "00" to "99", default ""
		
		var news = location.search.substring(5,7);
		if (! /[0-9]{2}/.test(news)) news = ''; //allowed "00" to "99" or "", default ""
		
		var lingua = location.pathname.split('/')[1]; // split /it/media/newsletter in ["", "it", "media", "newsletter"] and take the second one.
		if (! /(it|en-en)/.test(lingua)) lingua = 'it'; //allowed "it" or "en-en", default "it"
		
		var url = 'http://www.studiofabrica.com/btc2010/newsletter/' + tipo + numero + lingua;
		
		var intConta = location.search.substring(8,30);
		
		if (news == '')
		{
			url += '/main';
		}
		else
		{
			url += '/news' + news;
		}

	url += '.php?intConta=' + intConta;
	
	
	if (numero == '00')
	{
		if (lingua == 'it')
		{
			var elenco = '<img src="http://www.studiofabrica.com/btc2010/newsletter/img/nltitle.png" /><br><br>';
			    elenco += '<div style="border: 1px solid #D9E2E5; font-size:15px; background: #E1EAEE; padding: 10px;">';
			    
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/it/media/newsletter?B08"><!-- BTCFreshNews - -->10 Giugno 2010 - BTCFreshNews: Dinner party in spiaggia per unire gli opposti.</a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/it/media/newsletter?B07"><!-- BTCFreshNews - -->18 Maggio 2010 - I corporate planner parlano di eventi e marketing a BTC 2010.</a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/it/media/newsletter?B06"><!-- BTCFreshNews - -->6 Maggio 2010 - Perch&eacute; i grandi buyer vengono in BTC.</a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/it/media/newsletter?B05"><!-- BTCFreshNews - -->15 Aprile 2010 - PCO, alberghi e aeroporto, lavoro di squadra per BTC 2010.</a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/it/media/newsletter?B04"><!-- BTCFreshNews - -->24 Marzo 2010 - BTC 2010 a Fiera di Rimini, bene i roadshow di Caserta e Milano</a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/it/media/newsletter?B03"><!-- BTCFreshNews - -->5 Marzo 2010 - Parte il roadshow di presentazione BTC 2010    </a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/it/media/newsletter?B02"><!-- BTCFreshNews - -->18 Febbraio 2010 - Arrivano i VIP Buyer </a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://www.studiofabrica.it/btc2009/newsletter/b/b21/ita/b21.php" target="_blank"><!-- BTCFreshNews - -->28 Gennaio 2010  - Nuova data e nuova sede per BTC  </a><br>';
			    elenco += '</div>'
			    ;
		}
		else
		{
			var elenco = '<img src="http://www.studiofabrica.com/btc2010/newsletter/img/nltitle.png" /><br><br>';
			    elenco += '<div style="border: 1px solid #D9E2E5; font-size:15px; background: #E1EAEE; padding: 10px;">';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/en-en/media/newsletter?B08"><!-- BTCFreshNews - -->15 June 2010  - Dinner party on the beach to bring opposites together</a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/en-en/media/newsletter?B07"><!-- BTCFreshNews - -->19 May 2010  - Corporate planners to unveil event and marketing strategies at BTC 2010</a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/en-en/media/newsletter?B06"><!-- BTCFreshNews - -->10 May 2010  - San Marino hosts BTC welcome dinner</a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/en-en/media/newsletter?B05"><!-- BTCFreshNews - -->19 April 2010  - Handling agency, hotels and airport work as a team for BTC 2010 </a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/en-en/media/newsletter?B04"><!-- BTCFreshNews - -->26 March 2010  - BTC 2010 at the Fiera di Rimini expo centre </a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://btc.it/en-en/media/newsletter?B02"><!-- BTCFreshNews - -->22 February 2010 - VIP buyers to Rimini </a><br>';
			    elenco += '<a style="color: #F00; line-height:2em;" href="http://www.studiofabrica.it/btc2009/newsletter/b/b21/eng/b21.php" target="_blank"><!-- BTCFreshNews - -->28 January 2010 - New date and venue for BTC   </a><br>';
			    elenco += '</div>'
			    ;
		}
		   
		document.write(elenco);
	}
	else
	{
		document.write('<iframe src="' + url + '" width="477" height="1500" scrolling="no" FRAMEBORDER="0"></iframe>');		
	}
	

