function openPopUp(){
	var profiles = {
		window600: {
			height:600,
			width:600,
			status:1,
			resizable:0,
			top:50,
			left:50
		},
		window700: {
			height:700,
			width:700,
			status:1,
			resizable:0,
			top:50,
			left:50
		}
	};			
	$(".popupwindow").popupwindow(profiles);
}

function findMapsLink(langForMaps){  

	//cerco tutti i tag che hanno questo tipo di classe associata	
	$('.maps').each(function(i) {	
		
		//prendo l'html del tag
		paragraph = $(this).html();				
		
		//alert(paragraph);
		
		//svuoto il tag
		$(this).empty();			
		
		//faccio un encoding dell'html per evitare spazi e accenti
		es = encodeURIComponent(paragraph);				
		
		es2 = es.replace(/'/g," ");
		
		//creo il link dinamico che poi passerà a google
		var expr = "<a href='/static-pages/mappa.html?address="+es2+"&amp;lang="+langForMaps+"' class='popupwindow' rel='window600'>"+paragraph+"</a>";						
		$(this).append(expr);
	 			
	
	});	
}

function SlideImage(){	
	foto=Math.round(Math.random()*26);	
	var imageSrc= '<img src="/images/random/IED0'+foto+'.jpg" border="0"/>';
	$('.slideImage').each(function(i) {
		$(this).append(imageSrc);
	});
	
	foto2=Math.round(Math.random()*12);	
	var imageSrc2= '<img src="/images/randomPersArea/IED0'+foto2+'.jpg" border="0"/>';
	$('.slideImagePersArea').each(function(i) {
		$(this).append(imageSrc2);
	});	
}