 if (document.images)
    {
      preload_image_object = new Image();

      image_url = new Array();
      image_url[0] = "img/updatebanner2.png";


       var i = 0;
       for(i=0; i<=3; i++) 
         preload_image_object.src = image_url[i];
    }


  





///////////////////////// POP UP //////////////////////////////////////	
//Math.floor(Math.random()*11),
/*
function popup(url,wdt,hgt) {
w=screen.width;
h=screen.height;
leftm=(w-wdt)/2;
topm=(h-hgt)/2;
window.open(url, 'Finestra','left='+leftm+',top='+topm+',width='+wdt+',height='+hgt+',menubar=no,scrollbars=no,resizable=no,toolbar=no,location=no');
}

 function popup(url, w, h) {
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
   window.open(url,"","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l +, menubar=no,scrollbars=no,resizable=no,toolbar=no,location=no');
 }
*/


function popup(url, w, h) {

leftm=Math.floor((screen.width-w)/2);
topm=Math.floor((screen.height-h)/2);

window.open(url, 'Finestra','left='+leftm+',top='+topm+',width='+w+',height='+h+',menubar=no,scrollbars=no,resizable=no,toolbar=no,location=no');
}





////////////////////////////  CARICAMENTO FILE FLASH ///////////////////////////
function loadFlash(swf, w, h, oid) {
document.write('<object wmode="transparent" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/" width="' + w + '" height="' + h + '" id="' + oid + '"> \n');
document.write('<param name="movie" value="' + swf + '"> \n');
document.write('<param name="quality" value="high"> \n');	  
document.write('<param name="wmode" value="transparent"> \n');
document.write('<embed wmode="transparent" src="' + swf + '" width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" id="' + oid + '"> \n');
document.write('</embed></object> \n');
}	
 

function ajaxLoader(url,id) {
	
  $("#promo").hide();
	
  if (document.getElementById) {
    var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
  }
  if (x) {
    x.onreadystatechange = function() {
      if (x.readyState == 4 && x.status == 200) {
        el = document.getElementById(id);
        el.innerHTML = x.responseText;
      }
    }
    x.open("GET", url, true);
    x.send(null);
  }
}  

$(document).ready(function(){
	

	$(".sm").hide();
	
	$("a.showdownload").toggle(function(){
		$(this).addClass("active"); 
		}, function () {
		$(this).removeClass("active");
	});		 
	
	
	$("a.showdownload").click(function(){
		$(this).next(".sm").slideToggle("slow,");
	});
 
 
 	$("#closepromo").click(function() {
		$("#promo").fadeOut(2000);								
	});
 
});	  



////////////////////////////  SXMENU  ///////////////////////////
function sxmenu(v) {

if(v == 1) {
document.getElementById("sxmenu1").style.display = 'block';	   
document.getElementById("sxmenu2").style.display = 'none';	
document.getElementById("sxmenu3").style.display = 'none';	
document.getElementById("sxmenu4").style.display = 'none';	
document.getElementById("sxmenu5").style.display = 'none';		
}	
if(v == 2) {
document.getElementById("sxmenu1").style.display = 'none';	   
document.getElementById("sxmenu2").style.display = 'block';	
document.getElementById("sxmenu3").style.display = 'none';	
document.getElementById("sxmenu4").style.display = 'none';	
document.getElementById("sxmenu5").style.display = 'none';		
}	
if(v == 3) {
document.getElementById("sxmenu1").style.display = 'none';	   
document.getElementById("sxmenu2").style.display = 'none';	
document.getElementById("sxmenu3").style.display = 'block';	
document.getElementById("sxmenu4").style.display = 'none';	
document.getElementById("sxmenu5").style.display = 'none';		
}	
if(v == 4) {
document.getElementById("sxmenu1").style.display = 'none';	   
document.getElementById("sxmenu2").style.display = 'none';	
document.getElementById("sxmenu3").style.display = 'none';	
document.getElementById("sxmenu4").style.display = 'block';	
document.getElementById("sxmenu5").style.display = 'none';		
}	
if(v == 5) {
document.getElementById("sxmenu1").style.display = 'none';	   
document.getElementById("sxmenu2").style.display = 'none';	
document.getElementById("sxmenu3").style.display = 'none';	
document.getElementById("sxmenu4").style.display = 'none';	
document.getElementById("sxmenu5").style.display = 'block';		
}	


}





////////////////////////////  DISCLAIMER  ///////////////////////////
function disclaimer() {
document.getElementById('dark').style.display = 'block';
document.getElementById('dark').style.height = document.body.parentNode.scrollHeight + 'px';  
document.getElementById('disclaimer').style.display = 'block';
}
function closedisclaimer() {
document.getElementById('dark').style.display = 'none';
document.getElementById('dark').style.height = 0 + 'px';  
document.getElementById('disclaimer').style.display = 'none';
}										   
function AD_PAY(azione) {	 		  
if(azione == 'disattiva') {
document.forms[0].paypalsubmit.disabled = true;
}
if(azione == 'attiva') {
document.forms[0].paypalsubmit.disabled = false;	
}								   
}  




