function redir(url){
	window.location=url;
}
function updatecaptcha() {
   img = document.getElementById('imgCaptcha'); 
   //Change the image
   img.src = '../../lib/captcha/immagine.php?' + Math.random();
}
// JavaScript Document
$(document).ready(function(){
	//$("a[rel^='prettyPhoto']").prettyPhoto();	
	$("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'fast', 
		padding: 40, 
		opacity: 0.45, 
		showTitle: true,
		allowresize: true,
		counter_separator_label: '/', 
		theme: 'light_rounded', 
		callback: function(){

		}
	});
});
function nuovalingua(id) {
  var url = String(window.location) ;
  set_cookie('lang', id);
  var index2 = url.indexOf('#');
	
  a=url.split('#');
  url=a[0];  
  var index = url.indexOf('?');  
  
  conc=(index == -1)?"?":"&";
  //conc2=(a[1] <>'')?"#"+a[1]:"";  
  
  
  url = url + conc+"lang="+id;
  //alert (url);
  window.location=url;
}
function set_cookie(name, value)
{
	document.cookie= name + "=" + escape(value);
}
