var cdn_prepend = "http://limelight.brainpopjr.com";
//var cdn_prepend = "";

/*function show_flash(flash_source, flash_width, flash_height, flash_vars)
{
	document.write('<NONSCRIPT><EMBED SRC="'+flash_source+'" bgcolor="#FFFFFF" AllowScriptAccess=always swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></NONSCRIPT>')
}*/

function show_flash_object(flash_source, flash_width, flash_height, flash_vars)
{
	document.write('<NONSCRIPT><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID=ECHOECHO WIDTH='+flash_width+' HEIGHT='+flash_height+'>')
	document.write('<PARAM NAME=movie VALUE="'+flash_source+'">')
	document.write('<PARAM NAME=bgcolor value="#FFFFFF">')
	document.write('<PARAM NAME=allowFullScreen value="true">')
	document.write('<PARAM NAME=quality VALUE=AUTOLOW>')
	document.write('<PARAM NAME=play VALUE=true>')
	document.write('<PARAM NAME=wmode VALUE=transparent>')
	document.write('<PARAM NAME=menu VALUE=false>')
	document.write('<PARAM NAME=AllowScriptAccess VALUE=always>')
	document.write('<PARAM NAME=flashvars value="'+flash_vars+'">');
	document.write('<EMBED SRC="'+flash_source+'" bgcolor="#FFFFFF" allowFullScreen=true AllowScriptAccess=always swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>')
	document.write('</OBJECT></NONSCRIPT>')
}

function show_flash_object_noembed(flash_source, flash_width, flash_height, flash_vars, page_link, movie_name, keywords)
{
	document.write('<NONSCRIPT><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID=ECHOECHO WIDTH='+flash_width+' HEIGHT='+flash_height+'>')
	document.write('<noembed><a href="'+page_link+'" alt="'+keywords+'">'+movie_name+'</a></noembed>');
	document.write('<PARAM NAME=movie VALUE="'+flash_source+'">')
	document.write('<PARAM NAME=bgcolor value="#FFFFFF">')
	document.write('<PARAM NAME=allowFullScreen value="true">')
	document.write('<PARAM NAME=quality VALUE=AUTOLOW>')
	document.write('<PARAM NAME=play VALUE=true>')
	document.write('<PARAM NAME=wmode VALUE=transparent>')
	document.write('<PARAM NAME=menu VALUE=false>')
	document.write('<PARAM NAME=AllowScriptAccess VALUE=always>')
	document.write('<PARAM NAME=flashvars value="'+flash_vars+'">');
	document.write('<EMBED SRC="'+flash_source+'" bgcolor="#FFFFFF" allowFullScreen=true AllowScriptAccess=always swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>')
	document.write('</OBJECT><NONSCRIPT>')
}

function show_flash(flash_source, flash_width, flash_height, flash_vars)
{
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID=ECHOECHO WIDTH='+flash_width+' HEIGHT='+flash_height+'>')
	document.write('<PARAM NAME=movie VALUE="'+cdn_prepend+flash_source+'">')
	document.write('<PARAM NAME=allowFullScreen value="true">')
	document.write('<PARAM NAME=bgcolor value="#FFFFFF">')
	document.write('<PARAM NAME=quality VALUE=AUTOLOW>')
	document.write('<PARAM NAME=play VALUE=true>')
	document.write('<PARAM NAME=wmode VALUE=transparent>')
	document.write('<PARAM NAME=menu VALUE=false>')
	document.write('<PARAM NAME=AllowScriptAccess VALUE=always>')
	document.write('<PARAM NAME=flashvars value="'+flash_vars+'">');
	document.write('<EMBED SRC="'+cdn_prepend+flash_source+'" AllowScriptAccess=always allowFullScreen=true bgcolor="#FFFFFF" swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>')
	document.write('</OBJECT>')
}

function show_flash_random(flash_source, flash_width, flash_height, flash_vars)
{
	
	var randomnumber=Math.floor(Math.random()*100)
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID=ECHOECHO WIDTH='+flash_width+' HEIGHT='+flash_height+'>')
	document.write('<PARAM NAME=movie VALUE="'+cdn_prepend+flash_source+'?'+randomnumber+'">')
	document.write('<PARAM NAME=allowFullScreen value="true">')
	document.write('<PARAM NAME=bgcolor value="#FFFFFF">')
	document.write('<PARAM NAME=quality VALUE=AUTOLOW>')
	document.write('<PARAM NAME=play VALUE=true>')
	document.write('<PARAM NAME=AllowScriptAccess VALUE=always>')
	document.write('<PARAM NAME=wmode VALUE=transparent>')
	document.write('<PARAM NAME=menu VALUE=false>')
	document.write('<PARAM NAME=flashvars value="'+flash_vars+'">');
	document.write('<EMBED SRC="'+cdn_prepend+flash_source+'?'+randomnumber+'" allowFullScreen=true AllowScriptAccess=always bgcolor="#FFFFFF" swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>')
	document.write('</OBJECT>')
}

function show_flash_no_cdn(flash_source, flash_width, flash_height, flash_vars)
{
	document.write('<NONSCRIPT><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID=ECHOECHO WIDTH='+flash_width+' HEIGHT='+flash_height+'>')
	document.write('<PARAM NAME=movie VALUE="'+flash_source+'">')
	document.write('<PARAM NAME=allowFullScreen value="true">')
	document.write('<PARAM NAME=bgcolor value="#FFFFFF">')
	document.write('<PARAM NAME=quality VALUE=AUTOLOW>')
	document.write('<PARAM NAME=play VALUE=true>')
	document.write('<PARAM NAME=wmode VALUE=transparent>')
	document.write('<PARAM NAME=menu VALUE=false>')
	document.write('<PARAM NAME=AllowScriptAccess VALUE=always>')
	document.write('<PARAM NAME=flashvars value="'+flash_vars+'">');
	document.write('<EMBED SRC="'+flash_source+'" bgcolor="#FFFFFF" allowFullScreen=true AllowScriptAccess=always swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>')
	document.write('</OBJECT></NONSCRIPT>')
}

/*function show_flash_container(flash_source, flash_width, flash_height, flash_vars)
{
	document.write('<NONSCRIPT><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID=ECHOECHO WIDTH='+flash_width+' HEIGHT='+flash_height+'>')
	//document.write('<PARAM NAME=movie_path VALUE="'+flash_source+'">')
	document.write('<PARAM NAME=bgcolor value="#FFFFFF">')
	document.write('<PARAM NAME=quality VALUE=AUTOLOW>')
	document.write('<PARAM NAME=play VALUE=true>')
	document.write('<PARAM NAME=wmode VALUE=transparent>')
	document.write('<PARAM NAME=menu VALUE=false>')
	document.write('<PARAM NAME=AllowScriptAccess VALUE=always>')
	document.write('<PARAM NAME=flashvars value="'+flash_vars+'">');
	document.write('<EMBED SRC="/container/container.swf?movie_suffix='+flash_source+'" AllowScriptAccess=always bgcolor="#FFFFFF" swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>')
	document.write('</OBJECT></NONSCRIPT>')
}*/

/*function show_flash_container(flash_source, flash_width, flash_height, flash_vars)
{
	//var cdn_prepend = "http://limelight.brainpopjr.com";
	//var cdn_prepend = "";
	document.write('<NONSCRIPT><EMBED SRC="'+cdn_prepend+'/container/container.swf?movie_suffix='+flash_source+'" AllowScriptAccess=always scale="noborder" salign="tl" bgcolor="#FFFFFF" swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></NONSCRIPT>')
}*/

function show_flash_container(flash_source, flash_width, flash_height, flash_vars, container_name)
{
	document.write('<NONSCRIPT><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID=ECHOECHO WIDTH='+flash_width+' HEIGHT='+flash_height+'>')
	document.write('<PARAM NAME=movie VALUE="'+cdn_prepend+'/container/'+container_name+'.swf?movie_suffix='+flash_source+'">')
	document.write('<PARAM NAME=bgcolor value="#FFFFFF">')
	document.write('<PARAM NAME=allowFullScreen value="true">')
	document.write('<PARAM NAME=quality VALUE=AUTOLOW>')
	document.write('<PARAM NAME=scale VALUE="noborder">')
	document.write('<PARAM NAME=salign VALUE="tl">')
	document.write('<PARAM NAME=play VALUE=true>')
	document.write('<PARAM NAME=wmode VALUE=transparent>')
	document.write('<PARAM NAME=menu VALUE=false>')
	document.write('<PARAM NAME=AllowScriptAccess VALUE=always>')
	document.write('<PARAM NAME=flashvars value="'+flash_vars+'">');
	document.write('<EMBED SRC="'+cdn_prepend+'/container/'+container_name+'.swf?movie_suffix='+flash_source+'" allowFullScreen=true AllowScriptAccess=always scale="noborder" salign="tl" bgcolor="#FFFFFF" swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT></NONSCRIPT>')
}

function show_flash_container_topic_top_nav(flash_source, flash_width, flash_height, flash_vars)
{
	document.write('<NONSCRIPT><EMBED SRC="/container/topicPage_nav_cont.swf" bgcolor="#FFFFFF" allowFullScreen=true swLiveConnect=FALSE scale="noborder" AllowScriptAccess=always salign="l" WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></NONSCRIPT>')
}

function show_flash_container_no_scale(flash_source, flash_width, flash_height, flash_vars, container_name)
{
	//var cdn_prepend = "http://limelight.brainpopjr.com";
	//var cdn_prepend = "";
	document.write('<NONSCRIPT><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID=ECHOECHO WIDTH='+flash_width+' HEIGHT='+flash_height+'>')
	document.write('<PARAM NAME=movie VALUE="'+cdn_prepend+'/container/'+container_name+'.swf?movie_suffix='+flash_source+'">')
	document.write('<PARAM NAME=bgcolor value="#FFFFFF">')
	document.write('<PARAM NAME=quality VALUE=AUTOLOW>')
	document.write('<PARAM NAME=allowFullScreen value="true">')
	document.write('<PARAM NAME=salign VALUE="tl">')
	document.write('<PARAM NAME=play VALUE=true>')
	document.write('<PARAM NAME=wmode VALUE=transparent>')
	document.write('<PARAM NAME=menu VALUE=false>')
	document.write('<PARAM NAME=AllowScriptAccess VALUE=always>')
	document.write('<PARAM NAME=flashvars value="'+flash_vars+'">');
	document.write('<EMBED SRC="'+cdn_prepend+'/container/'+container_name+'.swf?movie_suffix='+flash_source+'" allowFullScreen=true salign="tl" bgcolor="#FFFFFF" AllowScriptAccess=always swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT></NONSCRIPT>')
}

function show_flash_container_no_scale_v2(flash_source, flash_width, flash_height, flash_vars, container_name)
{
	//var cdn_prepend = "http://limelight.brainpopjr.com";
	//var cdn_prepend = "";
	document.write('<NONSCRIPT><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" ID=ECHOECHO WIDTH='+flash_width+' HEIGHT='+flash_height+'>')
	document.write('<PARAM NAME=movie VALUE="'+cdn_prepend+'/container/'+container_name+'.swf?movie_suffix='+flash_source+'">')
	document.write('<PARAM NAME=allowFullScreen value="true">')
	document.write('<PARAM NAME=bgcolor value="#FFFFFF">')
	document.write('<PARAM NAME=quality VALUE=AUTOLOW>')
	document.write('<PARAM NAME=salign VALUE="tl">')
	document.write('<PARAM NAME=play VALUE=true>')
	document.write('<PARAM NAME=wmode VALUE=transparent>')
	document.write('<PARAM NAME=menu VALUE=false>')
	document.write('<PARAM NAME=AllowScriptAccess VALUE=always>')
	document.write('<PARAM NAME=flashvars value="'+flash_vars+'">');
	document.write('<EMBED SRC="'+cdn_prepend+'/container/'+container_name+'.swf?movie_suffix='+flash_source+'" allowFullScreen=true salign="tl" bgcolor="#FFFFFF" AllowScriptAccess=always swLiveConnect=FALSE WIDTH='+flash_width+' HEIGHT='+flash_height+' QUALITY=AUTOLOW MENU=false PLAY=true FLASHVARS="'+flash_vars+'" WMODE=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT></NONSCRIPT>')
}
