<!--

  // matrice dei siti da non mandare in top
  siti_nn_top=new Array()
   //siti_nn_top=["",""]
   
   siti_nn_top=[
   "http://www.tribunalidistrettomilano.net/index.htm",
   "http://www.giustiziasicilia.it/",
   "http://www.entietribunali.kataweb.it/",
   "http://www.uniriscossioni.it/"
   ,"http://localhost/prove/refferer/pagina1.htm"
   ]
   
   // documento che ci porta qui
   d_ref=document.referrer

   // l'url del sito in cui siamo
	d_loc="@"
   try{
    d_loc=top.location.href
   }
   catch(e){ window.status = e.description }

  function checkSite() {
    d_ref=document.referrer
     nonframe="si" // se trova un frame va in top

     // verifico che il sito non sia nella matrice dei siti che non vanno in top
      for (i=0; i<siti_nn_top.length;i++){
       if (siti_nn_top[i]==d_ref || siti_nn_top[i].indexOf(d_loc)>-1){
	nonframe="no" // sito che non opera col top
       }
      }
   if (nonframe=="si") {
    unFrame()
   }
  }

  function unFrame() {
    if (self!=top){
     try {
      //top.document.location.href = self.location.href
      parent.location.href=""
     }
     catch(e){
      try {
       link=self.location.href
        var elem = document.createElement("A");
        elem.setAttribute ("id", "RNHlinkparent");
        elem.setAttribute ("target", "_top");
        elem.href = link;
        document.appendChild(elem)
        document.getElementById('RNHlinkparent').click()
       }
       catch(e){
        window.status=e.description
       }
     }
    }
  }

	checkSite()
  window.onload=checkSite
  window.onreadystatechange=checkSite

// -->
