function meteo_win(str) {
	var width="558", height="406";
	var left = (screen.width/2) - width/2;
	var top = (screen.height/2) - height/2;
	var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,sresizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
	var finestra = window.open(str,'nuova',styleStr); 
}

//conferma cancellazione 
function tmt_confirm(msg){
	document.MM_returnValue=(confirm(unescape(msg)));
}
// data
var isnMonths=new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre");
var isnDays= new Array("domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato");
today=new Date();

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

// funzione per indentificare i layer del testo foto
function MM_reloadPage(init) { 
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_setTextOfLayer(objName,x,newText) { 
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

// funzione per cambiare al volo le foto piccole
function foto_carica(){
	foto=document.piccola0.src;
	testo=document.piccola0.value;
	document.media.src=foto.replace('S','L');
	MM_setTextOfLayer('foto_testo','',testo);	
}
function fotomedie(fotos,txt){
  	document.media.src='upload/schede/'+ fotos.replace('S','L');
	MM_setTextOfLayer('foto_testo','',txt.replace('foto_testo','value'));
}

function disableRightClick(e){
  var message =" Tasto disabilitato";

  if(!document.rightClickDisabled) {
    if(document.layers) {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown = disableRightClick;
    }
    else document.oncontextmenu = disableRightClick;
    return document.rightClickDisabled = true;
  }
  if(document.layers || (document.getElementById && !document.all)){
    if (e.which==2||e.which==3){
      alert(message);
      return false;
    }
  } else {
    alert(message);
    return false;
  }
}
disableRightClick();

var timerID = null;var timerRunning = false;var id;var pause=0;var position=0;
function jsitStatusScroll() {
	var i; 
	var x;
	var message="Rapaci | I rapaci Italiani e la falconeria                                                                       ";
	x=(60/message.length)+1;
	for(i=0;i<=x;i++) message+=" "+message;
		window.status=message.substring(position,position+80);
		if(position++==128) position=2;
		id=setTimeout('jsitStatusScroll()',301-100);
}
//jsitStatusScroll();


function stampas(mystr) {
	//var mystr = "default_1.asp";
	var width="630", height="480";
	var left = (screen.width/2) - width/2;
	var top = (screen.height/2) - height/2;
	var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
	var finestra = window.open(mystr,'nuova',styleStr); 
}

// document.body.scrollLeft, document.body.scrollTop 		IE properties for window dimensions
// window.pageXOffset, window.pageYOffset 					Firefox properties for document scroll coordinates
// document.body.clientWidth, document.body.clientHeight 	IE properties for window dimensions
// window.innerWidth, window.innerHeight 					Firefox properties for window dimensions

function pony(currElem) {
	if (document.getElementById){
	//oggetto=document.getElementById('contenutiLeft').style
    //oggetto.pixelTop=misura(oggetto.pixelTop)
	misura();
    }
}

function misura(altezza) {	//pages = window.innerHeight
	ie = (navigator.appName == "Microsoft Internet Explorer");
    	if (ie) {
			sopra = document.body.scrollTop + 1
			pages = document.body.clientHeight
			altezza = sopra  + pages
				if( altezza > 700 ){
					mostraTop();
				}else{
					nascondiTop();
				}
		} else {
			sopra = window.pageYOffset + 1
			pages =  document.getElementById('centrale').scrollHeight
			altezza = sopra  + pages
				if( altezza > 550 ){
					mostraTop();
				}else{
					nascondiTop();
				}
			}
	return altezza
}

function nascondiTop(){
	document.getElementById('contenutiLeft').style.visibility = "hidden";
}
function mostraTop(){
	document.all.contenutiLeft.style.visibility="visible";
}