function doOpenLink(type,KeyOrPath,HowToOpen,NewWinInfo, fehlerMeldung) {
	if(HowToOpen=='1' && window.name=='PersonalUserArea') HowToOpen='2';

	var target='';
	var noFSappendix='';
	if( type=='EXT'){
		target=KeyOrPath;
	}else
	{
		for (var i=0;i<LinksInfo.length;i++) {
			if (LinksInfo[i][0]==KeyOrPath) {
				if( HowToOpen=='1' || HowToOpen=='3'){target=LinksInfo[i][1];} else {target=LinksInfo[i][2];}
				break;
			}
		}
		noFSappendix='&NOFS=1';
		target = target.replace('&amp;','&');
	}

	if (target!='') {
		if( target.indexOf('#directorypath#')==0 ){
			target='../..'+target.substring(15, String(target).length);
		}
		switch(HowToOpen) {
			case('2') : // Same Frame without Navigation
				document.location.href=target+noFSappendix;
				break;
			case('3') : // New browserwindow with Navigation
				window.open(target,'_blank','');
				break;
			case('4') : // New browserwindow without Navigation
				window.open(target+noFSappendix,'_blank','');
				break;
			case('5') : // New window without Navigation
				window.open(target+noFSappendix,'_blank',NewWinInfo);
				break;
			default:   // =='1'    Same Window with Navigation
				top.document.location.href=target;
				break;
		}
	} else {
		alert(fehlerMeldung);
	}
}

function linkopenwindow(link, window_width, window_height, windowstatus) {
	stat=windowstatus+',width='+window_width+',height='+window_height;
	MsgBox=window.open(link,'_',stat);
	horizontal_pos = Math.round( (screen.availWidth-window_width)/2 );
	vertical_pos = Math.round( (screen.availHeight-window_height)/2 );
	window.MsgBox.moveTo(horizontal_pos,vertical_pos);
}

