function printpreview (sget)  {

    var entrylist = "";
    var goodid = "";
    var nfound = 0;
    var frm = null;

    if ((frm = document.getElementById('resultsform')) != undefined)
    {
        for(i=0;i<frm.length;i++){
            if(frm[i].name.indexOf('customsel')==0)
                if(frm[i].checked) {
                    nfound++;
                    name = frm[i].name;
                    s = name.indexOf('[') + 1;
                    e = name.indexOf(']') - 1;
                    goodid = name.substr(s, e - s + 1);
                    entrylist = entrylist + goodid + ",";
                }
    }

    if (nfound == 0)
        entrylist = -1;

        window.open(sget + "&entrylist=" + entrylist);
    }
}

 $(document).ready(function(){
 		  //$('.home, .home .decoro, .home .colonna-1 #firstbox .inbox, #newsletter, #forum, .tit,  .tit span, #insports, #in-piede ').pngFix( );


       $('table tr:odd').addClass('odd');
       $('.boxnotizia:even').addClass('evennotizia');

		$('#mainmenu a.correntearea').append('<span>&nbsp;</span>');
        $(".strumenti-uno").hide();
        $("#tastino").toggle(function()
        {
            $(".strumenti-uno").slideDown();
            $("#tastino a").css('background-image','url(pix/tastino.gif)');
        }, 
        function()
        {
            $(".strumenti-uno").slideUp().hide();
            $("#tastino a").css('background-image','url(pix/tastino-close.gif)');
        });
        

 jQuery.fn.topLink = function(settings) {
		settings = jQuery.extend({
			min: 1,
			fadeSpeed: 200,
			ieOffset: 50
		}, settings);
		return this.each(function() {
			//listen for scroll
			var el = $(this);
			/* el.css('display','none');*/ //in case the user forgot
			$(window).scroll(function() {
				if(!jQuery.support.hrefNormalized) {
					el.css({
						'position': 'static',
						'top': $(window).scrollTop() + $(window).height() - settings.ieOffset
					});
				}
			});
		});
	};


	$(document).ready(function() {
		$('#top-link').topLink({
			min: 400,
			fadeSpeed: 500
		});
		//smoothscroll
		$('#top-link').click(function(e) {
			e.preventDefault();
			$.scrollTo(0,300);
		});
	});
	

        });

  

