//function EmbedFlash(videopath, width, height)
//{  
//    document.write( "<object type=\"application/x-shockwave-flash\" data=\"../../layouts/haugaard/FlashPlayer/FlowPlayerWhite.swf\" width=\"" + width + "\" height=\"" + height + "\" id=\"FlowPlayer\" >");
//    document.write( "<param name=\"allowScriptAccess\" value=\"sameDomain\" />");
//    document.write( "<param name=\"movie\" value=\"../../layouts/haugaard/FlashPlayer/FlowPlayerWhite.swf\" />");
//    document.write( "<param name=\"quality\" value=\"high\" />");
//    document.write( "<param name=\"scale\" value=\"noScale\" />");
//    document.write( "<param name=\"wmode\" value=\"transparent\" />");
//    document.write( "<param name=\"flashvars\" value=\"config={videoFile:'" + videopath + "', loop:false, autoPlay:true, showFullScreenButton:false, showMenu:false}\" />");
//    document.write( "</object>");
//}

function EmbedFlash(videopath, imagepath, target, width, height)
{  

var so = new SWFObject('/layouts/haugaard/FlashPlayer/mediaplayer.swf','mpl',width,height,'8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('width',width);
so.addVariable('height',height);
so.addVariable('file','' + videopath);
so.addVariable('image','' + imagepath);
so.addVariable('displayheight',height);
so.addVariable('displaywidth',width);
so.addVariable('javascriptid','jstest');
so.addVariable('enablejs','true');
so.addVariable('type', 'flv');
so.write(target);


 
}


