function DeleteYoutubeQuestion(url)
{
	if( confirm( "Wollen Sie dieses Video wirklich löschen?" ) == true )
	{
		callUrlReload(url);
	}
}
var activeTimeout = new Array();

function disappear(d_id) {
	if( activeTimeout[d_id] != null ) {
		clearTimeout(activeTimeout);
	}
	activeTimeout[d_id] = setTimeout("closediv('"+d_id+"')",200);
}
function closediv(d_id){
	object = document.getElementById(d_id);
	if(object.style.visibility){
		object.style.visibility="hidden";
	}
	else{
		object.style.display='none';
	}
}
function reappear(d_id) {
	if( activeTimeout[d_id] ) {
		clearTimeout( activeTimeout[d_id] );
		activeTimeout[d_id] = null;
	}
	var object = document.getElementById(d_id);

	if(object.style.visibility){
		object.style.visibility="visible";
	}
	else{
		object.style.display='block';
	}
}

function cms_windowopen(url,name,width,height,pvpDir)
{
	if(pvpDir && pvpDir != ''){
		var opener = window.open(pvpDir+'/administration'+url,name,'locationbar=no,menubar=no,status=no,width='+width+',height='+height+',resizable=yes,dependent=yes,scrollbars=yes').focus();
	}else{
		var opener = window.open('/administration'+url,name,'locationbar=no,menubar=no,status=no,width='+width+',height='+height+',resizable=yes,dependent=yes,scrollbars=yes').focus();
	}
}

function cms_onlinewindowopen(url,name,width,height,pvpDir)
{
	if(pvpDir && pvpDir != ''){
		var opener = window.open(pvpDir+url,name,'locationbar=no,menubar=no,status=no,width='+width+',height='+height+',resizable=yes,dependent=yes,scrollbars=yes').focus();
	}else{
		var opener = window.open(url,name,'locationbar=no,menubar=no,status=no,width='+width+',height='+height+',resizable=yes,dependent=yes,scrollbars=yes').focus();
	}
}

function cms_popupwindowopen(url,name,width,height,pvpDir)
{
	if(pvpDir && pvpDir != ''){
		url = pvpDir + url;
	}
	if(url.indexOf('?') > 0) {
		tURL = url+'&REF=popup'
	}
	else {
		tURL = url+'?REF=popup';
	}
	var opener = window.open(tURL,name,'locationbar=no,menubar=no,status=no,width='+width+',height='+height+',resizable=yes,dependent=yes,scrollbars=yes').focus();
}
function cms_refwindowopen(url,ref,name,width,height)
{
	if(url.indexOf('?') > 0) {
		tURL = url+'&REF='+ref;
	}
	else {
		tURL = url+'?REF='+ref;
	}
	var opener = window.open(tURL,name,'locationbar=no,menubar=no,status=no,width='+width+',height='+height+',resizable=yes,dependent=yes,scrollbars=yes').focus();
}
function DeleteCategoryQuestion(url)
{
	if( confirm( "Wollen Sie diese Kategorie wirklich löschen?" ) == true )
	{
		cms_windowopen(url,'categoryedit',100,10, pvpDir)
	}
}
function ArchiveArticleQuestion(url, pvpDir)
{
 	if( confirm( "Wollen Sie diesen Artikel wirklich archivieren?" ) == true )
	{
		cms_windowopen(url,'articleedit',100,10, pvpDir)
	}
}
function DeleteArticleQuestion(url)
{
	if( confirm( "Wollen Sie diesen Artikel wirklich löschen?" ) == true )
	{
		callUrlReload(url);
		//cms_windowopen(url,'articleedit',100,10, pvpDir)
	}
}
function UnpublishArticleQuestion(url)
{
	if( confirm( "Soll der Artikel wirklich unsichtbar geschaltet werden?" ) == true )
	{
		callUrlReload(url);
		//cms_windowopen(url,'articleedit',100,10, pvpDir)
	}
}
function DeleteEventQuestion(url, pvpDir)
{
 	if( confirm( "Wollen Sie diese Veranstaltung wirklich löschen?" ) == true )
	{
		cms_windowopen(url,'eventedit',100,10, pvpDir)
	}
}
function UnpublishEventQuestion(url, pvpDir)
{
 	if( confirm( "Soll diese Veranstaltung wirklich unsichtbar geschaltet werden?" ) == true )
	{
		cms_windowopen(url,'eventedit',100,10, pvpDir)
	}
}
function UnpublishPartnerQuestion(url, pvpDir)
{
 	if( confirm( "Sollen Ihre Präsentationsdaten wirklich unsichtbar geschaltet werden?" ) == true )
	{
		cms_windowopen(url,'partneredit',100,10, pvpDir)
	}
}

function cms_externalFullWindowOpen(url,name,width,height)
{
	var newWindow = window.open(url,name,"location=yes,locationbar=yes,menubar=yes,status=yes,width="+width+",height="+height+",resizable=yes,dependent=yes,scrollbars=yes" );
	newWindow.focus();
}


var externerLinkText = "Externer Link";
	var textNeuesFenster = "(neues Fenster)";
	function titleAnpassen(linkObjekt) {
	  if (linkObjekt.getAttribute) {
	    textAlt = linkObjekt.getAttribute("title");
	    if(textAlt && textAlt.indexOf(textNeuesFenster) == -1) {
	      textZusatz = textAlt.substring((textAlt.indexOf(externerLinkText)) + externerLinkText.length, textAlt.length);
	      linkObjekt.setAttribute("title", externerLinkText + " " + textNeuesFenster + textZusatz);
	    }
	  }
	}
