if(window.XMLHttpRequest)
{

var s_width =''; 
var s_height =''; 
s_width=screen.width;
s_height=screen.height; 


if(window.ActiveXObject)
{
if (s_width >= "1280") {
//alert("1280");
document.write("<link rel='stylesheet' href='http://www.hevea.info/css/style.css' type='text/css'>"); 
}
else {
//alert("Explorer 7");
document.write("<link rel='stylesheet' href='http://www.hevea.info/css/style.css' type='text/css'>"); 
// IE 7
}
}
else
{
//alert("Netscape");

if (s_width >= "1280") {
//alert("1280");
document.write("<link rel='stylesheet' href='http://www.hevea.info/css/style.css' type='text/css'>"); 
}

else {
//alert("1000");

document.write("<link rel='stylesheet' href='http://www.hevea.info/css/style.css' type='text/css'>"); 

}

}// Opera, Safari, Firefox
}
else
{
//alert("IE6s");
if (s_width >= "1280") {
//alert("1280");
document.write("<link rel='stylesheet' href='http://www.hevea.info/css/style.css' type='text/css'>"); 
}

else {
//alert("1024");
document.write("<link rel='stylesheet' href='http://www.hevea.info/css/style.css' type='text/css'>"); 
}

// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004



//IE 6 and below
}


function stampa_flash_trans(percorso, width, height, id)
{
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" id=\""+id+"\" width=\""+width+"\" height=\""+height+"\">");
document.write("<param name=\"movie\" value=\""+percorso+"\">");
document.write("<param name=\"menu\" value=\"false\">");
document.write("<param name=\"quality\" value=\"high\">");
document.write("<param name=\"scale\">");
document.write("<param name=\"wmode\" value=\"transparent\">");
document.write("<param name=\"bgcolor\" value=\"#ffffff\">");
document.write("<embed src=\""+percorso+"\" wmode=\"transparent\" menu=\"false\" quality=\"high\" scale=\"noborder\" bgcolor=\"#ffffff\" width="+width+" height="+height+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">");
document.write("</embed>");
document.write("</object>");
} 

function gox(id) {
	var scroll = new Fx.Scroll('mainbox', {
				wait: false,
				duration: 2500,
				offset: {'x': 0, 'y': 0},
				transition: Fx.Transitions.Quad.easeInOut
			});
//				var event = new Event(event).stop();
				scroll.toElement('content'+id);


};


function clickLink(id){
//alert(id);
//var hreferer=document.getElementById("link"+id).id;
//#this.location.href='#';
//return this.location.link = hreferer;
return gox(id);

}


function load(numero) {
//alert(numero);
//clickLink(numero);
gox(numero);

}
function loadz(numero) {
//alert(numero);
//clickLink(numero);
gox(numero);

}



letterTable='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMabcdefghijklmnopqrstuvwxyzabcdefghijklm';
function rot13(str) {
 var outStr='';
 for (var k=0;k<str.length;k++) {
  var ch=str.charAt(k);
  var ix=letterTable.indexOf(ch);
  outStr+= (ix==-1) ? ch : letterTable.charAt(ix+13) ;
 }
 return outStr;
}

function setCookie(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

/**
 * Gets the value of the specified cookie.
 *
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function setCookie(name, value, expdays) {
  var now = new Date();
  var exp = new Date(now.getTime() + (1000*60*60*24*expdays));
  document.cookie = name + "=" + escape(value) + ";" +
                    "expires=" + exp.toGMTString() + ";" +
                    "path=/";
}

function delCookie(name) {   // fa scadere il cookie
  var now = new Date();
  var exp = new Date(now.getTime() - (1000*60*60*24*365));
  document.cookie = name + "=;" +
                    "expires=" + exp.toGMTString() + ";" + 
                    "path=/";
}

function getCookie(name) {   // restituisce il valore del cookie
  var cname = name + "=";
  var dc = document.cookie;
  if (dc.length > 0) {
    var start = dc.indexOf(cname);
    if (start != -1) {
      start += cname.length;
      var stop = dc.indexOf(";", start);
      if (stop == -1) stop = dc.length;
      return unescape(dc.substring(start,stop));
    }
  }
  return null;
}
