function editCMS(side, contentID, languageCode, documentLocationID)
{
	if(typeof documentLocationID != 'undefined') var locationIdAdd = '&documentLocationID=' + documentLocationID;
	else var locationIdAdd = '';
	
	cmsEditor = window.open('/xmlProcessing/producing/cmsHandling5.php?side=' + side + '&contentID=' + contentID + '&languageCode=' + languageCode + locationIdAdd,"cmsEdit",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=1030,height=552');
	cmsEditor.focus();	
}

function loadLocationDocumentContent(date, locationID, languageCode) {
	var scriptpath = "/xmlProcessing/inc/loadLocationDocumentContents.php?date=" + date + "&location=" + locationID + "&languageCode=" + languageCode + "&documentType=locationOfTheMonth&randomNumber=" + parseInt(Math.random() * 10000);
	var htmlhead = document.getElementsByTagName("head")[0];
	var script_id = "loadLocationDocumentContent";

	if(document.getElementById(script_id)) {
		htmlhead.removeChild(document.getElementById(script_id));
	}

	var updatescript = document.createElement("script");
	updatescript.id = script_id;
	updatescript.src = scriptpath;
	htmlhead.appendChild(updatescript);
}