openWindow = function(){
	/*
	** argument 0  : pPage			(filename)
	** argument 1  : isModal		(true/false)
	** argument 2  : pTitle 		(title of the pop-up)
	** argument 3  : pWidth			(width)
	** argument 4  : pHeight 		(height)
	** argument 5  : pScrolling		(1/0)
	** argument 6  : pResize 		(1/0)
	** argument 7  : pStatus 		(1/0)
	** argument 8  : pHistory		(1/0)
	** argument 9  : pDirectories	(1/0)
	** argument 10 : pToolbar		(1/0)
	** argument 11 : pMenubar		(1/0)
	** Speciaal voor IE en showModalDialog
	** argument 12 : pTop			(top position)
	** argument 13 : pLeft			(left position)
	** argument 14 : pCenter		(yes/no)
	** argument 15 : pEdge			(raised/sunken)
	** argument 16 : pHelp			(1/0)
	*/
	if(arguments[0]!=null && arguments[0]!=''){
		pPage 			= arguments[0];
		isModal 		= (arguments[1]!=null  && typeof(arguments[1])=='boolean') 	? arguments[1] 				: false;
		pTitle			= (arguments[2]!=null  && typeof(arguments[2])=='string')  	? arguments[2] 				: '';
		pWidth			= (arguments[3]!=null  && typeof(arguments[3])=='number')  	? parseInt(arguments[3]) 	: 320;
		pHeight			= (arguments[4]!=null  && typeof(arguments[4])=='number')  	? parseInt(arguments[4]) 	: 240;
		pScrolling 		= (arguments[5]!=null  && typeof(arguments[5])=='number')  	? parseInt(arguments[5]) 	: 0;
		pResize 		= (arguments[6]!=null  && typeof(arguments[6])=='number')  	? parseInt(arguments[6]) 	: 0;
		pStatus 		= (arguments[7]!=null  && typeof(arguments[7])=='number')  	? parseInt(arguments[7]) 	: 0;
		pHistory 		= (arguments[8]!=null  && typeof(arguments[8])=='number') 	? parseInt(arguments[8]) 	: 0;
		pDirectories	= (arguments[9]!=null  && typeof(arguments[9])=='number') 	? parseInt(arguments[9]) 	: 0;
		pToolbar		= (arguments[10]!=null && typeof(arguments[10])=='number')  ? parseInt(arguments[10]) 	: 0;
		pMenubar		= (arguments[11]!=null && typeof(arguments[11])=='number')  ? parseInt(arguments[11]) 	: 0;
		pTop			= (arguments[12]!=null && typeof(arguments[12])=='number')  ? parseInt(arguments[12]) 	: 0;
		pLeft			= (arguments[13]!=null && typeof(arguments[13])=='number')  ? parseInt(arguments[13]) 	: 0;
		pCenter			= (arguments[14]!=null && typeof(arguments[14])=='number')  ? parseInt(arguments[14]) 	: 0;
		pEdge			= (arguments[15]!=null && typeof(arguments[15])=='string')  ? arguments[15]				: 'sunken';
		pHelp			= (arguments[16]!=null && typeof(arguments[16])=='number')  ? parseInt(arguments[16]) 	: 0;
		if(isModal && window.showModalDialog){
			pFeatures  = 'dialogHeight:'+pHeight+'px';
			pFeatures += ';dialogWidth:'+pWidth+'px';
			if(!pCenter){
				pFeatures += ';dialogTop:'+pTop+'px';
				pFeatures += ';dialogLeft:'+pLeft+'px';
			}else{				
				pFeatures += ';dialogTop:px';
				pFeatures += ';dialogLeft:px';
			}
			pFeatures += ';center:'+pCenter;
			pFeatures += ';edge:'+pEdge;
			pFeatures += ';help:'+pHelp;
			pFeatures += ';status:'+pStatus;
			pFeatures += ';resizable:'+pResize;
			popupWindow = window.showModalDialog(pPage,'',pFeatures);
			if(popupWindow!=true){
				alert('Wellicht heeft u een popup-blocker geïnstalleerd!');
				return false;
			}			
		}else{
			pFeatures  = 'width='+pWidth;
			pFeatures += ',height='+pHeight;
			pFeatures += ',scrollbars='+pScrolling;
			pFeatures += ',resizable='+pResize;
			pFeatures += ',status='+pStatus;
			pFeatures += ',history='+pHistory;
			pFeatures += ',directories='+pDirectories;
			pFeatures += ',toolbar='+pToolbar;
			pFeatures += ',menubar='+pMenubar;
			if(isModal) pFeatures += ',modal=1';
			popupWindow = window.open(pPage,pTitle,pFeatures);
			if(!popupWindow){
				alert('Wellicht heeft u een popup-blocker geïnstalleerd! Script gestopt!');
				return false;
			}else{		
				if (window.focus){
					popupWindow.focus();
				}else{
					return false;
				}
			}			
		}
	}else{
		return false;
	}
}

/*
NB: iedere pop-up pagina moet de volgende code hebben

<script type="text/javascript">
	returnValue = true;
</script>
*/
