            function gonder(){
$('#sonuc').slideDown('slow');
$("#sonuc").html('<img src="http://www.downloadvideo.net/resim/ajax.gif" />');
$.ajax({
type:'POST',
url:'http://www.downloadvideo.net/indir_vb.php',
data:$('#download').serialize(),
success:function(cevap){
    
    $("#sonuc").html(cevap)
}
})
}
 function gonderr(){
$('#sonucc').slideDown('slow');
$("#sonucc").html('<center><img src="http://www.downloadvideo.net/resim/ajax.gif" style="margin-top:3px;padding:20px;" alt="loading" /></center>');
$.ajax({
type:'POST',
url:'http://www.downloadvideo.net/indir.php',
data:$('#search').serialize(),
success:function(cevap){
    
    $("#sonucc").html(cevap)
}
})
}

/* Shows/Hides the requested element by ID */

function showHide(way,element) {
    
    if (way == 'show') {
        element.style.display = 'block';
    } else if (way == 'hide') {
        element.style.display = 'none';
    }
    
}

function startCountDown(i, p, type, video) {
    
    // store parameters
    var pause = p;
    var type = type;
    
    // make reference to divs
    var countdown_timer = document.getElementById("countdown_timer");
    var countdown_image = document.getElementById("countdown_image");
    
    // For element manipulation
    
    if (type == 'image') {
        var element = countdown_image;
    } else if (type == 'timer') {
        var element = countdown_timer;
    }
    
    // Show element
    showHide('show', element);
    
    element.count = function(i) {
        
        if (type == 'timer') {
            // write out count
            countdown_timer.innerHTML = 'Your video will start in ' + i + ' seconds';
        }
        
        if (i == 0) {
            // execute function
            loadVideo(video);
            // stop
            return;
        }
        
        setTimeout(function() {
            // repeat
            element.count(i - 1);
        },
        pause
        );
    }
    
    // set it going
    element.count(i);
    
}

function loadVideo(video) {
    
    // Load video
    
    var so = new SWFObject('http://downloadvideo.net/mediaplayer/player.swf','ply','605','400','9','#ffffff');
    so.addParam('allowfullscreen','true');
    so.addParam('allowscriptaccess','always');
    so.addParam('wmode','opaque');
    so.addVariable('file','http://www.youtube.com/watch%3Fv%3D' + video);
    so.addParam('wmode','opaque');
    so.addVariable('autostart','true');
    so.addVariable('backcolor','000000');
    so.addVariable('frontcolor','FFFFFF');
    so.addVariable('lightcolor','CCCC00');
    so.addVariable('shuffle','true');
    
    so.write('video');
    
    // Hide before load div
    document.getElementById('before_load').style.display = 'none';
    
    // Show video div
    document.getElementById('video').style.display = 'block';
    
}
