win_open(href,name,w,h) {
    var nw= window.open(href,'no'+name,'resizable=yes,scrollbars=yes,width='+w+',height='+h+',screenX='+((screen.availWidth-w) / 2)+',screenY='+((screen.availHeight-h) / 2));
    if(!nw.opener) nw.opener= self;
    nw.focus();
}

function win_open_handle(href,name,w,h) {
    var nw= window.open(href,'no'+name,'resizable=yes,scrollbars=yes,width='+w+',height='+h+',screenX='+((screen.availWidth-w) / 2)+',screenY='+((screen.availHeight-h) / 2));
    if(!nw.opener) nw.opener= self;
    nw.focus();
    return nw;
}

function win_open_attrib(href,name,w,h,fav,loc,sc,st,sy) {
    var nw= window.open(href,name,'width='+w+',height='+h+',scrollbars='+sc+',status='+st
                                  + ',toolbar='+sy+',location='+loc+',resizable=yes');
    if(!nw.opener) nw.opener= self;
    nw.focus();
}

function parseSearch()
{
	var searchList = String(document.location.search.substr(1)).split("&");
	var searchArray = new Array();
	for( var i = 0; i < searchList.length; i++)
	{
		var name = searchList[i].split("=");
		if(name.length)
			searchArray[unescape(name[0])] = unescape(name[1]);
	}//if
	return searchArray;
}

function openDownload(mediaId)
{
	var adresse = "textDownload.jsp?sid=" + sSessionId + "&id=" + mediaId;
	var textfenster = window.open(adresse,"textWin","resize,width=430,height=280,menubar");
	textfenster.focus();
}

function openWindow(url,title, prop, width, height)
{
	if (width == null) width=500;
	if (height == null) height=400;
	prop = (prop == null) ? "" : ","+prop;
	var textfenster = window.open(url,title,"width=" + width + ",height=" + height + prop);
	textfenster.focus();
}

