function OpenPopUpModal(m_URL, m_width, m_height ) {

	if (isIE){
		  args = "dialogWidth: " + m_width + "px; " 
    		+ "dialogHeight: " + m_height + "px; " 
	    	+ "center: yes; "
			+ "resizable: yes; "  
			+ "help: no; "
			+ "scroll: no; "
			+ "unadorned: no;"
			+ "status: no; ";
			
		risposta = window.showModalDialog(m_URL,"",args);
		//alert("Risposta dalla finesta Modale:" + risposta);
    	return risposta;
	}
	
	if (isNS){
		xposition = (screen.width - m_width) / 2; 
	  	yposition = (screen.height - m_height) / 2; 
	
	  	args = 	"scrollbars=no, "  
			+ "dependent=yes, " 
			+ "width= " + m_width + ", " 
    		+ "height= " + m_height + ", " 
			+ "left= " + xposition + ", "
			+ "top= " + yposition ;
	
		risposta=window.open(m_URL,"",args);
	}
}


function OpenPopUpModalWithScroll(m_URL, m_width, m_height ) {
	if (isIE){
		 args = "dialogWidth: " + m_width + "px; " 
    		+ "dialogHeight: " + m_height + "px; " 
	    	+ "center: yes; "
			+ "resizable: yes; "  
			+ "help: no; "
			+ "scroll: yes; "
			+ "unadorned: no;"
			+ "status: no; ";
			
		risposta = window.showModalDialog(m_URL,"",args);
//		alert("Risposta dalla finesta Modale:" + risposta);
    	return risposta;
	}
	
	
	if (isNS){
		xposition = (screen.width - m_width) / 2; 
	  	yposition = (screen.height - m_height) / 2; 
	  	args = 	"scrollbars=yes, "  
			+ "dependent=yes, " 
			+ "width= " + m_width + ", " 
    		+ "height= " + m_height + ", " 
			+ "left= " + xposition + ", "
			+ "top= " + yposition ;
		risposta=window.open(m_URL,"",args);
		//alert("Netscape risposta: " + risposta);
	}
}



function OpenPopUp(m_URL, m_width, m_height ) {
		xposition=0; yposition=0; 
	    if ((parseInt(navigator.appVersion) >= 4 ) ){ 
    	    xposition = (screen.width - m_width) / 2; 
	        yposition = (screen.height - m_height) / 2; 
    	} 

	    args = 'height= ' + m_height 
			+ ' ,width= ' + m_width
			+ ' ,left= ' + xposition
			+ ' ,top = ' + yposition
			+ ' ,channelmode= no'
			+ ' ,directories =no'
			+ ' ,fullscreen = no'
			+ ' ,location = no'
			+ ' ,menubar = no'
			+ ' ,resizable = yes'
			+ ' ,scrollbars = no'
			+ ' ,status= no'
			+ ' ,titlebar= yes'
			+ ' ,toolbar = no'; 

		risposta = window.open(m_URL,"",args);
    	return risposta;
	}

function OpenPopUpWithScroll(m_URL, m_width, m_height ) {
		xposition=0; yposition=0; 
	    if ((parseInt(navigator.appVersion) >= 4 ) ){ 
    	    xposition = (screen.width - m_width) / 2; 
	        yposition = (screen.height - m_height) / 2; 
    	} 

	    args = 'height= ' + m_height 
			+ ' ,width= ' + m_width
			+ ' ,left= ' + xposition
			+ ' ,top = ' + yposition
			+ ' ,channelmode= no'
			+ ' ,directories =no'
			+ ' ,fullscreen = no'
			+ ' ,location = no'
			+ ' ,menubar = no'
			+ ' ,resizable = yes'
			+ ' ,scrollbars = yes'
			+ ' ,status= no'
			+ ' ,titlebar= yes'
			+ ' ,toolbar = no'; 

		risposta = window.open(m_URL,"",args);
    	return risposta;
	}




function OpenPopUpNameWithScroll(m_name, m_URL, m_width, m_height ) {
		xposition=0; yposition=0; 
	    if ((parseInt(navigator.appVersion) >= 4 ) ){ 
    	    xposition = (screen.width - m_width) / 2; 
	        yposition = (screen.height - m_height) / 2; 
    	} 

	    args = 'height= ' + m_height 
			+ ' ,width= ' + m_width
			+ ' ,left= ' + xposition
			+ ' ,top = ' + yposition
			+ ' ,channelmode= no'
			+ ' ,directories =no'
			+ ' ,fullscreen = no'
			+ ' ,location = no'
			+ ' ,menubar = no'
			+ ' ,resizable = yes'
			+ ' ,scrollbars = yes'
			+ ' ,status= no'
			+ ' ,titlebar= yes'
			+ ' ,toolbar = no'; 

		risposta = window.open(m_URL,m_name,args);
    	return risposta;
	}


function OpenPopUpName(m_name, m_URL, m_width, m_height ) {

        
        
		xposition=0; yposition=0; 
	    if ((parseInt(navigator.appVersion) >= 4 ) ){ 
    	    xposition = (screen.width - m_width) / 2; 
	        yposition = (screen.height - m_height) / 2; 
    	} 

	    args = 'height= ' + m_height 
			+ ' ,width= ' + m_width
			+ ' ,left= ' + xposition
			+ ' ,top = ' + yposition
			+ ' ,channelmode= no'
			+ ' ,directories =no'
			+ ' ,fullscreen = no'
			+ ' ,location = no'
			+ ' ,menubar = no'
			+ ' ,resizable = no'
			+ ' ,scrollbars = no'
			+ ' ,status= no'
			+ ' ,titlebar= yes'
			+ ' ,toolbar = no'; 

		risposta = window.open(m_URL,m_name,args);
    	return risposta;
	}




function OpenPopUpFull(m_URL, m_width, m_height ) {
	
		// per centrare la finesta
		xposition=0; yposition=0; 
	    if ((parseInt(navigator.appVersion) >= 4 ) ){ 
    	    xposition = (screen.width - m_width) / 2; 
	        yposition = (screen.height - m_height) / 2; 
    	} 

	    args = 'height= ' + m_height 
			+ ' ,width= ' + m_width
			+ ' ,left= ' + xposition
			+ ' ,top = ' + yposition
			+ ' ,channelmode= no'
			+ ' ,directories =no'
			+ ' ,fullscreen = yes'
			+ ' ,location = no'
			+ ' ,menubar = no'
			+ ' ,resizable = yes'
			+ ' ,scrollbars = no'
			+ ' ,status= no'
			+ ' ,titlebar= yes'
			+ ' ,toolbar = no'; 

		window.open(m_URL,"",args);
	}


function OpenPopUpModalFull(m_URL, m_width, m_height ) {
		xposition=0; yposition=0; 
	    if ((parseInt(navigator.appVersion) >= 4 ) ){ 
    	    m_width = screen.width; 
	        m_height = screen.height; 
    	} 

	    args = "dialogWidth: " + m_width + "px; " 
    		+ "dialogHeight: " + m_height + "px; " 
	    	+ "dialogLeft: 0; "
	    	+ "dialogTop: 0; "
	    	+ "center: yes; "
			+ "resizable: no; "  
			+ "help: no; "
			+ "scroll: no; "
			+ "unadorned: no;"
			+ "status: no; ";
			
		risposta = window.showModalDialog(m_URL,"",args);
		//alert("Risposta dalla finesta Modale:" + risposta);
    	return risposta;
	}

