//globals
NS=(document.layers)?true:false
IE=(document.all)?true:false
NS6=(navigator.userAgent.indexOf('Gecko')>0)?true:false;
newwin=false

function openWin(url,width,height,xPosProzent,yPosProzent,toolbar,scrollbars,resizable) {
	//,xPosProzent,yPosProzent,toolbar,scrollbars,resizable
	
	//if (navigator.userAgent.indexOf('Mac')) return true
	if (newwin) {if (!newwin.closed) newwin.close()}

	if (isnull(width))			width      = 650 // (default)
	if (isnull(height))			height     = 400 // (default)
	if (isnull(xPosProzent))	xPosProzent=  50 // (default)
	if (isnull(yPosProzent))	yPosProzent=  50 // (default)
	if (isnull(scrollbars))		scrollbars =   0 // (default)
	if (isnull(toolbar))		toolbar	   =   0 // (default)
	if (isnull(resizable))		resizable  =   0 // (default)

	var x=(screen.width -width )*xPosProzent/100
	var y=(screen.height-height)*yPosProzent/100

	var paras="resizable="+resizable+",scrollbars="+scrollbars+",toolbar="+toolbar+",menubar=0,location=0,status=0,directories=0,width="+width+",height="+height
	if(NS) newwin=window.open(url,"fss",paras+",screenX="+x+",screenY="+y)
	else{newwin=window.open(url,"fss",paras); 
	if (url.substr(0,7)!='http://') newwin.moveTo(x,y)
	}

	//if (url.substr(0,7)!='http://') newwin.focus()
	//return false;
}
function isnull(variable){ if(NS || NS6) return (variable==undefined);if(IE) return (variable==null);return false; }
