// Flash Loader
// Used to prevent highlight in Internet Explorer
// this NetworkID is the one used for FreeWheel functionality

var networkID=13043; 

function writeFlash(swffile, swfw, swfh, container, swfid) {

  if( swfid != undefined ) {
    //swfid = ' id="' + swfid + '" ';
  } else {
    var swfid; swfid = ' ';
  }

  var htmlTest;

  htmlTest = '<object id="'+ swfid + '" width="' + swfw + '" height="' + swfh + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">' + "\n"
	         + '<param name="movie" value="' + swffile + '" />' + "\n"
	         + '<param name="wmode" value="transparent" />' + "\n"
	         + '<embed src="' + swffile + '" width="' + swfw + '" height="' + swfh + '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>' + "\n"
           + '</object>' + "\n";

  document.getElementById(container).innerHTML = htmlTest;

} // ! writeFlash

function writeFlashSSID(swffile, swfw, swfh, container, swfid, ssid) {

  if( swfid != undefined ) {
    swfid = ' id="' + swfid + '" ';
  } else {
    var swfid; swfid = ' ';
  }

  var htmlTest;

  htmlTest = '<object id="'+ swfid + '" width="' + swfw + '" height="' + swfh + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">' + "\n"
	         + '<param name="movie" value="' + swffile + '" />' + "\n"
	         + '<param name="wmode" value="transparent" />' + "\n"
	         + '<param name="FlashVars" value="SSID=' + ssid + '&networkID=' + networkID + '" />' + "\n"	         
	         + '<embed src="' + swffile + '" width="' + swfw + '" height="' + swfh + '&networkID=' + networkID + '&SSID=' + ssid + '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>' + "\n"
           + '</object>' + "\n";

  document.getElementById(container).innerHTML = htmlTest;

} // ! writeFlash

function writeFlashScroll(swffile, swfw, swfh, container, swfidxml, xml) {

  if( swfid != undefined ) {
    swfid = ' id="' + swfid + '" ';
  } else {
    var swfid; swfid = ' ';
  }

  var htmlScroll;

  htmlScroll = '<object id="' + swfidxml + '" width="' + swfw + '" height="' + swfh + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">' + "\n"
	         + '<param name="movie" value="' + swffile + '" />' + "\n"
	         + '<param name="FlashVars" value="xml=' + xml + '" />' + "\n"
	         + '<param name="wmode" value="transparent" />' + "\n"
	         + '<embed src="' + swffile + '" width="' + swfw + '" height="' + swfh + '" FlashVars="xml=' + xml + '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>' + "\n"
           + '</object>' + "\n";

  document.getElementById(container).innerHTML = htmlScroll;

} // ! writeFlashScroll

function writeFlashScrollSSID(swffile, swfw, swfh, container, swfidxml, xml, ssid) {

  if( swfid != undefined ) {
    swfid = ' id="' + swfid + '" ';
  } else {
    var swfid; swfid = ' ';
  }

  var htmlScroll;
  htmlScroll = '<object id="' + swfidxml + '" width="' + swfw + '" height="' + swfh + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">' + "\n"
	         + '<param name="movie" value="' + swffile + '" />' + "\n"
	         + '<param name="FlashVars" value="xml=' + xml + '&SSID=' + ssid + '&networkID=' + networkID + '" />' + "\n"	         
	         + '<param name="wmode" value="transparent" />' + "\n"
	         + '<embed src="' + swffile + '" width="' + swfw + '" height="' + swfh + '" FlashVars="xml=' + xml + '&SSID=' + ssid + '&networkID=' + networkID + '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>' + "\n"
           + '</object>' + "\n";

  document.getElementById(container).innerHTML = htmlScroll;

} // ! writeFlashScroll

function writeFlashVideo(swffile, swfw, swfh, container, swfid, xml) {

  if( swfid != undefined ) {
    swfid = ' id="' + swfid + '" ';
  } else {
    var swfid; swfid = ' ';
  }

  var htmlTest;

  htmlTest = '<object id="'+ swfid + 'width="' + swfw + '" height="' + swfh + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">' + "\n"
	         + '<param name="movie" value="' + swffile + '" />' + "\n"
	         + '<param name="FlashVars" value="flvPath=' + xml + '" />' + "\n"
	         + '<param name="wmode" value="transparent" />' + "\n"
	         + '<embed src="' + swffile + '" width="' + swfw + '" height="' + swfh + '" FlashVars="flvPath=' + xml + '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>' + "\n"
           + '</object>' + "\n";

  document.getElementById(container).innerHTML = htmlTest;
  
} // ! writeFlashVideo
function writeFlashVideoSSID(swffile, swfw, swfh, container, swfid, xml, ssid) {

  if( swfid != undefined ) {
    swfid = ' id="' + swfid + '" ';
  } else {
    var swfid; swfid = ' ';
  }

  var htmlTest;

  htmlTest = '<object id="'+ swfid + 'width="' + swfw + '" height="' + swfh + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">' + "\n"
	         + '<param name="movie" value="' + swffile + '" />' + "\n"
	         + '<param name="wmode" value="transparent" />' + "\n"
			 + '<param name="allowFullScreen" value="true" />' + "\n"
	         + '<param name="FlashVars" value="flvPath=' + xml + '&SSID=' + ssid + '&networkID=' + networkID + '" />' + "\n"	                      
	         + '<embed src="' + swffile + '" width="' + swfw + '" height="' + swfh + '" FlashVars="flvPath=' + xml + '&SSID=' + ssid + '&networkID=' + networkID + '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>' + "\n"
           + '</object>' + "\n";

  document.getElementById(container).innerHTML = htmlTest;
  
} // ! writeFlashVideo
function writeFlashSpotLight(swffile, swfw, swfh, container, base_url) {

  if( swfid != undefined ) {
    swfid = ' id="' + swfid + '" ';
  } else {
    var swfid; swfid = ' ';
  }

  var htmlScroll;

  htmlScroll = '<object width="' + swfw + '" height="' + swfh + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">' + "\n"
	         + '<param name="movie" value="' + swffile + '" />' + "\n"
	         + '<param name="FlashVars" value="base_url=' + base_url + '" />' + "\n"
	         + '<param name="wmode" value="transparent" />' + "\n"
	         + '<embed src="' + swffile + '" width="' + swfw + '" height="' + swfh + '" FlashVars="base_url=' + base_url + '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>' + "\n"
           + '</object>' + "\n";

  document.getElementById(container).innerHTML = htmlScroll;

} // ! writeFlashSpotLight
