function changePosition() {
	SNAP_COM.shot.show_part2=function(_6c,ex,ey,_6f,_70){
	   this.show_shot(_6c);
	   this.move(0,document.body.scrollTop);
	   this.orientation("pin");
	   this.current_element=_6c.element;
	   this.div.main.style.visibility="visible";
	}
}

function checkFunz() {  
  if (SNAP_COM.shot) {
     changePosition();	
  } else { window.setTimeout("checkFunz()",500);  }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}


function SitoWeb(sito) {
   alert('Questa attività NON è registrata!!\n\nIl collegamento alla pagina:\n\n'+sito+'\n\nnon è disponibile.\n\n'+
       'Leggere "Perchè registrarsi?"');
}

function Email(sito) {
   alert('Questa attività NON è registrata!!\n\nL\'invio di posta elettronica all\'indirizzo:\n\n  '+sito+' \n\nnon è disponibile.\n\n'+
      'Leggere "Perchè registrarsi?"');
}


function CompressFrame() {

  parent.corpo.document.body.cols='0,*';
  parent.corpo.main.document.body.background="fondoext.gif";

}

function ExpandFrame() {

  parent.corpo.document.body.cols='170,*';
  parent.corpo.main.document.body.background="fondo.gif";
}


function dispIt(){
 parent.window.status=durl[sctr];
 }
 
function nodispIt(){
 parent.window.status='';
}
 
function doIt(){
 if (durl[sctr]!=''){
 /* halt=1;*/
   testo= new String(durl[sctr]);
   if (testo.indexOf('ailto:')>0)
    { window.location=durl[sctr]; }
   else {document.forms.link.submit();}
    }
  document.scala.src='get.php?click=1&tim=<? echo time(); ?>&id='+idr[sctr];
 } 


function rotateIt(){
 if (halt!=1){
  sctr++;
  if (sctr>number_of_sponsors-1){
   sctr=0;
   }
  document.sponsor.src=isn[sctr].src;
  document.forms.link.action=durl[sctr];

  document.scala.src='get.php?tim=<? echo time(); ?>&id='+idr[sctr];
  setTimeout("rotateIt()",10000);
  }
 }
 



// These scripts were originally found on cooltype.com.
// Modified 01/01/1999 by Tobias Ratschiller for linuxapps.com

var bV=parseInt(navigator.appVersion);
NS4=(document.layers) ? true : false;
IE4=((document.all)&&(bV>=4))?true:false;
var FFX  = !document.layers && !document.all;
ver4 = (NS4 || IE4 || FFX) ? true : false;

function expandIt(){return}


function doDocumentOnMouseOver() {
	var eSrc = window.event.srcElement ;
	if (eSrc.className == "item") {
	window.event.srcElement.className = "highlight";
	}
}

function doDocumentOnMouseOut() {
	var eSrc = window.event.srcElement ;
	if (eSrc.className == "highlight") {
	window.event.srcElement.className = "item";
	}
}
 
function getIndex(el) {
	ind = null;
	for (i=0; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		if (whichEl.id == el) {
			ind = i;
			break;
		}
	}
	return ind;
} 

function initIt(){
	if (NS4) {
		for (i=0; i<document.layers.length; i++) {
			whichEl = document.layers[i];
			if (whichEl.id.indexOf("Child") != -1)  whichEl.visibility = "hide";
			if (whichEl.id.indexOf("Parent") != -1) {
				whichEl.document.images["imEx"].src = "plus.gif"; }
		}
		arrange();
	}
	else if (FFX) {
	    tempColl = document.getElementsByTagName('DIV');
	    for (i = 0; i < tempColl.length; i++) {
	      if (tempColl[i].className == 'child')
	        tempColl[i].style.display = 'none';
	    }
	    imColl = document.getElementsByTagName('IMG');
	    for (i=0; i<imColl.length; i++) {
	      if (imColl[i].name=="imEx") {
		    imColl[i].src ="plus.gif";
		  }
		}
	}
	else {
		tempColl = document.all.tags("DIV");
		for (i=0; i<tempColl.length; i++) {
			if (tempColl(i).className == "child")
				tempColl(i).style.display = "none";
		}
        imColl = document.images.item("imEx");
		for (i=0; i<imColl.length; i++) {
			imColl(i).src ="plus.gif";}
	}
}

 
function arrange() {
	nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height;
	for (i=firstInd+1; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		if (whichEl.visibility != "hide") {
			whichEl.pageY = nextY;
			nextY += whichEl.document.height;
		}
	}
}

function showAll() {
 	for (i=firstInd; i<document.layers.length; i++) {
 		whichEl = document.layers[i];
 		whichEl.visibility = "show";
 	}
}

function expandIt(el) {
	if (!ver4) return;
	if (IE4 ) {expandIE(el)} else if (FFX) { expandFF(el)} else {expandNS(el)}
}

function expandIE(el) {
	whichEl = eval(el + "Child");

        // Modified Tobias Ratschiller 01-01-99:
        // event.srcElement obviously only works when clicking directly
        // on the image. Changed that to use the images's ID instead (so
        // you've to provide a valid ID!).

	//whichIm = event.srcElement;
        whichIm = eval(el+"Img");
	if (whichEl.style.display == "none") {
	initIt();whichEl.style.display = "block";
		whichIm.src = "minus.gif";
		whichIm.alt = "Compress";
	}
	else {
		whichEl.style.display = "none";
		whichIm.src = "plus.gif";
		whichIm.alt = "Expand";
	}
    window.event.cancelBubble = true ;
}

function expandNS(el) {
    initIt();
	whichEl = eval("document." + el + "Child");
	whichIm = eval("document." + el + "Parent.document.images['imEx']");
	if (whichEl.visibility == "hide") {
		whichEl.visibility = "show";
		whichIm.src = "minus.gif";
		whichIm.alt = "Compress";
	}
	else {
		whichEl.visibility = "hide";
		whichIm.src = "plus.gif";
		whichIm.alt = "Expand";
	}
	arrange();
}

function expandFF(el) {
    whichEl = document.getElementById(el + 'Child');
    whichIm = document.getElementById(el + 'Img');
    if (whichEl.style.display == 'none' && whichIm) {
      initIt();
      whichEl.style.display  = 'block';
	  whichIm.src = "minus.gif";
	  whichIm.alt = "Compress";
    }
    else {
		whichEl.style.display = "none";
		whichIm.src = "plus.gif";
		whichIm.alt = "Expand";
    }
}

