function assignNews(slot,articleID)
{
	changeLog.value+=makeUpdateString("tcom_newsSlots","articleID",slot,articleID)
	redirectURL.value="index.aspx?page=cms&cms=15"
	btnSubmit.click()	
}
function endAccount()
{
	if(prompt('Wollen Sie ihre Mitgliedschaft wirklich beenden, dann tippen Sie nun ja ein.','Nein')=='ja'){window.location='index.aspx?page=1&terminateAccount=1'}
}
function addFileAss(pageID,dFileName)
{
	changeLog.value+=makeInsertString("tcom_pagesDocuments","pageID,documentFileName",pageID+"','"+dFileName)
	btnSubmit.click()
}
function addHR(pageID)
{
	changeLog.value+=makeInsertString("tcom_articles","pageID,templateID,designation",pageID+"','99','Trennlinie")
	btnSubmit.click()
}
function addDoubleColumnBatch(pageID)
{
	changeLog.value+=makeInsertString("tcom_articles","pageID,templateID,designation",pageID+"','24','Zweispaltig: Linke Spalte ab hier")
	changeLog.value+=makeInsertString("tcom_articles","pageID,templateID,designation",pageID+"','25','Zweispaltig: Rechte Spalte ab hier")
	changeLog.value+=makeInsertString("tcom_articles","pageID,templateID,designation",pageID+"','26','Zweispaltig: Ende")
	btnSubmit.click()
}
function newSubLink(linkID,menuID)
{
	changeLog.value+=makeInsertString("tcom_menuLinks","menuID,ChildOf",menuID+"','"+linkID)
	btnSubmit.click()	
}
function addExistingTeaser(pageID,columnID)
{
	changeLog.value+=makeInsertString("tcom_teasersPages", "pageID,columnID",pageID+"','"+columnID)
	btnSubmit.click()	
}
function generateHyperlink(txt,lnk,nw)
{
	return("<a href='" + lnk + "'"+nw+ ">" + txt + "</a>")	
}
var lastRcmc
var rcmcDisplayed = false
function categoryContext(rcmc)
{
	if(!rcmcDisplayed)
	{
		showContext(rcmc)
	}
	else
	{
		hideContext()
	}
}
function showContext(rcmc)
{
	var popUpMenu = document.getElementById('rightClickMenu'+rcmc)
	popUpMenu.style.visibility='visible'
	popUpMenu.style.top = event.clientY + document.body.scrollTop -5
	popUpMenu.style.left = event.clientX + document.body.scrollLeft-5
	rcmcDisplayed = true
	lastRcmc=rcmc
	return(false)	
}
function hideContext()
{
	var popUpMenu = document.getElementById('rightClickMenu'+lastRcmc)
	rcmcDisplayed = false
	popUpMenu.style.visibility='hidden'
}
function promoteCategory(aid,promoteTo)
{
	changeLog.value+=makeUpdateString("tcom_categories","chilfOf",aid,promoteTo)	
	btnSubmit.click()
}
function forum_setCode() 
{
         if (document.selection && document.selection.createRange().text != '') document.selection.createRange().text = '[code]'+document.selection.createRange().text+'[/code]';
}
function forum_setItalic() 
{
         if (document.selection && document.selection.createRange().text != '') document.selection.createRange().text = '[i]'+document.selection.createRange().text+'[/i]';
}
function forum_setBold() 
{
         if (document.selection && document.selection.createRange().text != '') document.selection.createRange().text = '[b]'+document.selection.createRange().text+'[/b]';
}
function forum_makeLink()
{
	if (document.selection && document.selection.createRange().text != '') 
		{
			var hrf = window.showModalDialog('makeLink.html','','dialogHeight: 100px; dialogWidth: 400px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No;')
			if(hrf!='')
			{
				document.selection.createRange().text = '[link:'+hrf+']'+document.selection.createRange().text+'[/link]';
			}
		}
}
function openPopup(url)
{
	var popup = window.open(url,"Popup","left=200,top=15,resizable=yes,width=500,height=500")
}
function scrollToTop()
{
 window.scroll(0,0); 
}