function lectureMetaData()
{	
	this.lectureMetaDataInit = function()
	{
	
	}

	this.updateMetaData = function(data)
	{
		if(data.Status==1)
		{
			var oldId = parseInt(windowID);
			$("form[name=lecture.updateLectureMetaData] input[name=ID_Lecture]").val(data.ID_Lecture);
			windowID = parseInt(data.ID_Lecture);
			
			// create/update menu
			var Enabled = parseInt($("form[name=lecture.updateLectureMetaData] input[name=Enabled]:first").attr("value"));
			if(isNaN(Enabled)) Enabled = 0;				
			var m = new main;
			m.clearSubMenu("lecture");
			m.addSubMenuItem("title", data.Title, null, "lecture")		
			m.addSubMenuItem("edit", lang.producer.editLecture.editLecture, "lecture.changeLectureWindowMode()", "lecture", 1);
			m.addSubMenuItem("enable", lang.producer.editLecture.lectureEnabled, "lecture.enableDisableLecture()", "lecture", Enabled);
			m.addSubMenuItem("delete", lang.producer.editLecture.deleteLecture, "lecture.deleteLecture()", "lecture");		
			m.showSubMenu("lecture");
			var title = document.title;
			var mainWinObj = findWindow("main");
			title = data.Title + " - " + title.substr(title.indexOf("-")+1).trim();
			mainWinObj.document.title = title;				
			
			if((oldId==0 || isNaN(oldId)) && (windowID>0 && !isNaN(windowID)))
			{
				// we have new lecture 		
				ID_Lecture = windowID;
				
				// init pages upload
				var lp = new lecturePages;
				lp.lecturePagesSwfUploadInit();
				
				// unload current list
				m.setCurrentWindowUrlAsDefault("lecturesList");
				m.unloadWindow("lecturesList");
				
				// update main window url
				m.updateWindowUrl("lecture", links.lecture.showLecture.replace("%ID_Lecture%", windowID));
				
			}
			else
			{
				// update lecture data on list
				try
				{
					var llWinObj = findWindow("lecturesList");
					var llObj = new llWinObj.lecturesList;
					llObj.updateLecture(data.ID_Lecture, data.Enabled, data.Title, data.Lecturer, data.Description);
				}
				catch(e)
				{
				}
			}
			
		}
	}
	
	this.publishUnpublishLecture = function(ID_Lecture, publish)
	{
		ID_Lecture = parseInt(ID_Lecture);
		if(isNaN(ID_Lecture) || ID_Lecture==0) return false
		
		if(publish==1) publish=1;
		else publish = 0;
		var postParams = new Object;
		postParams.Public = publish;
		postParams.ID_Lecture = ID_Lecture;

		$.post(links.producer.lecturePublish, postParams, function(data){
																   
		}, "json");
	}
	
}