function openWin(URL,width,height,left,top,scroll,resize, status, menubar, toolbar, location, directories) {
	noUrl = false	
	if (URL == "" || URL == null) { URL="about:blank"; noUrl=true }
	if (width == "" || width == null ) { width = 470 }
	if (height == "" || height == null ) { height = 255 }
	if (left == "" || left == null ) { left = (screen.availWidth - width)/2 }
	if (top == "" || top == null ) { top = (screen.availHeight - height)/2 }
	if (width == "*" ) { 
		width = (screen.availWidth * (100/99)) ;
		if (width > 800) width="800"; //since the site isn't wider than 800px, there's no point in opening in fullscreen mode, it just looks silly!
	}
	if (height == "*" ) { 
	height =  (screen.availHeight * (100/95));
		if (height > 580) height="580";//since the site isn't taller than 800px, there's no point in opening in fullscreen mode, it just looks silly!
	}
	if (scroll == "" || scroll == null ) { scroll = 0 }
	if (resize == "" || resize == null ) { resize = 1 }
	if (status == "" || status == null ) { status = 0 }
	if (menubar == "" || menubar == null) {menubar=0}
	if (toolbar == "" || toolbar == null) {toolbar=0}
	if (location == "" || location == null) {location=0}
	if (directories == "" || directories == null) {directories=0}
	
	PARMS = 'toolbar='+toolbar +',location='+location +',directories='+directories +',status='+status +',menubar='+menubar +',scrollbars=' + scroll + ',resizable=' + resize + ',width=' + width + ',height=' + height+ ',left=' + left + ',top=' + top
	
  var newWin = window.open(URL,"InsertImage",PARMS);
	/* newWin.screenX = 0;
  newWin.screenY = 0; */
	if (noUrl) {
		newWin.document.writeln("<BR><BR><FONT color='red'>It seems like you forgot to put in a value for URL when you called for <I>openWin()</I></FONT>")
		newWin.document.close()
	}
	newWin.focus()	
	return;
}
