document.write('<div id="loading"><div class="fl_dx"><a href="#" onclick="ko()" class="img" title="chiudi"><img src="img/ico/close.png" alt="chiudi" class="i" /></a></div><div class="clear"></div><img src="img/ico/loading.gif" alt="smSend.it" class="i_sx" /><span class="f_b_16">&nbsp;&nbsp;<strong>smSend.it</strong><br />&nbsp;&nbsp;<span class="f_b_14">sms - mms - pec</span></span></div>'); 
window.onload=function(){document.getElementById("loading").style.display="none";}
function ko() {document.getElementById("loading").style.display="none";}

var bo_ns_id = 0;

function startIeFix(){if(isIE()){document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');}}

function endIeFix(){if(isIE()){document.write('</div>');var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);var theCode = theObject.innerHTML;theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"));document.write(theCode);}}

function isIE(){var strBrwsr= navigator.userAgent.toLowerCase();if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){return false;}
	if(strBrwsr.indexOf("win98") > -1 ||
       strBrwsr.indexOf("win 9x 4.90") > -1 ||
       strBrwsr.indexOf("winnt4.0") > -1 ||
       strBrwsr.indexOf("windows nt 5.0") > -1)
    {
      return false;
    }
    return true;
  }else{
    return false;
  }
}

$(function() {
	var $elem = $('#content');
	$('#nav_up').fadeIn('slow');
	$('#nav_down').fadeIn('slow');  
	$(window).bind('scrollstart', function(){$('#nav_up,#nav_down').stop().animate({'opacity':'1'});});
	$(window).bind('scrollstop', function(){$('#nav_up,#nav_down').stop().animate({'opacity':'1'});});
	$('#nav_down').click(function (e) {$('html, body').animate({scrollTop: $elem.height()}, 800);});
	$('#nav_up').click(function (e) {$('html, body').animate({scrollTop: '0px'}, 800);});
});
