// file:	openwin.js
// author: 	Bernd Abb
// descr: 	Window Functions
// date:    02/2001	
// copyright (c) 2001 by Electric Umbrella GmbH

var myWinFirst=null;

function openWin(url)
	{
	eval("openWinSized('" + url + "','480','380')");
	}

function openWinSized(url,Width,Height)
	{
	/*if((navigator.platform.indexOf("Mac")!=-1) &&
	   (navigator.userAgent.indexOf("MSIE")!=-1))
		{
		Width = Width - 20;
		Height = Height + 20;
		}*/
	closeWin();
	callOpenWin1 = "openWin1('" + url + "','" + Width + "','" + Height + "')";
	// callOpenWin1 = "openWinDebug('" + url + "','" + Width + "','" + Height + "')";
	setTimeout(callOpenWin1,100);
	}

function openWin1(url,Width,Height)
	{
	eval("myWinFirst=window.open(url,'myWinFirst','toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + Width + ",height=" + Height +"')");
	myWinFirst.focus();
	}
	
function openWinDebug(url,Width,Height)
	{
	eval("myWinFirst=window.open(url,'myWinFirst','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=no,resizable=yes,width=" + Width + ",height=" + Height +"')");
	}

function openWinSized2(url,Width,Height)
	{
	if((navigator.platform.indexOf("Mac")!=-1) &&
	   (navigator.userAgent.indexOf("MSIE")!=-1))
		{
		Width = Width + 20;
		Height = Height + 20;
		}
	closeWin();
	callOpenWin2 = "openWin2('" + url + "','" + Width + "','" + Height + "')";
	setTimeout(callOpenWin2,100);
	}
	
function openWin2(url,Width,Height)
	{
	eval("myWinFirst=window.open(url,'myWinFirst','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + Width + ",height=" + Height +"')");
	}
		

function closeWin()
	{
		if( myWinFirst!=null && !myWinFirst.closed )
		{
			myWinFirst.close();
			myWinFirst=null;
		}
	}

