//var URL = "http://video.nettavisen.no/javascripts/recommended.js";

function video_embed(id,wide) {

  if( wide == 1 ) {
    width = 460;
    height = 259;
    player = 'http://video.nettavisen.no/flash/460x259.swf';
    type = 'wide';
  }
  else {
    height = 345;
    width = 460;
    player = 'http://video.nettavisen.no/flash/460x345.swf';
    type = 'normal';
  }

  //document.write("<link href='http://video.nettavisen.no/stylesheets/embed.css' rel='stylesheet' type='text/css' />");

  var embed = '<embed src=\"'+player+'?videoId=' + id + '\"';
  embed += ' allowScriptAccess=\"always\"';
  embed += ' width=\"'+width+'\" height=\"'+height+'\" scale=\"noscale\" wmode=\"window\"';
  embed += ' FlashVars="nyW='+width+'&nyH='+height+'&nyURL='+player+'" ';
  embed += ' type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\">';
  embed += ' </embed>';
  
  document.write(embed);
  //document.write("<script src='"+URL+"?"+Math.random()+"'></script>");
}


