//castellana srl
//rollover di freehand
function MM_swapImgRestore() {
  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() {
  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) {
  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() {
  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];}
} 

//funzione per aprire nuova finestra con dimensioni imposte al centro dello schermo
function yodawind(url,nomef,w,h){
	var sw = screen.width;
	var sh = screen.height;
	var xPos = Math.round(sw/2)-320;
	var yPos = Math.round(sh/2)-240;
	var proprieta='height='+h+',width='+w+',titlebar=no,menubar=no,toolbar=no,resizable=no,scrollbars=no,directories=no,location=no,status=no,left='+xPos+',top='+yPos+',screenX='+xPos+',screenY='+yPos+'';
	var finestra=open(url,nomef,proprieta);
}

//funzione per aprire nuova finestra con dimensioni imposte e barra di scorrimento al centro dello schermo
function yodaPrivacy(url,nomef,w,h){
	var sw = screen.width;
	var sh = screen.height;
	var xPos = Math.round(sw/2)-320;
	var yPos = Math.round(sh/2)-240;
	var proprieta='height='+h+',width='+w+',titlebar=no,menubar=no,toolbar=no,resizable=no,scrollbars=yes,directories=no,location=no,status=no,left='+xPos+',top='+yPos+',screenX='+xPos+',screenY='+yPos+'';
	var finestra=open(url,nomef,proprieta);
}

//funzione per aprire nuova finestra con indicizzazione da parte dei MdR
function yodaPopUp(strURL,strType,strWidth,strHeight,nameWin) {
	var strOptions="";
	var sw = screen.width;
	var sh = screen.height;
	var xPos = Math.round(sw/2)-320;
	var yPos = Math.round(sh/2)-240;
	if (strType=="bars") strOptions="scrollbars=yes,resizable=no,status=no,height="+strHeight+",width="+strWidth+",left="+xPos+",top="+yPos+",screenX="+xPos+",screenY="+yPos;
	if (strType=="fixed") strOptions="resizable=no,status=no,height="+strHeight+",width="+strWidth+",left="+xPos+",top="+yPos+",screenX="+xPos+",screenY="+yPos;
	if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
	window.open(strURL,nameWin,strOptions);
}

function cambiaSelect(param){
if (param.indexOf('.html')>-1) this.location.href=param;
} 
//
function emptyBlock(emptyVar1){ 
flag = confirm("Sei sicuro di voler eliminare il contenuto del block notes?"); 
	if (flag==true)
		{
			window.location.href=emptyVar1;
			window.opener.location.reload();			
		}
//	else
//		{window.location.href=emptyVar2}
}
//
function delItem(itemVar1){ 
flag = confirm("Sei sicuro di voler eliminare l\'articolo dal block notes?"); 
	if (flag==true)
		{
			window.location.href=itemVar1;
			window.opener.location.reload();
		}
//	else
//		{window.location.href="#"}
//		{window.location.href=itemVar2}
}
