<!--

var w = null;
function openWin(theURL,winName,features) { //v2.0
	if(w==null || w.closed) w = window.open("", winName,features); //per la prima volta
	w.location.href = theURL;
	w.focus();
}




$(document).ready(init);

function init(){

tab_attivo=0;
$(".registrazione").click(function(){
	//alert(' ');						 
	if($(this).attr("id")==tab_attivo) return false;
	
	if(tab_attivo!=0){
		$("#"+tab_attivo+"-content").hide();	
		$("#"+tab_attivo).removeClass("giallo");		
		$("#"+tab_attivo).addClass("bianco");		
	}
	
	$("#"+$(this).attr("id")).addClass("giallo");		
	$("#"+$(this).attr("id")).removeClass("bianco");		
	$("#"+$(this).attr("id")+"-content").show();
	tab_attivo=$(this).attr("id");

	return false;
});


$("#aaaa").click(function(){ $('.testoblocco-large').css({'font-size':'1.4em'});return false; });
$("#aaa").click(function(){ $('.testoblocco-large').css({'font-size':'1.05em'});return false; });


$(".comment-it-form").click(function(){
	if($("input[@name=comment-title]").val()=="Titolo del commento" || $("input[@name=comment-title]").val()==""){
		$("input[@name=comment-title]").focus();
		alert("Inserisci il titolo del commento");
		return false;
	}
	if($("input[@name=comment-name]").val()=="Il tuo nome" || $("input[@name=comment-name]").val()==""){
		$("input[@name=comment-name]").focus();
		alert("Inserisci il tuo nome");
		return false;
	}
	if($("input[@name=comment-email]").val()=="La tua email" || $("input[@name=comment-email]").val()==""){
		$("input[@name=comment-email]").focus();
		alert("Inserisci la tua email (non verra' pubblicata)");
		return false;
	}
	if($("textarea[@name=comment-text]").val()=="Testo del commento" || $("textarea[@name=comment-text]").val()==""){
		$("input[@name=comment-text]").focus();
		alert("Inserisci il testo del commento");
		return false;
	}
	$('#form-comment-it').submit();
	return false;	
});

$(".comment-en-form").click(function(){
	if($("input[@name=comment-title]").val()=="Title of the comment" || $("input[@name=comment-title]").val()==""){
		$("input[@name=comment-title]").focus();
		alert("Please write the title of your comment");
		return false;
	}
	if($("input[@name=comment-name]").val()=="Your name" || $("input[@name=comment-name]").val()==""){
		$("input[@name=comment-name]").focus();
		alert("Please write your name");
		return false;
	}
	if($("input[@name=comment-email]").val()=="Your email" || $("input[@name=comment-email]").val()==""){
		$("input[@name=comment-email]").focus();
		alert("Please write your email address (will not be published)");
		return false;
	}
	if($("textarea[@name=comment-text]").val()=="Text of your comment" || $("textarea[@name=comment-text]").val()==""){
		$("input[@name=comment-text]").focus();
		alert("Please write the text of your comment");
		return false;
	}
	$('#form-comment-en').submit();
	return false;	
});


$(".search-button-it").click(function(){
	if($("input[@id=inputString]").val()=="" || $("input[@id=inputString]").val()==" "){
		$("input[@id=inputString]").focus();
		alert("Inserire un termine di ricerca");
		return false;
	}
	$('#form-ricerca-it').submit();
	return true;	
});

$(".search-button-en").click(function(){
	if($("input[@id=inputString]").val()=="" || $("input[@id=inputString]").val()==" "){
		$("input[@id=inputString]").focus();
		alert("Please specify what to look for");
		return false;
	}
	$('#form-ricerca-en').submit();
	return true;	
});


$("#form-comment-en input[@name=comment-title]").focus(function(){ if($(this).val()=="Title of the comment"){$(this).val("");return true;}});
$("#form-comment-it input[@name=comment-title]").focus(function(){if($(this).val()=="Titolo del commento"){$(this).val("");return true;}});
$("#form-comment-en input[@name=comment-name]").focus(function(){ if($(this).val()=="Your name"){$(this).val("");return true;}});
$("#form-comment-it input[@name=comment-name]").focus(function(){if($(this).val()=="Il tuo nome"){$(this).val("");return true;}});
$("#form-comment-en input[@name=comment-email]").focus(function(){ if($(this).val()=="Your email"){$(this).val("");return true;}});
$("#form-comment-it input[@name=comment-email]").focus(function(){if($(this).val()=="La tua email"){$(this).val("");return true;}});
$("#form-comment-en textarea[@name=comment-text]").focus(function(){ if($(this).val()=="Text of your comment"){$(this).val("");return true;}});
$("#form-comment-it textarea[@name=comment-text]").focus(function(){if($(this).val()=="Testo del commento"){$(this).val("");return true;}});

$("#form-comment-en input[@name=comment-title]").blur(function(){ if($(this).val()==""){$(this).val("Title of the comment");return true;}});
$("#form-comment-it input[@name=comment-title]").blur(function(){if($(this).val()==""){$(this).val("Titolo del commento");return true;}});
$("#form-comment-en input[@name=comment-name]").blur(function(){ if($(this).val()==""){$(this).val("Your name");return true;}});
$("#form-comment-it input[@name=comment-name]").blur(function(){if($(this).val()==""){$(this).val("Il tuo nome");return true;}});
$("#form-comment-en input[@name=comment-email]").blur(function(){ if($(this).val()==""){$(this).val("Your email");return true;}});
$("#form-comment-it input[@name=comment-email]").blur(function(){if($(this).val()==""){$(this).val("La tua email");return true;}});
$("#form-comment-en textarea[@name=comment-text]").blur(function(){ if($(this).val()==""){$(this).val("Text of your comment");return true;}});
$("#form-comment-it textarea[@name=comment-text]").blur(function(){if($(this).val()==""){$(this).val("Testo del commento");return true;}});


}


function lookup(inputString, lingua) {
		if(jQuery.browser.msie){
			jQuery.browser.version = parseInt(jQuery.browser.version) == 6 && window["XMLHttpRequest"]?"7.0":jQuery.browser.version;
			if(jQuery.browser.version.substr(0,1)=="6")
				return;
		}
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions').hide();
			$('.flash').show();
		} else {
			$.post("/2008/php/autocomplete.php", {queryString: ""+inputString+"", 'lingua':lingua}, function(data){
				if(data.length >0) {
					$('.flash').hide();
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup
	
	function fill(thisValue) {
		if(jQuery.browser.msie){
			jQuery.browser.version = parseInt(jQuery.browser.version) == 6 && window["XMLHttpRequest"]?"7.0":jQuery.browser.version;
			if(jQuery.browser.version.substr(0,1)=="6")
				return;
		}
		$('#inputString').val(thisValue);
		setTimeout("$('#suggestions').hide();$('.flash').show();", 200);
	}

jQuery.fn.EasyForms=function(){this.find("label").not(".radiolabel").each(function(){var _9=$(this);var _a=$(this).siblings("input,textarea");$(this).siblings("input,textarea").val(_9.html());_a.click(function(){if($(this).val()==$(this).prev("label").html()){$(this).val("");}});_a.blur(function(){if($(this).val()==""){$(this).val($(this).prev("label").html());}});_9.hide();});};


//-->
