
function getRemote(){

  var output = "?hostname=" + escape(document.location.hostname);
  return output;

}

function writeFlashLocation(prv_id, a_code){

  var output = 'http://video.endependence.info/flash/endremvid_01_00_01.swf' + getRemote() + '&products_remote_video_id=' + prv_id + '&access_code=' + a_code;
  return output;

}

function writeFlash(id, src, height, width, param, param_val){

  document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + width + "\" height=\"" + height + "\" id=\"" + id + "\" align=\"middle\" border=\"0\">");

  for(i=0; i<param.length; i++){

    document.write("<param name=\"" + param[i] + "\" value=\"" + param_val[i] + "\" />");
 
  }

  document.write("<embed src=\"" + src + "\" quality=\"high\" bgcolor=\"#ffffff\" width=\"" + width + "\" height=\"" + height + "\" name=\"" + id + "\" align=\"middle\" allowScriptAccess=\"always\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"  border=\"0\"/>");
  document.write("</object>");

}