I made the changes but I think the code is outdated because it does not work for me

Code:
case 'youtube':
correctSizes = _fitToViewport(movie_width,movie_height); // Fit item to viewport

movie = 'http://www.megavideo.com/v/'+grab_param('v',pp_images[setPosition]);
if(settings.autoplay) movie += "&autoplay=1";

toInject = settings.flash_markup.replace(/{width}/g,correctSizes['width']).replace(/{height}/g,correctSizes['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);
break;







and



function _getFileType(itemSrc){
if (itemSrc.match(/megavideo\.com/i)) {
return 'youtube';
someone help me to upgrade this code ?
Thanks