function _confirm(url)
{
  var answer = confirm ("Are you sure?");
  if (!answer) {}
  else { window.location = url; }

}

function system_msg(value)
{
	if(value)
	document.getElementById('systemMsg').innerText = document.getElementById('systemMsg').textContent = value;
}

function getSubCourses(lang)
{
	var CourseID = $('#courses').val();
	var url = 'subcourse.php?';
	var pars = 'id_course=' + CourseID + '&lang=' + lang;

	$.ajax({
		  url: url,
		  dataType: 'json',
		  data: pars,
		  success: GetSubCourses
	});
}

function GetSubCourses(data)
{		
	$('#subcourses').empty();	
	$.each(data, function(key,object){				
		$('#subcourses').append('<option value="' + object.key + '">' + object.val + '</option>');		
    });	
}
