function getVideoCourseId(courseID, url){
    var video_course_category_id = $('#video_course_category_id').val();
    if(video_course_category_id !== ''){
        if(courseID !== ''){
            var formdata = new FormData();
            formdata.append("video_course_id", courseID);

            $.ajax({
                url: url,
                type: "POST",
                data: formdata,
                contentType: false,
                cache: false,
                processData: false,
                success: function (data)
                {
                    $('#upload_video_section1').html(data);
                }
            });
        }
    }
}

function addMoreVideoSection(url){
    var video_course_category_id = $('#video_course_category_id').val();
    var video_course_id = $('#video_course_id').val();
    
    if(video_course_category_id !== ''){
        if(video_course_id !== ''){
            
            $.ajax({
                url: url,
                type: "POST",
                contentType: false,
                cache: false,
                processData: false,
                success: function (data)
                {
                    var sectionCounter = 1;
                    var div1 = document.createElement('div');
                    var previous_div = documentID('upload_video_section' + sectionCounter);
                    ++sectionCounter;
                    div1.id = 'upload_video_section' + sectionCounter;
                    previous_div.appendChild(div1);
                    div1.innerHTML = data;
                }
            });
        }
    }
}

function addMoreVideo(url){
    var video_course_category_id = $('#video_course_category_id').val();
    var video_course_id = $('#video_course_id').val();
    
    if(video_course_category_id !== ''){
        if(video_course_id !== ''){
            
            $.ajax({
                url: url,
                type: "POST",
                contentType: false,
                cache: false,
                processData: false,
                success: function (data)
                {
                    var videoCounter = 1;
                    var sectionCounter = 1;
                    var parentDiv = documentID('upload_video_section' + sectionCounter);
                    var div1 = document.createElement('div');
                    ++videoCounter;
                    div1.id = 'upload_video_area' + sectionCounter + '_video' + videoCounter;
                    div1.setAttribute('class', 'col-sm-12 form-group');
                    parentDiv.appendChild(div1);
                    div1.innerHTML = data;
                }
            });
        }
    }
}