// funzione per caricare gli swf senza blocco
function generatorflash(versione,larghezza,altezza,allineamento,nomefile,menu,coloreSfondo,traspSfondo,qualita) {

var N1;
	
	N1=('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + versione + '"WIDTH="' + larghezza + '" HEIGHT="' + altezza + '" align="' + allineamento + '">');
	N1= N1+ ('<PARAM NAME="movie" VALUE="' + nomefile + '">'); 			//Nome del file
	N1= N1+ ('<PARAM NAME="menu" VALUE=False>');						//Visibilità del menu - true (visible) - false (invisibile)
	N1= N1+ ('<PARAM NAME="bgcolor" VALUE="' + coloreSfondo + '"> ');	//Colore dello sfondo - es. #000000 (nero)
	N1= N1+ ('<PARAM NAME="wmode" VALUE="' + traspSfondo + '"> ');		//Trasparenza dello sfondo - normal (normale) - opaque (opaco) - transparent (trasparente)
	N1= N1+ ('<PARAM NAME="quality" VALUE="' + qualita + '">');			//Qualita del file - low (bassa) - medium (media) - high (alta) - best (migliore)
	N1= N1+ ('<PARAM NAME="allowScriptAccess" VALUE="sameDomain"> ');	//Sicurezza - non toccare

	N1= N1+ ('<embed src="' + nomefile + '" quality=high WIDTH="' + larghezza + '" HEIGHT="' + altezza + '" align="' + allineamento + '" bgcolor="' + coloreSfondo + '" wmode="' + traspSfondo + '" menu="' + menu + '" quality="' + qualita + '" TYPE="application/x-shockwave-flash"');
	N1= N1+ ('PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></OBJECT>')

	document.write(N1);
}

// funzione per aprile le pop up
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// funzione per gestire i rollOver sui loghi del gruppo
function hideshow(which1, which2){
if (!document.getElementById)
return
	which1.style.display="inline"
	which2.style.display="none"
}

// funzioni per impostare le coordinate e il contentuto delle sedi
function GetCoortdinate(indice,tipo,luogo) {
	var coordinata;
	
	if (tipo=="x")
	{
		if (indice==1)
			coordinata = 45.855572;

		if (indice==2)
			coordinata = 45.528636;

		if (indice==3)
			coordinata = 45.811703;

		if (indice==4)
			coordinata = 44.479177;

		if (indice==6)
			coordinata = 45.640066;

		if (indice==7)
			coordinata = 45.530214;

		if (indice==8)
			coordinata = 45.401016;

		if (indice==9)
			coordinata = 45.0559;

		/*if (indice==10)
			coordinata = 45.661982;*/

		if (indice==10)
			coordinata = 43.875393;

		if (indice==11)
			coordinata = 41.82838;

		if (indice==12)
			coordinata = 40.84322;

		if (indice==13)
			coordinata = 41.09449;

		if (indice==14)
			coordinata = 44.407864;
			
		if (indice==15)
			coordinata = 45.692485;
			
		if (luogo=="milano")
		{
			if (indice==5)
				coordinata = 45.512645;
	
			if (indice==16)
				coordinata = 45.476258;
	
			if (indice==17)
				coordinata = 45.471696;
				
			if (indice==18)
				coordinata = 45.450209;		
			
			if (indice==19)
				coordinata = 45.463453;	

			if (indice==20)
				coordinata = 45.471603;	

			if (indice==21)
				coordinata = 45.471675;	
}
		
		else
		{
			if (indice==5)
				coordinata = 45.464477;			
		}
		
	}
	
	if (tipo=="y")
	{
		if (indice==1)
			coordinata = 9.395879;

		if (indice==2)
			coordinata = 9.077191;

		if (indice==3)
			coordinata = 9.229532;

		if (indice==4)
			coordinata = 11.264827;

		if (indice==6)
			coordinata = 9.905253;

		if (indice==7)
			coordinata = 10.180604;

		if (indice==8)
			coordinata = 10.968865;

		if (indice==9)
			coordinata = 7.660;

		/*if (indice==10)
			coordinata = 8.78683;*/

		if (indice==10)
			coordinata = 11.101484;

		if (indice==11)
			coordinata = 12.496877;

		if (indice==12)
			coordinata = 14.251593;

		if (indice==13)
			coordinata = 16.862057;

		if (indice==14)
			coordinata = 8.937099;
			
		if (indice==15)
			coordinata = 9.672723;
			
		if (luogo=="milano")
		{
			if (indice==5)
				coordinata = 9.125965;
	
			if (indice==16)
				coordinata = 9.148806;
	
			if (indice==17)
				coordinata = 9.202265;

			if (indice==18)
				coordinata = 9.205355;

			if (indice==19)
				coordinata = 9.182389;

			if (indice==20)
				coordinata = 9.153723;			

			if (indice==21)
				coordinata = 9.153675;					
		}
		else
		{
			if (indice==5)
				coordinata = 9.191654;
		}
			
	}	
	
	return coordinata;
}


function GetHTML(indice,luogo) {
	var html="";
	
	if (indice==1)
	{
		html = "<b>Lecco</b><br />";
		html += "<a href='lecco1.aspx' class='linkInfoWin'>Italfinance Lecco</a>";
	}

	if (indice==2)
	{
		html = "<b>Rho (MI)</b><br />";
		html += "<a href='rho.aspx' class='linkInfoWin'>Italfinance Consulting</a>";
	}

	if (indice==3)
	{
		html = "<b>Erba (CO)</b><br />";
		html += "<a href='erba.aspx' class='linkInfoWin'>Italfinance Insurance</a>";
	}

	if (indice==4)
	{
		html = "<b>Casalecchio di Reno (Bo)</b><br />";
		html += "<a href='imola.aspx' class='linkInfoWin'>Italfinance Bologna</a>";
	}

	if (indice==6)
	{
		html = "<b>Castelli Calepio (BG)</b><br />";
		html += "<a href='bergamo.aspx' class='linkInfoWin'>GM Medioimpresa</a>";
	}

	if (indice==7)
	{
		html = "<b>Brescia</b><br />";
		html += "<a href='brescia.aspx' class='linkInfoWin'>Italfinance Brescia</a>";
	}

	if (indice==8)
	{
		html = "<b>Verona</b><br />";
		html += "<a href='verona.aspx' class='linkInfoWin'>Fin Service</a>";
	}

	if (indice==9)
	{
		html = "<b>Torino</b><br />";
		html += "<a href='torino.aspx' class='linkInfoWin'>Italfinance Torino</a>";
	}

	/*if (indice==10)
	{
		html = "<b>Gallarate (VA)</b><br />";
		html += "<a href='varese2.aspx' class='linkInfoWin'>Progetto Leasing</a>";
	}*/

	if (indice==10)
	{
		html = "<b>Prato</b><br />";
		html += "<a href='prato.aspx' class='linkInfoWin'>Italfinance Large Corporate</a>";
	}

	if (indice==11)
	{
		html = "<b>Roma</b><br />";
		html += "<a href='roma.aspx' class='linkInfoWin'>Italfinance Roma</a>";
	}

	if (indice==12)
	{
		html = "<b>Napoli</b><br />";
		html += "<a href='napoli.aspx' class='linkInfoWin'>Italfinance Napoli</a>";
	}

	if (indice==13)
	{
		html = "<b>Bari</b><br />";
		html += "<a href='bari.aspx' class='linkInfoWin'>Italfinance Puglia</a>";
	}

	if (indice==14)
	{
		html = "<b>Genova</b><br />";
		html += "<a href='genova.aspx' class='linkInfoWin'>Interbrokers</a>";
	}
	
	if (indice==15)
	{
		html = "<b>Bergamo</b><br />";
		html += "<a href='bergamo1.aspx' class='linkInfoWin'>GM Medioimpresa</a>";
	}
	
	if (luogo=="milano")
	{
		if (indice==5)
		{
			html = "<b>Milano</b><br />";
			html += "<a href='milano1.aspx' class='linkInfoWin'>Italfinance Milano</a>";
		}
	
		if (indice==16)
		{
			html = "<b>Milano</b><br />";
			html += "<a href='milano2.aspx' class='linkInfoWin'>Fin Asset</a>";
		}
	
		if (indice==17)
		{
			html = "<b>Milano</b><br />";
			html += "<a href='milano3.aspx' class='linkInfoWin'>Studio ADR</a>";
		}
	
		if (indice==18)
		{
			html = "<b>Milano</b><br />";
			html += "<a href='milano4.aspx' class='linkInfoWin'>Soluzioni Finanziarie</a>";
		}

		if (indice==19)
		{
			html = "<b>Milano</b><br />";
			html += "<a href='milano5.aspx' class='linkInfoWin'>Italfinance Advisory</a>";
		}
		if (indice==20)
		{
			html = "<b>Milano</b><br />";
			html += "<a href='milano6.aspx' class='linkInfoWin'>Italfinance IMPRESA</a>";
		}
		if (indice==21)
		{
			html = "<b>Milano</b><br />";
			html += "<a href='milano7.aspx' class='linkInfoWin'>Italfinance Impresa</a>";
		}
	}
	else
	{
		if (indice==5)
		{
			html = "<b>Milano</b><br />";
			html += "<a href='milano1.aspx' class='linkInfoWin'>Italfinance Milano</a><br />";
			html += "<a href='milano2.aspx' class='linkInfoWin'>Fin Asset</a><br />";
			html += "<a href='milano3.aspx' class='linkInfoWin'>Studio ADR</a><br />";
			html += "<a href='milano4.aspx' class='linkInfoWin'>Soluzioni Finanziarie</a><br />";
			html += "<a href='milano5.aspx' class='linkInfoWin'>Italfinance Advisory</a><br />";
			html += "<a href='milano6.aspx' class='linkInfoWin'>Italfinance ENERGY</a><br />";
			html += "<a href='milano7.aspx' class='linkInfoWin'>Italfinance Impresa</a><br />";			
		}
	}
	
	return html;
}
