//scambio ambiente
function scambio(id){
	 if (document.getElementById){
    		if(document.getElementById(id).style.display == 'none'){
      			document.getElementById(id).style.display = 'block';
    		} else {
      			document.getElementById(id).style.display = 'none';
    		}
  	}
}
//fine scambio ambiente

//inizio script clicker
var ns6=document.getElementById&&!document.all?1:0

var head="display:''"
var folder=''

function expandit(curobj){
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+1].style
if (folder.display=="none")
folder.display=""
else
folder.display="none"
}
//fine script clicker


//inizio script open win
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//fine script open win

//inizio script statusbar
   var i = 0; 

   var TextNumber = 0;

   var TextInput = new Object();

   var HelpText="";                              

   var Text = "";  

   var Speed=100

   var WaitSpace="           "                 


TextInput[0] = "Project & realization *Daniela Lovece***";  

TextInput[1] = "daniela@danielalovece.it";

TextInput[2] = "http://www.danielalovece.it"

TextInput[3] = "English version"

TextInput[4] = "Mario Parise"

TextInput[5] = "cerimp06@area.ba.cnr.it"

TextInput[6] = "©  Gruppo Puglia Grotte"

TotalTextInput = 6; // (0, 1, 2, 3, 4, 5,6)


for (var addWait = 0; addWait <= TotalTextInput; addWait++) 

   { TextInput[addWait]+=WaitSpace; }

	

var TimerId

var TimerSet=false;


function startBanner (form)  

   {

   if (!TimerSet)

      {

      TimerSet=true;

      banner();

      }

   }


function banner() 

   {

   Text=rollMessage();

   TimerId = setTimeout("banner()", Speed);

   window.status=Text;

   }


function rollMessage () 

   {

   Wait_yn=false;

   i++;

   var CheckSpace = HelpText.substring(i-1, i);

   CheckSpace = "" + CheckSpace;

   if (CheckSpace == " ") 

      {i++;}

   if (i >= HelpText.length+1) 

      {

      i=0; 

      if (TextNumber < TotalTextInput) 

         {TextNumber++;} 

      else 

         {TextNumber = 0;} 

      initBanner();

      }

   Text = HelpText.substring(0, i);

   return (Text);

   }


function initBanner() 

   {

   Text = TextInput[TextNumber];

   HelpText = Text;

   startBanner ();


   }

//fine script statusbar


//inizio script rollover

function MM_preloadImages() { //v2.0
  if (document.images) {
    var imgFiles = MM_preloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function MM_swapImgRestore() { //v2.0
  if (document.MM_swapImgData != null)
    for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)
      document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
}

function MM_swapImage() { //v2.0
  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
  for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
    objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
    obj = eval(objStr);
    if (obj != null) {
      swapArray[j++] = obj;
      swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
      obj.src = MM_swapImage.arguments[i+2];
  } }
  document.MM_swapImgData = swapArray; //used for restore
}

//fine script rollover


// Inizio script email
//***************************************************************

//     Multiple Email Addresses From A Dropdown Menu

//         by Tim Wallace   (timothy@essex1.com)

//

// Copyright (C)1997  Timothy Wallace.  All Rights Reserved. 

//***************************************************************

// Identify browser - not all browsers handle email the same.

var browser=navigator.appName + " " + navigator.appVersion;

// Add a message to the body for Netscape 4.0

var message="";

if(browser.substring(0, 12)=="Netscape 4.0")

   message="&body=This is for demonstration only... \n\n\n      NON SPEDIRE QUESTO MESSAGGIO!";

// Used to display and load email address

var address="";

// Called by onChange in select tag

function setAddress()

   {

   // Sets myindex to index of selected menu item

   var myindex=document.email.address.selectedIndex;

   // If an item other than 0 has been chosen

   if (myindex>=1)

      {

      address=document.email.address.options[myindex].value;      

      document.email.display.value=address;

      return true;

      }

   // If no item has been chosen

   else

      {

      document.email.display.value=" ";

      return false;

      }   

   }

// Called by View Mail Window button

function doMail()

   {

   // Checks if an address has been selected

   if(setAddress())

      window.location="mailto:"+address+"?subject=Richiesta informazioni"+message;

   else

      {

      alert("\nScegli un indirizzo dal menu / Choose an address from the menu");

      return false;

      }

   }

// Called by Reset The Form button - impelmented for Netscape 2

function resetForm()

   {

   document.email.address.options[0].selected = true;

   }

// Called by About Netscape 2 button

function aboutNet2()

   {

   alert("\nThe onChange used to display the address does not work right with Netscape 2.\n\nWith this browser, make a selection and then click within the frame to see the address.");

   }
// Deactivate Cloaking -->
// Fine script email


//inizio script show/hidelayer
function MM_showHideLayers() { //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers != null) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null) { //IE
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}

function MM_goToURL() { //v2.0
  for (var i=0; i< (MM_goToURL.arguments.length - 1); i+=2) //with arg pairs
    eval(MM_goToURL.arguments[i]+".location='"+MM_goToURL.arguments[i+1]+"'");
  document.MM_returnValue = false;
}
//fine script show/hidelayer

// script popupvolante
var URL= "news.htm";

var W= 355; 
var H= 135; 

var M= 30;

var speed = 40;

var increment = 20;

var nowY=M;var nowX=M;
var theWidth=window.screen.width;
var theHeight=window.screen.height;
var limitX=theWidth-W-M;
var limitY=theHeight-H-M;
var s="width="+W+",height="+H;
function doFlyMe(){
P=window.open(URL,"A",s);  
P.resizeTo(W,H);
P.moveTo(M,M);
P.focus(); 
D();}
function D(){
if (nowY<=limitY){
P.moveTo(nowX,nowY);
P.focus();
nowY+=increment;
T=setTimeout("D()",speed);
}else{
clearTimeout(T);
nowY=limitY;
P.moveTo(nowX,nowY);
P.focus();
R();}}
function R(){
if (nowX<=limitX){
P.moveTo(nowX,nowY);
P.focus();
nowX+=increment;
T=setTimeout("R()",speed);
}else{
clearTimeout(T);
nowX=limitX;
P.moveTo(nowX,nowY);
P.focus();
U();}}
function U(){
if (nowY>=M){
P.moveTo(nowX,nowY);
P.focus();
nowY-=increment;
T=setTimeout("U()",speed);
}else{
clearTimeout(T)
nowY=M;
P.moveTo(nowX,nowY);
P.focus();
L();}}
function L(){
if (nowX>=M){
P.moveTo(nowX,nowY);
P.focus();
nowX-=increment;
T=setTimeout("L()",speed);
}else{
clearTimeout(T);
nowX=M;
P.moveTo(nowX,nowY);
P.focus();}}

// fine script popupvolante