// JavaScript Document
/**
 * Opens File Management window.
 *
 * @param   string      fileAdmin.php parameters
 * @param   string      form name
 * @param   string      field name
 * @param   string      edit type - date/timestamp
 */
function openWindow(file,name,w,h) {
	var myWidth = 0, myHeight = 0;
	var xPos = 0, yPos = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	xPos = (myWidth-w) / 2;
	yPos = (myHeight-h) / 2;
	neuesFenster=window.open(file,name,'resizable=no,width='+w+',height='+h+',left='+xPos+',top='+yPos+',toolbar=no,scrollbars=no,status=0');
	neuesFenster.focus();
}

function closeWindow(){
    opener.location.reload(true);
    self.close();
}