//******************************************************************************************
// TECHNICAL OVERVIEW
//
// DESCRIPTION:
//
// NOTES : 
//
// -----------------------------------------------------------------------------------------
// KEYWORDS
//
// $Filename$
// $Revision$
// $Date$
// $Owner$
// $Comment$
// $Log5$
//
//******************************************************************************************

//Funzione per la pop up
//apre finestra popup con file
	
var clPopPop = null // handle for the pop window

function Pop(szPop,szPWidth,szPHeight) {

	//riceve file, larghezza, altezza
  	//var clPopPop = null // handle for the pop window
  	var szFile
	        
	var szWidth = szPWidth
	var szHeight = szPHeight
	        
	// compone stringa parametri finestra
  	var szWinFeatures = "scrollbars=yes"
        szWinFeatures += ",width="
        szWinFeatures += szWidth
        szWinFeatures += ",height="
        szWinFeatures += szHeight
        szWinFeatures += ",status="
			
	var szErrMsg  = "\nIl Vostro Browser non e' stato in grado di aprire un'altra finestra "
		szErrMsg += "\nper visualizzare il documento richiesto.  Vi preghiamo di chiudere"
		szErrMsg += "\ntutte le finestre inutilizzate del browser , e riprovare." 

  	if (szPop)  
        	szFile = szPop   // open with a given file
  	else
        	szFile = "/def_pop.htm"  // by default, open the Default Pop file

  	// Netscape Navigator allows only 100 windows at a time
  	// use the existing one to avoid exceeding the limit
	if (clPopPop) {
	
        	if (!clPopPop.closed)    // if Pop window not closed 
                	clPopPop.location.href = szFile
        else 
        	clPopPop = window.open(szFile, 'pop', szWinFeatures)
  	} else 
          	clPopPop = window.open(szFile, 'pop', szWinFeatures)
	        
  	// check if new window failed to open
  	if (clPopPop) 
        	clPopPop.focus() 
  	else 
        	alert(szErrMsg) 
}


var mywindow = null
function myopen(filename,windowname,properties) {

	var szErrMsg  = "\nIl Vostro Browser non e' stato in grado di aprire un'altra finestra "
        szErrMsg += "\nper visualizzare il documento richiesto.  Vi preghiamo di chiudere"
        szErrMsg += "\ntutte le finestre inutilizzate del browser , e riprovare." 
   
	if (mywindow) {
        	if (!mywindow.closed)    // if Pop window not closed 
                	mywindow.location.href = filename
        else 
        	mywindow = window.open(filename,windowname,properties);
	} else 
        	mywindow = window.open(filename,windowname,properties);
	
	if (mywindow) 
        	mywindow.focus() 
	else 
        	alert(szErrMsg) 	        
}	