	nris_pagina=10;
	var num_rows=0; //Aggiunta variabili MDe Santis 15102007
	var num_rows_old=0;
	var num_pag=0;
  var lista_check= new Array(num_rows); 
  var lista_attrattori= new Array(num_rows);
  var tem="";
  var extent_tlx=0, extent_tly=0, extent_brx=0, extent_bry=0;
	var tot_risultati; //End aggiunta

	function mostra_item(tematismo,longitudine,latitudine,richieste){
		if (document.getElementById("tem"+tematismo)){
			for (var k=0;k<document.images.length;k++){
			 document.images[k].border=0
			}
			 document.getElementById("tem"+tematismo).border=1
		}
		document.getElementById("item_gen").src="item_gen_stored.asp?tematismo="+tematismo+""+richieste+"&longitudine="+longitudine+"&latitudine="+latitudine+"&n_pagina=0"
  	document.getElementById("item_gen").style.height=50
   if (window.parent.document.getElementById("geo"))
  		window.parent.document.getElementById("geo").style.height=50

			//window.parent.document.getElementById("geo").offsetHeight
			
  		document.getElementById("item_gen").style.visibility="visible"
  }
  
  function zoom_marker(x,y){
				window.parent.layer.setCenter(new OpenLayers.LonLat(parseFloat(x), parseFloat(y)),10)
		}
	
	function change_pagina(pagina){
				
			  index=(location.href).indexOf("n_pagina=")
			  act_npag=pagina
			  new_location=(location.href).substring(0,index)
				location.href=new_location+"n_pagina="+(pagina)
		
	}
function pagine_box(pagina){
	      
	      campiChec(); //MDe Santis 12/10/2007
       	
       	index=(document.getElementById("Ricerca").src).indexOf("n_pagina=")
       	
       	
     
			  if (pagina==-2) pagina=Math.round(act_npag)-1
			  else if (pagina==-1) pagina=Math.round(act_npag)+1
		    act_npag=pagina
		    
			  new_location=(document.getElementById("Ricerca").src).substring(0,index)
				document.getElementById("Ricerca").src=new_location+"n_pagina="+(pagina)
   			//prompt("",document.getElementById("Ricerca").src)
   			
   			//MDe Santis 15/10/2007 ricarimento di eventuali campi già spuntati
   			/*if (document.getElementById("submit").style.display == "inline") {
   			
   				inf=act_npag*10;
					sup=inf+9;
					if (sup > (parent.document.tot_risultati-1)) sup=(parent.document.tot_risultati-1);	
	   				for (i=inf; i <= sup; i++) {
	   					
							if (parent.document.lista_check[i] == 1) {
							
							parent.document.getElementById("Ricerca").contentWindow.document.getElementById("attrattore_"+(i+1)).document.getElementById("id_attra_"+(i+1)).checked=true;
							}
						}
   			} */
   			//End 
   			//alert();
    	
	}	
function count_pagina(pagina,n_record){
		lista_pagine=""
		lista_ris=0
		parent.document.getElementById("lista_pagine").innerHTML=""
		
		parent.document.tot_risultati=n_record
		n_risultati=n_record/nris_pagina
		var val_init=Math.round(pagina/10)
		if (pagina>=9) val_init=Math.ceil(pagina-5);
		
		if (n_risultati>1){
			 	for (var i=Math.round(val_init);i<=(n_record/nris_pagina) && i<(Math.round(val_init+10)) ;i++) {
			 		lista_pagine+="<a href='#'  onclick='pagine_box("+Math.round(i)+")'><font "
			 		if (i==pagina){
			 			lista_pagine+="color='#00FFFF' size='6'>"
			 		}else lista_pagine+="color='#FFFFFF' size='4'>"
			 		lista_pagine+=Math.round(i+1)+"</font></a>&nbsp;"
				}
				lista_ris=i
		}
		parent.document.getElementById("lista_pagine").innerHTML=lista_pagine
		//setto l'ampiezza della colonna in base al numero dei risultati
		parent.document.getElementById("lista_pagine").style.width=(lista_ris)*3
		parent.document.getElementById("lista_pagine").style.display="inline"
    
    if (pagina>0 && pagina<((n_record)/nris_pagina)-1){
    		
      	parent.document.getElementById("precedenti").style.display="inline"
      	parent.document.getElementById("successivi").style.display="inline"
    	}else{
    		 if (pagina==0 && n_record>nris_pagina){
    		 				parent.document.getElementById("successivi").style.display="inline"
    						parent.document.getElementById("precedenti").style.display="none"
    		  	}else{
    		  		if (pagina==0) {
    		  				parent.document.getElementById("successivi").style.display="none"
    							parent.document.getElementById("precedenti").style.display="none"
    		  		}else
		    		  		{
		    		  			parent.document.getElementById("precedenti").style.display="inline"
		    		  		parent.document.getElementById("successivi").style.display="none"
		    		  	}  
		    		 }
    		 } 
}
function resize(nrisultati){
    
			if (nrisultati<=5) {
				// new_dim=Math.round(80+nrisultati*20)
				 new_dim=parent.document.getElementById("item_gen").contentWindow.document.all.content.offsetHeight
			}
			else
			{
				new_dim=Math.round(120)
			}
			//alert(window.document.body.clientHeight)
			
			//parent.document.getElementById("item_gen").style.height=new_dim-50
			//top.parent.document.getElementById("geo").style.height=Math.round(new_dim-20)
			parent.document.getElementById("item_gen").style.height=new_dim
			
		
			top.parent.document.getElementById("geo").style.height=parseInt(parent.document.getElementById("elenco_t").offsetHeight)
		
			altezza=Math.round(parseInt(top.parent.document.getElementById("geo").style.height)+80)
		 
			window.parent.layer.popups[0].setSize(new OpenLayers.Size(230,altezza))
		
	}
	
	function find_Marker(xgen,ygen,geoblog){
			if (geoblog=="geoblog") id_layer_marker=window.parent.map.getLayerIndex(window.parent.layer_blog)
			else id_layer_marker=0
			if (window.parent.map.layers[id_layer_marker].markers){
						for (var i=0;i<window.parent.map.layers[id_layer_marker].markers.length;i++){
											valori_gen=window.parent.map.layers[id_layer_marker].markers[i].generalize
										
										  longitudine=(valori_gen.split("$"))[1]	
										  	
																			  latitudine=(valori_gen.split("$"))[0]										  
																				if (xgen==longitudine && ygen==latitudine){
																				 	return i
																				 	
																				}
																			}
					}
	}
	
	
	color="Blu"
	function onoff_Marker(xgen,ygen,stato,nriga,temat,geoblog){
		id_marker=find_Marker(xgen,ygen,geoblog)
			
		/*	if (temat<11 || temat==18) color="Rossa";
			else if (temat>=11 && temat<17) color="Blu";
					else color="Giallo"*/
			if (temat<11 || temat==18) color="#94162E";
			else if (temat>=11 && temat<17 || temat==28) color="#405D95";
					else color="#E4AC10"
		if (stato==1) {
			document.getElementById(""+nriga+"").className="testoBianco"
		//	document.getElementById(""+nriga+"").style.backgroundImage="url(../PK_layout/img/SfondoCella"+color+".gif)"
			document.getElementById(""+nriga+"").style.backgroundColor=color
			
		}else{
			 document.getElementById(""+nriga+"").style.backgroundImage=""
			 document.getElementById(""+nriga+"").className="testoGrigio"
			 document.getElementById(""+nriga+"").style.backgroundColor="#FFFFFF"
		}
		  resize_marker(id_marker,stato,geoblog)
	}
	
	function onoff_itin(stato,nriga){
		
			
		 color="Rossa";
			
		
		if (stato==1) {
			document.getElementById(""+nriga+"").className="testoBianco"
			document.getElementById(""+nriga+"").style.backgroundImage="url(../PK_layout/img/SfondoCella"+color+".gif)"
			
		}else{
			 document.getElementById(""+nriga+"").style.backgroundImage=""
			 document.getElementById(""+nriga+"").className="testoGrigio"
		}
		 
	}
		function resize_marker(id_marker,stato,geoblog){
		
			if (!isNaN(id_marker)){
			 	if (geoblog=="geoblog") id_layer_marker=window.parent.map.getLayerIndex(window.parent.layer_blog)
				else id_layer_marker=0
					
					if (window.parent.map.layers[id_layer_marker].markers){
						if (window.parent.map.layers[id_layer_marker].markers.length!=0){
					 		icon=window.parent.map.layers[id_layer_marker].markers[id_marker].icon
					 		
					 		if ((icon.size.w)<21){
					 				dimension_iconw=26
					 				dimension_iconh=29
					 		}else{
					 				dimension_iconw=icon.size.w
					 				dimension_iconh=icon.size.h
					 		}
					 		size = new OpenLayers.Size(dimension_iconw + 10*stato, dimension_iconh + 10*stato);
		       		icon.setSize(size);
		       	}  
        }
       }
		}
	
		
		function marker_box(xgen,ygen){
			 // alert(lon=window.parent.map.layers[0].markers[0].lon)
				for (var i=0;i<window.parent.map.layers[0].markers.length;i++){
					lon=window.parent.map.layers[0].markers[i].lonlat
					
					
				}
		}
		
		
	function zoom_marker2(x,y){

				window.parent.map.setCenter(new OpenLayers.LonLat(parseFloat(x), parseFloat(y)),10)
		}


function create_scheda(id,type,lingua,tematismo){
if (id && id!="undefined" && id!=0){

	  if (type=="co") type="at";
	  window.top.parent.document.getElementById("BoxRisultatiRidottaScheda").style.display="none"
		window.top.parent.document.getElementById("Scheda").src="georss/scheda.asp?tem="+tematismo+"&id="+id+"&lingua="+lingua+"&type="+type
		window.top.parent.document.getElementById("BoxRicercaScheda").style.display="inline"
}
}
function tipologia_poi(m){
	
	if (document.getElementById("scegli_tipo_"+m).style.display=="none"){
		document.getElementById("scegli_tipo_"+m).style.display=""
	}else
	document.getElementById("scegli_tipo_"+m).style.display="none"
		
}

function add_poi_itin(m,X,Y,controlla,id,type_p,tematismo,x_utm,y_utm,titlepoi){
	window.parent.mostra_itinerario();
	id_marker=find_Marker(x_utm,y_utm)   

	icon=window.parent.map.layers[0].markers[id_marker].icon 

	if (navigator.appName.contains("Microsoft")) icon.setOpacity(1)
	
	if (document.getElementById("tipo_poi1_"+m).checked){
		//icon.setBorder("2px solid green","green");  
		addPartenza(X,Y,controlla,id,type_p,tematismo,titlepoi,id_marker)
		
	}else if (document.getElementById("tipo_poi2_"+m).checked){
			//	icon.setBorder("2px solid red","red");  
				addArrivo(X,Y,controlla,id,type_p,tematismo,titlepoi,id_marker)
				
		 }else if (document.getElementById("tipo_poi3_"+m).checked){
		 		// icon.setBorder("2px solid #800080","#800080"); 
		 		
		 		 obj_route=parent.document.getElementById("menu_route").contentWindow

					if (obj_route.document.getElementById("avanzate").style.display=="none"){
							parent.document.getElementById("MenuRouting2").style.height=(parent.map.getSize()).h-10
							parent.document.getElementById("row_route").style.height=(parent.map.getSize()).h-10
					  if (navigator.userAgent.indexOf("MSIE") >= 0) 
					  	obj_route.document.getElementById("avanzate").style.display="inline";
					  else
					   obj_route.document.getElementById("avanzate").style.display="table-row";
					   
					   obj_route.document.getElementById("f_avanzate").src="../PK_layout/img/FrecciaGiuTrasp.gif"
					}
			   addPassaggio_poi(X,Y,controlla,id,type_p,tematismo,titlepoi,id_marker);
			    
		}
	    
}

function nascondi_poi_itin(m){
	
		document.getElementById("scegli_tipo_"+m).style.display="none"
	
}
function remove_Passaggio_POI(indicepoi){
			count=0;
      if (window.parent.map.layers[0].markers){
					for (var k=0;k<window.top.parent.RTStopsCount;k++){
						if (window.top.parent.RTStopIdMarker[k]==window.top.parent.RTStopIdMarker[indicepoi])
							count=count+1	;
					}
		
					if (count==1){
						//Mc
						if (window.top.parent.RTStopIdMarker.length>indicepoi){
							icon=window.parent.map.layers[0].markers[window.top.parent.RTStopIdMarker[indicepoi]].icon;
							icon.setBorder("0px solid #FFFFFF","transparent");  
						}
					}
			}
}
function addPassaggio_poi(X,Y,controlla,id,type_p,tematismo,titlepoi,idmarker){
	if (controlla){
		window.top.parent.typeReverseGeocodingForRouting = "PS";
		window.top.parent.controllaPuntoRouting(X,Y);		
		//MC 02/10/07
		window.top.parent.RTStopIdMarker[window.top.parent.RTStopsCount] = idmarker;
		window.top.parent.RTStopIdPoi[window.top.parent.RTStopsCount] = id;
		window.top.parent.RTStopTypePoi[window.top.parent.RTStopsCount] = type_p;
		window.top.parent.RTStopTematismoPoi[window.top.parent.RTStopsCount] = tematismo;
		window.top.parent.RTStopTitlePoi[window.top.parent.RTStopsCount] = titlepoi;
		
		//end MC	
	}
}


function addArrivo(X,Y,controlla,id,type_p,tematismo,titlepoi,idmarker){	
		remove_Arrivo_POI(idmarker);
		window.top.parent.typeReverseGeocodingForRouting = "A";

		window.top.parent.controllaPuntoRouting(X,Y);
		//MC 02/10/07
		window.top.parent.RTArrivoIdPoi= id;
		window.top.parent.RTArrivoTypePoi = type_p;
		window.top.parent.RTArrivoTematismoPoi= tematismo;
		window.top.parent.RTArrivoTitlePoi= titlepoi;
					
		window.top.parent.RTArrivoIdMarker=idmarker	
		//end MC
}
function remove_Arrivo_POI(idmarker){
			
	    if (window.parent.map.layers[0].markers){
	    		window.top.parent.RTArrivoIdPoi= 0;
					window.top.parent.RTArrivoTypePoi = "";
					window.top.parent.RTArrivoTematismoPoi= "";
					window.top.parent.RTArrivoTitlePoi= "";
	    //if (window.parent.map.getLayerIndex(Icona_A)!=-1){
			//	icon=window.parent.map.layers[window.parent.map.getLayerIndex(Icona_A)].markers[window.top.parent.RTArrivoIdMarker].icon;
			//	icon.setBorder("0px solid #800080","transparent");  
				window.top.parent.RTArrivoIdMarker="";
			//}
	}
}

function remove_Partenza_POI(idmarker){
	if (window.parent.map.layers[0].markers){
				window.top.parent.RTPartenzaIdPoi= 0;
				window.top.parent.RTPartenzaTypePoi = "";
				window.top.parent.RTPartenzaTematismoPoi = "";
				window.top.parent.RTPartenzaTitlePoi= "";
	//	if (idmarker!=window.top.parent.RTPartenzaIdMarker) {
	  //if (window.top.parent.RTPartenzaIdMarker!=""){
		//		icon=window.parent.map.layers[0].markers[window.top.parent.RTPartenzaIdMarker].icon;
		//		icon.setBorder("0px solid #800080","transparent"); 
		//}
				window.top.parent.RTPartenzaIdMarker="";	 
	}
	
}
function addPartenza(X,Y,controlla,id,type_p,tematismo,titlepoi,idmarker){	
				remove_Partenza_POI(idmarker)
		
				window.top.parent.typeReverseGeocodingForRouting = "P";

				window.top.parent.controllaPuntoRouting(X,Y);
				//MC 02/10/07
				window.top.parent.RTPartenzaIdPoi= id;
				window.top.parent.RTPartenzaTypePoi = type_p;
				window.top.parent.RTPartenzaTematismoPoi = tematismo;
				window.top.parent.RTPartenzaTitlePoi= titlepoi;
				//end MC
				window.top.parent.RTPartenzaIdMarker=idmarker			
	
}


//12/10/2007	MDe Santis salvo gli elementi già selezionati
function update_array(npag,record) {
	num_pag=npag;
	parent.document.num_rows = record;
	
	//if (parent.document.num_rows != num_rows_old
	
	if (record != parent.document.num_rows_old) {
		//alert(num_pag);
		parent.document.lista_check= new Array(parent.document.tot_risultati);
		parent.document.lista_attrattori= new Array(parent.document.tot_risultati);
	}
	parent.document.num_rows_old=parent.document.tot_risultati;
	//alert(num_rows+","+num_pag);
	
}

function campiChec(){
	if (document.getElementById("submit").style.display == "inline") {
	
	//tot_npag=document.getElementById("Ricerca").contentWindow.document.getElementById("numrecord").value	
	inf=act_npag*10+1;
	sup=inf+9;
	if (sup > parent.document.tot_risultati) sup=parent.document.tot_risultati;
	//alert();
	for (i=inf; i <= sup; i++) {
		
		if (parent.document.getElementById("BoxRicerca").ownerDocument.getElementById("Ricerca").contentWindow.document.getElementById("attrattore_"+i)) {
			if (parent.document.getElementById("BoxRicerca").ownerDocument.getElementById("Ricerca").contentWindow.document.getElementById("attrattore_"+i).ownerDocument.getElementById("id_attra_"+i).checked) {
				parent.document.lista_check[i-1] = 1;
				parent.document.lista_attrattori[i-1] = parent.document.getElementById("BoxRicerca").ownerDocument.getElementById("Ricerca").contentWindow.document.getElementById("attrattore_"+i).ownerDocument.getElementById("id_attra_"+i).value;
			} else if (parent.document.lista_check[i-1] == 1) {
				parent.document.lista_check[i-1] = 0;
				parent.document.lista_attrattori[i-1] = "";
			}
		}
	}
	
	}
	//alert(parent.document.tot_risultati+","+act_npag);
	
}

function load_check(act_npag) {
	
	if (parent.document.getElementById("submit").style.display == "inline" && parent.document.lista_check.length != 0) {
   				
   				inf=act_npag*10;
					sup=inf+9;
					//alert();
					if (sup > (parent.document.tot_risultati-1)) sup=(parent.document.tot_risultati-1);	
	   				for (i=inf; i <= sup; i++) {
	   					
							if (parent.document.lista_check[i] == 1) {
							
							parent.document.getElementById("BoxRicerca").ownerDocument.getElementById("Ricerca").contentWindow.document.getElementById("attrattore_"+(i+1)).ownerDocument.getElementById("id_attra_"+(i+1)).checked=true;
							}
						}
   			}
	
	
}

function attiva_div() {
	
	var tematismi="";
	var attrattori="";
	
	
	document.getElementById("download_info").style.display="inline";
	document.getElementById("eventi_georss").style.display="none";
	document.getElementById("download_info").style.top = document.getElementById("BoxRicerca").style.top;
	document.getElementById("download_info").style.left = "412";
	document.getElementById("table_inf").width="181";
	//alert("");
	if (document.getElementById("iconarisriga").style.backgroundImage == "url(PK_layout/img/RigaGiallo.gif)" ) {
			document.getElementById("bttn_gpx").className="bttn_yellow";
			document.getElementById("bttn_ov2").className="bttn_yellow";
	} else if ((document.getElementById("iconarisriga").style.backgroundImage == "url(PK_layout/img/RigaRossa.gif)" )) {
			document.getElementById("bttn_gpx").className="bttn_red_geo";
			document.getElementById("bttn_ov2").className="bttn_red_geo";
	} else {
			document.getElementById("bttn_gpx").className="bttn_blu";
			document.getElementById("bttn_ov2").className="bttn_blu";
	}
	campiChec();
	
	for (i=0; i < parent.document.tot_risultati; i++) {
		
				if (parent.document.lista_check[i] == 1) {
					split_input = (parent.document.lista_attrattori[i]).split(",");
					//tematismi = tematismi + "," + split_input[0];
					if ( attrattori == "" ) attrattori = split_input[1];
					else attrattori = attrattori + "," + split_input[1];
					if ( tematismi == "" ) tematismi = split_input[0];
					else tematismi = tematismi + "," + split_input[0];
			}

	}
	if (tematismi != "") {
		split_tematismi = tematismi.split(",");
		tematismi = split_tematismi[0];
		
		for (i=1; i<split_tematismi.length ; i++) {

				if (split_tematismi[i] != split_tematismi[i-1]) tematismi = tematismi + "," + split_tematismi[i];
				
		}
		
	}
	document.getElementById("numeroTematismo").value=tematismi;
	document.getElementById("id_attratori").value=attrattori;
	document.getElementById("ext_tlx").value="";
	document.getElementById("ext_tly").value="";
	document.getElementById("ext_brx").value="";
	document.getElementById("ext_bry").value="";
	//alert();
}

function chiudi_div_info() {
	document.getElementById("download_info").style.display="none";
	if (document.getElementById("download_info").style.left == "412px") {
		disattiva_checkbox();
	}
	
}

function update_extent(temat,tlx,tly,brx,bry) {
	
	//alert(temat+","+tlx+","+tly+","+brx+","+bry);
	parent.document.tem=temat;
	parent.document.extent_tlx=tlx;
	parent.document.extent_tly=tly;
	parent.document.extent_brx=brx;
	parent.document.extent_bry=bry;
}


function attiva_div_extent() {
	//alert(id_tematismo);
	if ( document.getElementById("BoxRicerca").style.visibility == 'visible' && id_tematismo != "-1," && id_tematismo != "" && id_tematismo != "20," && parent.document.tot_risultati != 0) {
		
		document.getElementById("download_info").style.display="inline";
		document.getElementById("eventi_georss").style.display="none";
		document.getElementById("download_info").style.top = "115";
		if (navigator.appName == "Microsoft Internet Explorer") document.getElementById("table_inf").width="160px";
		else document.getElementById("table_inf").width="162px";
		document.getElementById("download_info").style.left = "218px";//document.getElementById("PannelloInformazioni").style.left;
		
		if (document.getElementById("iconarisriga").style.backgroundImage == "url(PK_layout/img/RigaGiallo.gif)" ) {
			document.getElementById("bttn_gpx").className="bttn_yellow";
			document.getElementById("bttn_ov2").className="bttn_yellow";
		} else if ((document.getElementById("iconarisriga").style.backgroundImage == "url(PK_layout/img/RigaRossa.gif)" )) {
			document.getElementById("bttn_gpx").className="bttn_red_geo";
			document.getElementById("bttn_ov2").className="bttn_red_geo";
		} else {
			document.getElementById("bttn_gpx").className="bttn_blu";
			document.getElementById("bttn_ov2").className="bttn_blu";
		}
		//document.getElementById("bttn_gpx").className="bttn_yellow";
		//document.getElementById("bttn_ov2").className="bttn_yellow";
		document.getElementById("numeroTematismo").value=parent.document.tem;
		document.getElementById("ext_tlx").value=parent.document.extent_tlx;
		document.getElementById("ext_tly").value=parent.document.extent_tly;
		document.getElementById("ext_brx").value=parent.document.extent_brx;
		document.getElementById("ext_bry").value=parent.document.extent_bry;
		
		document.getElementById("id_attratori").value=attrattori;
		
		
	} else {
			/*if (curLang=="it") {
				alert("Attivare almeno un punto di interesse sulla mappa") 
					return false;
				}
				else if (curLang=="en") {
					alert("Select at least a point of interest on the map") 
					return false;
				}
				else if (curLang=="de") {
					alert("Suche") 
					return false;
				}
		*/
		alert(GCLang[RTLang][25])
		return false;
		
	}
	
	
	
	
}
//MDe Santis funzione che attiva il div per il download degli itinerari presenti nel DB
function div_itinerari(id_itinerario) {
		
	parent.document.getElementById("download_itin_db").style.display="inline";
	parent.document.getElementById("download_itin_db").style.top = parent.document.getElementById("BoxRicerca").style.top;
	parent.document.getElementById("download_itin_db").style.left = "412";
	parent.document.getElementById("id_itin").value=id_itinerario;
	
	
	

}

function back_box_ricerca(url_back,id_tem) {
	parent.id_tematismo=id_tem;
	parent.lista_percorsi=0;
	//alert("2");
	parent.add_georss(url_back);
	split_tematismi=id_tem.split(",");
	for (i=0; i<split_tematismi.length; i++) {
		switch (split_tematismi[i]) {
			case "1":
				parent.document.getElementById('ArteArchitettura').className="MenuRisorseOn";
				parent.ArteArchitetturaStato=1;
			break;
			case "2":
				parent.document.getElementById('TermeBenessere').className="MenuRisorseOn";
				parent.TermeBenessereStato=1;
			break;
			case "4":
				parent.document.getElementById('Natura').className="MenuRisorseOn";
				parent.NaturaStato=1;
			break;
			case "5":
				parent.document.getElementById('Eno').className="MenuRisorseOn";
				parent.EnoStato=1;
			break;
			//case "6":
			//	parent.document.getElementById('Artigianato').className="MenuRisorseOn";
			//	parent.ArtigianatoStato=1;
			//break;
			case "7":
				parent.document.getElementById('Mare').className="MenuRisorseOn";
				parent.MareStato=1;
			break;
			case "8":
				parent.document.getElementById('Sport').className="MenuRisorseOn";
				parent.SportStato=1;
			break;
			case "9":
				parent.document.getElementById('Eventi').className="MenuRisorseOn";
				parent.EventiStato=1;
			break;
			case "10":
				parent.document.getElementById('Congressi').className="MenuRisorseOn";
				parent.CongressiStato=1;
			break;
			case "11":
				parent.document.getElementById('COMUOV').className="MenuInformazioniOn";
				parent.COMUOVStato=1;
			break;
			case "12":
				parent.document.getElementById('DOVDOR').className="MenuInformazioniOn";
				parent.DOVDORStato=1;
			break;
			case "13":
				parent.document.getElementById('DOVMAN').className="MenuInformazioniOn";
				parent.DOVMANStato=1;
			break;
			case "14":
				parent.document.getElementById('TEMPL').className="MenuInformazioniOn";
				parent.TEMPLStato=1;
			break;
			case "15":
				parent.document.getElementById('INFOGEN').className="MenuInformazioniOn";
				parent.INFOGENStato=1;
			break;
			case "16":
				parent.document.getElementById('ALTSERV').className="MenuInformazioniOn";
				parent.ALTSERVStato=1;
			break;
			case "18":
				parent.document.getElementById('Spirito').className="MenuRisorseOn";
				parent.SpiritoStato=1;
			break;
		}
		
	}
}


function type_button(tipo) {
	if (tipo=="at") {
    	document.getElementById('button_download_gpx').className="bttn_red_geo";
    	document.getElementById('button_download_ov2').className="bttn_red_geo";
    }	else if (tipo=="co") {
    	document.getElementById('button_download_gpx').className="bttn_yellow";
    	document.getElementById('button_download_ov2').className="bttn_yellow";
    } else {
    	document.getElementById('button_download_gpx').className="bttn_blu";
    	document.getElementById('button_download_ov2').className="bttn_blu";
    }
}


