<!--

		function is_child_of(parent, child) {
			if( child != null ) {
				while( child.parentNode ) {
					if( (child = child.parentNode) == parent ) {
						return true;
					}
				}
			}
			return false;
		}
		function fixOnMouseOut(element, event, JavaScript_code) {
			var current_mouse_target = null;
			if( event.toElement ) {
				current_mouse_target 			 = event.toElement;
			} else if( event.relatedTarget ) {				
				current_mouse_target 			 = event.relatedTarget;
			}
			if( !is_child_of(element, current_mouse_target) && element != current_mouse_target ) {
				eval(JavaScript_code);
			}
		}


 function toggleDown(id,id_2){
      $(id_2).slideDown("slow");
      $(id).slideUp("slow");
      $(id_2).attr("display","block");
      return false;
 }
 
  function toggleUp(id,id_2){
      $(id).slideDown("slow");
      $(id_2).slideUp("slow");
      return false;
 }

 function toggleView(id){
      $(id).slideToggle("slow");
      return false;
 }

$(function() {
$('.trofeo').tooltip({
	track: true,
	delay: 0,
	showURL: false,
	fixPNG: true,
	showBody: " - ",
	left: -120
});
});

$(function() {
$('.dettagli').tooltip({
	track: true,
	delay: 0,
	showURL: false,
	fixPNG: true,
	showBody: " - ",
	left: -120
});
});
 
 
 
       var intervallo;

  function destra(id){
      if(intervallo) {clearInterval(intervallo);}
      var pos=$(id).css("background-position");
      pos=parseInt(pos);
      npos=(pos-1)+'px 0px';
      $(id).css("background-position", npos);
      intervallo = setTimeout('destra("' + id + '")', 30);
 }

  function destra_veloce(id){
      if(intervallo) {clearInterval(intervallo);}
      var pos=$(id).css("background-position");
      pos=parseInt(pos);
      npos=(pos-5)+'px 0px';
      $(id).css("background-position", npos);
      intervallo = setTimeout('destra_veloce("' + id + '")', 1);
 }

  function sinistra(id){
      if(intervallo) {clearInterval(intervallo);}
      var pos=$(id).css("background-position");
      pos=parseInt(pos);
      npos=(pos+1)+'px 0px';
      $(id).css("background-position", npos);
      intervallo = setInterval('sinistra("' + id + '")', 30);
 }

   function sinistra_veloce(id){
      if(intervallo) {clearInterval(intervallo);}
      var pos=$(id).css("background-position");
      pos=parseInt(pos);
      npos=(pos+5)+'px 0px';
      $(id).css("background-position", npos);
      intervallo = setInterval('sinistra_veloce("' + id + '")', 1);
 }

   function stop_scroll(id){
      if(intervallo) {clearInterval(intervallo);}
      var pos=$(id).css("background-position");
      pos=parseInt(pos);
      npos=(pos+0)+'px 0px';
      $(id).css("background-position", npos);
 }


 //Rating
 


function changeRate(val){
      npos=(val*15)+'px 0px';
      $('#rating').css("background-position", npos);
$('#tvoto').html('  '+val+'  ');
$('#tvotosb').html('');
$('#tvotosbs').css("display", "block");
}

function rate(val){
 $('#vota').val(val);
 var vala =  $('#vota').val();
$('#tvoto').html('  '+vala+'  ');
}

function resetRate(){
 var val =  $('#vota').val();
 if(val == "") {
      npos='0px 0px';
 $('#tvoto').html('0');
}
 else  {
      npos=(val*15)+'px 0px';
 $('#tvoto').html('  '+val+'  ');
}
      $('#rating').css("background-position", npos);
}


function get() {
  $.post('data.php', {name: form.name.value},
     function (output) {
       $('#age').html(output).fadeIn(1000);
    });
}


function pagina(pagina,valore,valore2,valore3,div){
  $.post(pagina, {input: valore, input_2: valore2, input_3: valore3},
  function (output) {
    $(div).html(output).hide().fadeIn(300); }
    );
}





 //-->
