
function ritorna(url_rit, meseanno, ncomm) {


// CERCA LA RIGA CONTENT

   loc_top = parent.location.href;
 
   poscont = 0;
   possource = 0;	
   possource = loc_top.indexOf("source="); 

   if ((possource == 0) || (possource == -1)) {
      possource = 9999
   }
	
	

  		
// LINK DI RITORNO ALLE BICAMERALI

   loc_top = parent.location.href;	
   posbic = 0;	
   posbic = loc_top.indexOf("bicamerali"); 	

   if (((posbic != 0) && (posbic != -1)) && (posbic < possource)) {
      loc_bot = top.bottom.location.href;
	
      posbot = loc_bot.indexOf("campo=") + 6;
      riturl = loc_bot.substring(posbot);

      window.open(riturl, "bottom");
	return;
   }



// LINK DI RITORNO ALLE INDAGINI CONOSCITIVE

   loc_top = parent.top.location.href;	

   
   posind = 0;	
   posind = loc_top.indexOf("indagini"); 	
  

   if (((posind != 0) && (posind != -1)) && (posind < possource)) {
      loc_bot = top.bottom.location.href;

      posbot = loc_bot.indexOf("campo=") + 6;
      riturl = loc_bot.substring(posbot);

	posint = posbot - 7;

	posrit = 0;	
	posrit = loc_bot.indexOf("posrit=");
      
      if ((posrit != 0) && (posrit != -1)) {
         
         campohref = loc_bot.substring(posint, posrit)
         riturl = riturl + "?" + campohref
      }

	
      window.open(riturl, "bottom");
     
	return;
   }



// LINK DI RITORNO ALLE AUDIZIONI

   loc_top = parent.top.location.href;	
  	
   
   posind = 0;	
   posind = loc_top.indexOf("audizioni"); 	
  
   if (((posind != 0) && (posind != -1)) && (posind < possource)) {
      loc_bot = top.bottom.location.href
     

      posbot = loc_bot.indexOf("campo=") + 6
      riturl = loc_bot.substring(posbot)

	posste = 0	
	posste = loc_bot.indexOf("stencomm/") + 9
	posaud = loc_bot.indexOf("/audiz")
	      
      if ((posste != 0) && (posste != -1)) {
         
         campohref = loc_bot.substring(posaud, posste)
         riturl = riturl + "?posrit=" + campohref
      }

	
      window.open(riturl, "bottom")
     
	return
   }




// LINK DI RITORNO AL FRONTESPIZIO	   
   a = parent.location.href;


   b = 0;
   b = a.indexOf("bollettino");

   if (((b != 0) && (b != -1)) && (b < possource)){
      window.open(url_rit, "bottom");
      return;
   }


// RITORNO AL MESE PER I BOLLETTINI APERTI DINAMICAMENTE DALLE SCHEDE	   
   a = parent.location.href;
 
  
   b = 0;
   b = a.indexOf("frsmcdin.asp");

   if (((b != 0) && (b != -1)) && (b < possource)){
      
      c = 0
      c = a.indexOf("percboll=") + 9
	    
      ritorno = a.substr(c, 34) + "sedute/" 
       	    
      
      d = 0
      d = a.indexOf("commis=") + 7

      ritorno = ritorno + a.substr(d, 2) + "r.htm"
      
           	 	    
	    
      window.open(ritorno, "bottom");
      return;
   }





// LINK DI RITORNO AL MESE DI RICHIAMO	   

   a = top.bottom.location.href;

  
   c = a.indexOf("campo=") + 6;

   ritorno = a.substring(c); 
   window.open(ritorno, "bottom");
   return;
  
   


} 


function nuova_frame(parm_url, parm_target) {


// CERCA LA RIGA CONTENT

   loc_top = parent.location.href;
 
   poscont = 0;
   possource = 0;	
   possource = loc_top.indexOf("source="); 

   if ((possource == 0) || (possource == -1)) {
      possource = 9999
   }


// NUOVA FRAME PER INDAGINI CONOSCITIVE


   loc_top = parent.top.location.href;	
   posind = 0;	
   posind = loc_top.indexOf("indagini"); 	

   a = top.bottom.location.href   

   c = a.substring(5);

	   
   if (((posind != 0) && (posind != -1)) && (posind < possource)) {
       
       posint = 0
       posint = a.indexOf("?")
 
 	 if ((posint != 0) && (posint != -1)) {
          c = a.substring(posint, 5)
       }
   }


// NUOVA FRAME PER AUDIZIONI

   posind = 0;	
   posind = loc_top.indexOf("audizioni"); 	

   if (((posind != 0) && (posind != -1)) && (posind < possource)) {
       
       posint = 0
       posint = a.indexOf("?")
 
 	 if ((posint != 0) && (posint != -1)) {
          c = a.substring(posint, 5)
       }
   }
	

	
   window.open (parm_url + "?campo=" + c, parm_target);
}
