	function service_serverGetData(page, callback_fnc)
	{
	    if(document.all)
	    {
	   	  var sURL = page;
	      oXMLHTTP = new ActiveXObject( "Microsoft.XMLHTTP" );
		}
		else
		{
			var sURL = page;
			oXMLHTTP = new XMLHttpRequest
		}
	    oXMLHTTP.open( "POST", sURL, true );
	    oXMLHTTP.onreadystatechange = callback_fnc;
	    try
		{
	         oXMLHTTP.send(null);
	    }
	    catch (e)
		{
	         alert("Server is not available at this time to process your request.");
	    }
	}


function AJAXInteraction(url, callback) {

    var req = init();
    var callcak = callback;
    req.onreadystatechange = processRequest;
        
    function init() {
      if (window.XMLHttpRequest) {
        return new XMLHttpRequest();
      } else if (window.ActiveXObject) {
        return new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
    
    function processRequest () {
      if (req.readyState == 4) {
        if (req.status == 200) 
        {
          if (callback) callback(req.responseText);
        }
        else
        {
            alert('Richiesta non eseguita su '+url);
        }
        
      }
    }

    this.doGet = function() {
      req.open("GET", url, true);
      req.send(null);
    }
    
    this.doPost = function(body) {
      req.open("POST", url, true);
      req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
      req.send(body);
    }
}

jQuery.noConflict();

function resizeItems(windowWidth){
    jQuery("#header").css("width",(windowWidth-52));
    if(windowWidth<1160){
        jQuery("#bottone_presentazione").hide();
        jQuery("#header_right").hide();
        jQuery("#meteo").hide();
    }else{
        jQuery("#bottone_presentazione").show();
        jQuery("#header_right").show();
        jQuery("#meteo").show();
    }

    if(windowWidth<1220){
        jQuery("#footer").height(54);
    }else{
       jQuery("#footer").height(27);
    }
}

jQuery(document).ready(function() {
    resizeItems(jQuery(window).width());
    jQuery(window).resize(function() {
      resizeItems(jQuery(window).width());
    });
});

function popitup(url, height, width)
{
	newwindow=window.open(url,'name','location=0,scrollbars=yes,height='+height+',width='+width);
	if (window.focus) {newwindow.focus()}
	return false;
}
