function openWin(theURL,winName,width,height)
{
    var X = (screen.width - width) / 2;
    var Y = (screen.height - height) / 2;
    properties =
    	"toolbar=no,location=no,directories=no,status=no,"+
    	"scrollbars=yes,resizable=no,copyhistory=no,"+
    	"width="+width+",height="+height+",";

    checkie = navigator.appName.indexOf("icrosoft");
    if (checkie == -1)
		properties = properties+"screenX="+X+",screenY="+Y;
    else
		properties = properties+"left="+X+",top="+Y;

	var win=window.open(theURL,winName,properties);
	return win;
}

function openGalleryWin(theURL,winName,width,height)
{
    var X = (screen.width - width) / 2;
    var Y = (screen.height - height) / 2;
    properties =
    	"toolbar=no,location=no,directories=no,status=no,"+
    	"scrollbars=no,resizable=no,copyhistory=no,"+
    	"width="+width+",height="+height+",";

    checkie = navigator.appName.indexOf("icrosoft");
    if (checkie == -1)
		properties = properties+"screenX="+X+",screenY="+Y;
    else
		properties = properties+"left="+X+",top="+Y;

	var win=window.open(theURL,winName,properties);
	return win;
}

function openWindow(theURL,winName) {
	return openWin(theURL,winName,300,200);
}

function openSmallWindow(theURL,winName) {
	return openWin(theURL,winName,200,150);
}

function openWideWindow(theURL,winName) {
	return openWin(theURL,winName,450,380);
}

function openGalleryWindow(theURL,winName) {
	return openGalleryWin(theURL,winName,500,550);
}

function openTimeLineWindow(projectId,month,year)
{
	url='ssp.php3?template=projekt_kalender_zeitleisten&projectid='+projectId+'&month='+month+'&year='+year;
	return openWin(url,'timelines',600,200);
}

function openChatWindow() {
	return openWin('chat/chat-index.html','chat',500,400);
}

function openLinkWindow(url) {
	day = new Date();
	id = day.getTime();
	return window.open(url,'id','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600');
}

function openSitemapWindow(url) {
	opener.location.href=url;
}

function confirmDeleteAction ()  {
	userConfirm = confirm("Damit löschen Sie diesen Datensatz endgültig.\n\tSind Sie sicher?");
		if( userConfirm )
			return true;
		else
			return false;
}


